Closed gdanov closed 1 year ago
hi
Have you tried other pins ? I had a successful results with SCL/SDA on a D32 Pro
#define DP_P0 SCL
#define DM_P0 SDA
yes, I started with them. Also tried S2, no luck too. Keyboard power led lights on, so at least that's right.
increased the log level, now I get
3:46:38.188 -> USB0: Ack = 0 Nack = 220 01 pcurrent->cb_Cmd = 2 state = 3 epCount = 0 --0001 00ff 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
23:46:46.197 -> USB0: Ack = 0 Nack = 444 01 pcurrent->cb_Cmd = 2 state = 3 epCount = 0 --0001 00ff 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
23:46:54.219 -> USB0: Ack = 0 Nack = 668 01 pcurrent->cb_Cmd = 2 state = 3 epCount = 0 --0001 00ff 00ff 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
23:47:02.224 -> USB0: Ack = 0 Nack = 824 00 pcurrent->cb_Cmd = 0 state = 0 epCount = 0 --0002 00ff 00ff 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
23:47:10.222 -> USB0: Ack = 0 Nack = 824 02 pcurrent->cb_Cmd = 0 state = 0 epCount = 0 --0002 00ff 00ff 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
23:47:18.222 -> USB0: Ack = 0 Nack = 824 02 pcurrent->cb_Cmd = 0 state = 0 epCount = 0 --0002 00ff 00ff 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
depending how I connect the signal wires (btw which pin goes to D+/-?) no message that usb was detected
with level shifter connected like here https://cdn.sparkfun.com/assets/learn_tutorials/2/3/8/5/TXS01018E-Assembly2.jpg I see the led blink rapidly, but still Ack = 0
Reminder: only USB 1.0 devices will work with this library.
I assume you read the documentation and have already verified this important detail, if the keyboard and mice you try aren't in the supported list and their status is unknow, please provide their respective USB PIV/VID.
with level shifter connected
Level shifter will only make things worse with an esp32, it isn't needed.
Looking at the esp32 pinout, the pins you know for sure aren't pulled up/down are:
2, 4, 13, 15, 25, 26
So if SDA/SCL didn't work, you can still try with {2.4}, {4,2}, {13,15}, {15,13}, {25,26} and {26,25}.
It's worthless to try other combinations, the bitwise hack allowing USB1.0 emulation on ESP32 creates a situation where the "distance" between D+ and D- can't exceed 8 (i.e. using pins {4,13} will never work because 13 - 4 = 9).
Thanks. I wasn't aware it's strictly usb 1.0 only. I guess this is the problem.
using the example as-is, here is the output
no level shifters, directly to the pins.