Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simultaneous serial and gamepad data #12

Open
ChrGri opened this issue Apr 20, 2024 · 8 comments
Open

Simultaneous serial and gamepad data #12

ChrGri opened this issue Apr 20, 2024 · 8 comments

Comments

@ChrGri
Copy link

ChrGri commented Apr 20, 2024

Thank you for this awesome project.

I'm using an ESP32 S3 (connected via USB port) and want to send/read additional serial data over the USB port to monitor/debug the ESP.

What seems to work:

  • USB gamepad data
  • ESP seems to receive serial data from PC.

What does not work:

  • ESP doesn't send serial data to PC.

Do you have an example script where the additional serial communication is working properly?

BR
Chris

@ChrGri
Copy link
Author

ChrGri commented Apr 20, 2024

I wrote a simple test script (see attachment) and it does what I'm expecting: changing the USB gamepad output and printing info to the Arduino serial monitor simultaneously.
Joystick_Serial_test.zip

My original code has two tasks running on two cores which are accessing the same USB port. Apperently that creates some trouble. I'll continoue the serach for a solution.

@schnoog
Copy link
Owner

schnoog commented Apr 20, 2024

Hi Chris, thanks for your feedback.

In my projects I never used the serial output and both cores at the same time.
Thanks for having a look into it. Would appreciate if you could keep me updated.

Cheers
Volker

@ChrGri
Copy link
Author

ChrGri commented Apr 21, 2024

Can you confirm that the flash settings are okay? Specifically "CDC on boot enabled" & "USB mode OTG".

324125279-dc73cd64-73c5-4bd5-ba5f-7b06a87677b7.png

The USB cable is connected to the USB OTG port.

BR
Christopher

@schnoog
Copy link
Owner

schnoog commented Apr 21, 2024

What I'm seeing on your screenshot looks correct to me.
(don't have ArduinoIDE installed at the moment, so assessment based on my memory)

A news delivery of S3 should arrive soon, will start testing once they arrived. My current ones are all wired to my simulator setup.

@ChrGri
Copy link
Author

ChrGri commented Apr 27, 2024

Hi @schnoog,

the current status is, that when serial and HID output are asked at high repetition rate, both outputs stop working. I've addded a testscript below. Feel free to play with the delay.

Joystick_Serial_test.ino.txt

Edit:
I'm using this serial monitor since it allows to en-/disable the RTS/DTR signals manually.
As soon as serial is activated via DTR, the HID output stalls.
image

BR
Chris

@kbastronomics
Copy link

Is there any update on this issue, I'm having same issue i think
I'm using this with DCS-BIOS that sends data to my device and I use the Joystick device to send button/axis information to DCS-BIOS.

it works briefly once started up, then i loose the HID devices but the serial devices keep working. it's like HID got turned off
it seem to happen with a DTR signal like the OP reported.

@kbastronomics
Copy link

I take that back, DTR does not cause it in my case. it just took longer before HID froze

@schnoog
Copy link
Owner

schnoog commented Jan 15, 2025

@ChrGri opened a ticket for that issue espressif/arduino-esp32#10307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants