From b237dcc8e23abb9e79228e3a175a5286131f9f7a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sat, 8 Jun 2019 21:50:17 +0200 Subject: Do not claim AT-protocol in CDC interface descriptor 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 again probe Arduinos. This new strict policy is not the upstream default, but is enabled in Debian (since Buster) and Ubuntu (since bionic 18.04.2). The proper way to fix this, is to not claim AT comand support in the USB device descriptor, which is what this commit does. The Arduino will still show up as a virtual serial port, just not be probed by ModemManager in strict mode. For the commit that introduced the strict mode in ModemManager, see https://cgit.freedesktop.org/ModemManager/ModemManager/commit/src?id=ee570d44dc117dc69f23e83313dd877f76c5e3e0 --- cores/arduino/CDC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores') diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index 142f8f6..4ff6b9b 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -41,7 +41,7 @@ static u8 wdtcsr_save; extern const CDCDescriptor _cdcInterface PROGMEM; const CDCDescriptor _cdcInterface = { - D_IAD(0,2,CDC_COMMUNICATION_INTERFACE_CLASS,CDC_ABSTRACT_CONTROL_MODEL,1), + D_IAD(0,2,CDC_COMMUNICATION_INTERFACE_CLASS,CDC_ABSTRACT_CONTROL_MODEL,0), // CDC communication interface D_INTERFACE(CDC_ACM_INTERFACE,1,CDC_COMMUNICATION_INTERFACE_CLASS,CDC_ABSTRACT_CONTROL_MODEL,0), -- cgit v1.2.3-18-g5258