Notification events not being sent by computer. Any ideas what I'm doing wrong? #494
-
Reference: #491 (issue) and #493 (PR) https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/master/src/class/cdc/cdc_device.c#L482 // nothing to do with notif endpoint for now I'm adding Notification handling to the CDC Device class, so I can use it to send CTS, DSR, DCD, and RI signals to the host. (PSTN120.pdf, Section 6.5.4) Using net/ncm_device.c as an example, I'm about 70 to 80% sure I have the notification handling mostly correct. But it seems like there are never any transfers being sent to the Notification endpoint. I have a Is there something I need to do to get my host to request those notifications? The endpoint is being setup, and the Interval is set to 16 (default) or 1 (my over-ride to lower latency). Debugging confirms that the setup is happening. I do have the serial port opened on the host (minicom, and a python script I have that reports flow control signal changes); I did notice that some things don't get setup if the host isn't trying to use that endpoint. I'm comparing my implementation against an FT231 chip, trying to recreate it's functionality. On the FT231 chip, my python script correctly reports changes to flow control signals. So I know my script is working. But that script doesn't show any changes. And my Sniffing USB using Please let me know if there's any more information I can provide to help debug this. I am stuck. Thank you for your help. -Mark |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out. I was queueing the notification in the callback, which only gets called after the notification is sent. I moved the queueing to set_serial_state instead, and call it again from the call back in case the state changed while we were notifying of the last change. New working code in #493 |
Beta Was this translation helpful? Give feedback.
Figured it out. I was queueing the notification in the callback, which only gets called after the notification is sent. I moved the queueing to set_serial_state instead, and call it again from the call back in case the state changed while we were notifying of the last change.
New working code in #493