Skip to content

[CDC]: Do not claim AT-protocol in CDC interface descriptor #884

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

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

matthijskooijman
Copy link
Contributor

The CDC code presents itself as a virtual serial port. However, it also
sets the "bFunctionProtocol" value to 1, which means it supports
AT-commands, which is not actually the case. This might cause problems
with some software, such as ModemManager.

Originally, ModemManager would be very liberal with probing serial
devices, using a blacklist to prevent probing non-modems such as
Arduinos.

Since version 1.7.990, it has supported a "strict" mode where it tries to be
more restrained in what devices it probes. For CDC ACM devices, this
means it will only probe devices that claim to support AT-commands.
However, it also stopped applying the blacklist (intending to eventually
remove the blacklist), meaning it would end up probing these serial ports.

This new strict policy is not the upstream default, but is enabled in
Debian (since Buster) and Ubuntu (since bionic 18.04.2). Later versions
of ModemManager make an exception for single-port Serial devices making this
less of a problem, but best to also fix the descriptor.

For the equivalent change in the Arduino AVR core, see:
arduino/ArduinoCore-avr#92

The CDC code presents itself as a virtual serial port. However, it also
sets the "bFunctionProtocol" value to 1, which means it supports
AT-commands, which is not actually the case. This might cause problems
with some software, such as ModemManager.

Originally, ModemManager would be very liberal with probing serial
devices, using a blacklist to prevent probing non-modems such as
Arduinos.

Since version 1.7.990, it has supported a "strict" mode where it tries to be
more restrained in what devices it probes. For CDC ACM devices, this
means it will only probe devices that claim to support AT-commands.
However, it also stopped applying the blacklist (intending to eventually
remove the blacklist), meaning it would end up probing these serial ports.

This new strict policy is not the upstream default, but is enabled in
Debian (since Buster) and Ubuntu (since bionic 18.04.2). Later versions
of ModemManager make an exception for single-port Serial devices making this
less of a problem, but best to also fix the descriptor.

For the equivalent change in the Arduino AVR core, see:
arduino/ArduinoCore-avr#92
@fpistm fpistm added the enhancement New feature or request label Jan 24, 2020
@fpistm
Copy link
Member

fpistm commented Jan 24, 2020

Thanks @matthijskooijman
I will tr to review it soon.

@fpistm fpistm self-requested a review January 27, 2020 08:27
@fpistm fpistm added this to the 1.9.0 milestone Jan 27, 2020
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fpistm fpistm merged commit 0bd29f9 into stm32duino:master Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants