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
Linux ModemManager messes with the Solo CDC ACM serial port interface #62
Comments
I will test today the idea from #60 (comment) |
The Udev rule, as mentioned in the commit, works for me. Fedora 29. |
It seems this doesn't always work: ModemManager has different filter policies, and if you're running "strict", then |
Let's try and get our VID/PID in http://cgit.freedesktop.org/ModemManager/ModemManager when they're up again. |
I guess we should add our VID/PID to https://gitlab.freedesktop.org/mobile-broadband/ModemManager/blob/master/src/77-mm-usb-device-blacklist.rules? |
@conorpp the second line of the ModemManager log file i attached to the above issue on https://gitlab.freedesktop.org states:
Is this perhaps an issue we can easily fix on our side? |
I found that the There's still an issue though, the ModemManager seems to keep the device opened for 10+ seconds after plugging it in or reset, so nothing can open it easily without first waiting a while. |
This is the same behaviour as before then when I ran with filter policy "strict": udev inspected the device for ~20 seconds until it gave up and released it again. Thanks for locating the |
We've also ran into essentially the same issue with Arduino devices. I've started some discussion at ModemManager upstream and Debian about this, see https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/127 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930264. |
@matthijskooijman the thing to do is not signal modem functionality to Hope that helps! It seems somewhat obscure knowledge, but make sense. EDIT: I see now you are aware of the "proper" solution. |
Closing this as the issue is solved. |
@nickray, Yeah, I already found the protocol value that indicates modem functionality. However, a lot of Arduino boards have this value hardcoded in a USB-to-serial firmware that is not typically updated by users, so I also raised the issue with MM so they can support the existing devices as well. How is this for the Solo device? Aren't there already devices out there with older firmware? Or is this firmware routinely updated? |
Yes! This is like our "unique value proposition" :D See https://update.solokeys.com The other thing is that non-Hacker builds don't have VCOM enabled in the first place. |
Ah, nice, and even from the browser by posing the commands as key requests it seems. Clever :-) |
Well, "clever", yes. But the deluge of popups is not really nice. We hope at some point to (entice the powers that be to) introduce a proper API for authenticator maintenance/general vendor-specific commands. Clearly our competitors with their closed-source/non-updatable products hadn't considered the need :) Using WebUSB is not a real solution either IMHO since Firefox doesn't want to support it. |
MM should not touch the device at all if the ttyACM port isn't flagging itself as AT-command capable. If MM keeps the device open for those 10+ seconds even if the port is flagged as AT, please let us know in the MM gitlab issues please. |
This is solution help me for ModemManager 1.10.0 with You can learn more: Common udev tags Create a file
After save file and run: and (maybe it's not necessary): After reconnecting the USB device (physically pull out and pull in it into the USB port) and enjoy. P.S. This is a solution for the STM32 CDC Virtual Com port - if necessary, you can change the PID / VID and udev tags. |
Please do not do this :) Just update to a new enough ModemManager (e.g. 1.12.x or even 1.10.8), and your problem should be solved. None of those tags are supposed to be user-usable tags in MM 1.10.0. If you run 1.12.0 and don't want to rely on the automagic detection of modems and you want to always ignore that specific device, you could use ID_MM_DEVICE_IGNORE, but only on 1.12.0 or newer as that is supported for all filter types since that version. In your version 1.10.0, ID_MM_DEVICE_IGNORE would only work when using the "default" filter, not when using the "strict" filter. All the other tags used above should not be used by the user, and some of them aren't even supported in your MM 1.10.0 ... |
I'm not sure why this is being brought up again, as far as I know the issue was fixed in the PR linked above, and https://github.com/solokeys/solo/blob/master/targets/stm32l432/lib/usbd/usbd_composite.c#L138 is still there. |
Disable updates
Since it looks like a modem, the linux daemon
ModemManager
will automatically start messing with it. I had to disable it:Need to find what to change in the USB descriptors to prevent things like this from happening.
https://github.com/solokeys/solo/blob/master/targets/stm32l432/lib/usbd/usbd_composite.c#L100
The text was updated successfully, but these errors were encountered: