-
Notifications
You must be signed in to change notification settings - Fork 34
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 Descriptor incorrectly reports crow as supporting AT messages #81
Comments
@tehn At this point I'm going to retag this to the 2.0 milestone when we hopefully have a larger team of devs that might be able to shed some light on what's happening. In the meantime we can work around this by using a |
@trentgill on which distro are you experiencing this? There's nothing that does this by default in the kernel, so I'd assume it's something like ModemManager that's doing this. |
i'm on Ubuntu 16.04.5 LTS |
So if/when you're running ModemManager it does indeed trigger on device detection (via udev)
(Not sure why I'm getting that warning, could be because I disabled most of ModemManager during compilation) Anyway, this ModemManager integration can be disabled via a udev rule:
This will need a reload of the rules to enable it Once this is done ModemManager will no longer interact with the device. |
Just a quick note to say I finally tried the above (ie. adding the udev rule & reloading rules) and it solves the problem! Wishing I'd spent the 10 minutes to test it back in May!! |
That's good to hear, then we have at least a solution/workaround. Is there no way to configure crow's USB client in the firmware in such a way that it doesn't present itself as a modem? (I don't know if there's another mode that would allow interactive send/receive that isn't the modem mode) |
FYI, need to kill ModemManager before running the command to update the rules for this to work. Strange that it doesn't work after a system restart? |
Another update. on Ubuntu 18, setting the rules.d file didn't fix the ModemManager issue. Instead, I've just resorted to disabling modem manager altogether as I don't have any devices that need it: |
That's very strange, AFAIK nothing has changed with regards to how the modemmanager specific ignore needs to be defined. Maybe you need to do a restart after making the change? |
@trentgill Is this still happening on 18.04 (assuming it's that version)? Are you using plain Ubuntu or some other spin of it? Why don't we change the device type that the STM is configured to be to a normal serial port instead? |
This is the thing I've tried to do numerous times & never succeeded at. I don't know if it's a bug in the stm32 usb driver, or a poorly documented API, or I just haven't figured the magical bits. I believe it should be settings in https://github.com/monome/crow/blob/main/usbd/usbd_desc.c, either in the group of defines at L:55 or the USBD_DeviceDesc array at L:94. I'd be thrilled if someone else took on the details of figuring this out. (yes, it's 18.04 stock ubuntu) |
Just wanted to chime in and say that the udev rules fixed the issue for me on debian/buster |
i was doing some digging in the CDC driver re: the new grid firmware, and discovered these settings that might have some impact next time someone has a spare moment looking for a quick project: |
good find. now i need to remember how to test this... |
On linux, this means the OS will send AT messages to crow whenever it is connected. These messages cause evaluation errors in the crow REPL and will trash the first command called. These messages take around 7 seconds to complete, which is frustratingly long when trying to debug a script.
This can be reduced by buffering REPL commands on the host side (using
readline
or similar), and prepending the\e
escape character to strings in the first few seconds (thus aborting previous input).Fixing this requires looking into the specifics of the USB driver configuration. I've spent a good 45mins searching for the value that sets this, but to no avail. Perhaps it's in the STM usbd library itself?
The text was updated successfully, but these errors were encountered: