-
Notifications
You must be signed in to change notification settings - Fork 5
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
USB Host either triggers "No free interrupt" error or stalls after connecting to a UPS #2
Comments
To be honest, I didn't meet the two problems before. I quickly searched for the USB issue and found espressif/esp-idf#13986 and https://www.esp32.com/viewtopic.php?t=27763 . It may be (a) bugs in the latest idf code and/or (b) incompatibility between the transfer protocol and your UPS, as the repo is designed for my UPS spec. If (a), I suggest you to use v5.1.1 or the version around that time, as the code I used was the master branch code after the release of v5.1 . Just make sure it have hid_class_request_get_report
If (b), you may have to find out the real protocol by yourself. You can try to use Device Monitoring Studio to send the protocol in my repo README and check if the result is familar with mine. Here are the steps I done to figure out the protocol:
:) |
Great insights thank you! So I think it's kind of working now - WiFi is still an issue - with IDF 5.1.1 it connects to an iPhone hotspot but not my AP, sounds like something to do with WPA3? Not sure about that. I'll just have WiFi disconnected while working on the protocol. So USB Host stalls/crashes spectacularly on IDF 5.1.1 + usb_host_hid 1.0.0 🤣 but mostly working on IDF 5.2.1 + usb_host_hid 1.0.2. It seems to have something to do with feature report 0x1f on alarms. Once I stop that particular get report it kind of working now. I referred to cyberpower-usb-watcher where it mentions Cyberpower HID is compatible with HID PD, however I'm still trying to figure out the format of each feature report as none of them matches the documentation trivially. Not bad for mid-night coding and my first C, ESP32 and USB HID project 🫠 Again, great code base to begin with! |
Great!
I found and listed some docs in the README but my NAS is not the same as any of them, and there are always some diffs. Strange ha.
|
While I'm trying to adapt your code to support a Cyberpower UPS, I encountered some issues that I have no clue how to debug. Would really appreciate if you can shed some lights :D
Hardware: A clone of
YD-ESP32-S3 N16R8
with OTG pad connectedIDF Components:
espressif/usb_host_hid: 1.0.2
espressif/led_strip: 2.5.4
idf 5.2.1
When the board is connected to Wi-Fi in
app_main()
(callingexample_connect()
) it triggersthis error. Since it looks like a compatibility error, so I commented out the line of code to connect to Wi-Fi, the code can finally boot into USB sections, and looping and waiting for UPS to connect at
timer_task()
.(当Wi-Fi连接后USB无法初始化,会显示如下错误,似乎和个别AP有兼容性问题,如果不连接Wi-Fi的话是可以继续的)
However when UPS is connected through USB port, this happens:
Looks like something caused the USB Host to stall. Since I don't have JTAG debugger, that's as far as I can go for now.
(当UPS连接到USB后会显示 USB Host stall, 如上,然后就重启了,也不知道是哪个部分出错的)
Wonder if you have any idea what may cause this issue, or if it's something you know during development as well.
Thank you!
The text was updated successfully, but these errors were encountered: