driver – macOS recognizes USB CDC-ACM serial port as dialup modem
2 mins read

driver – macOS recognizes USB CDC-ACM serial port as dialup modem


I’m recently trying to program STM32 microcontrollers on macOS and used my CMSIS DAP compatible interface to flash the microcontroller.

Normally a CMSIS DAP interface would appear as a USB composite device: it contains a HID device used to access the debug port on STM32 and another as a USB CDC ACM serial port (from which from you can access a physical serial port). the interface).

On macOS, serial CDC ports should be recognized as /dev/tty.usbmodemXXX, but it wouldn’t appear on my Mac at all. I later found out that it was actually recognized as a dial-up modem (in the Network tab of System Preferences):

CMSIS-DAP Link interface recognized as a modem

Of course, I didn’t like what macOS was doing, so I tried deleting the device from the Network tab and chose “No” when asked if I wanted it to show up again the next time I connected it, hoping that this would allow me to access the raw serial port device when network services were not trying to occupy it, and this was not the case. Devices with a serial port are still not displayed. It later turned out that Apple had no way to undo this, so I can’t restore my computer to the way it behaved in the beginning.

From that ioreg Output (after deleting it from the network and doing a bit more research on how to view the macOS device hierarchy) I can see that the CDC-ACM driver is taking over the CDC serial port part of the composite device, but apparently IOSerialBSDClient is not present, which means that the serial port is of course not available.

    | |   | | | +-o USB2.1 Hub@00100000  <class IOUSBHostDevice, id 0x100000755, registered, matched, active, busy 0 (243 ms), retain 39>
    | |   | | |   +-o AppleUSB20Hub@00100000  <class AppleUSB20Hub, id 0x100000810, registered, matched, active, busy 0 (236 ms), retain 23>
    | |   | | |   | +-o AppleUSB20HubPort@00110000  <class AppleUSB20HubPort, id 0x10000081d, registered, matched, active, busy 0 (0 ms), retain 12>
    | |   | | |   | +-o AppleUSB20HubPort@00120000  <class AppleUSB20HubPort, id 0x10000081f, registered, matched, active, busy 0 (236 ms), retain 16>
    | |   | | |   | | +-o CMSIS-DAP@00120000  <class IOUSBHostDevice, id 0x100000b2d, registered, matched, active, busy 0 (234 ms), retain 46>
    | |   | | |   | |   +-o AppleUSBCDCCompositeDevice  <class AppleUSBCDCCompositeDevice, id 0x100000b34, !registered, !matched, active, busy 0, retain 4>
    | |   | | |   | |   +-o IOUSBHostInterface@0  <class IOUSBHostInterface, id 0x100000b36, registered, matched, active, busy 0 (21 ms), retain 12>
    | |   | | |   | |   | +-o AppleUserUSBHostHIDDevice  <class AppleUserHIDDevice, id 0x100000b41, registered, matched, active, busy 0 (1 ms), retain 20>
    | |   | | |   | |   |   +-o IOHIDInterface  <class IOHIDInterface, id 0x100000b4a, registered, matched, active, busy 0 (1 ms), retain 6>
    | |   | | |   | |   +-o IOUSBHostInterface@1  <class IOUSBHostInterface, id 0x100000b37, registered, matched, active, busy 0 (8 ms), retain 9>
    | |   | | |   | |   | +-o AppleUSBACMControl  <class AppleUSBACMControl, id 0x100000b40, registered, matched, active, busy 0 (0 ms), retain 6>
    | |   | | |   | |   +-o IOUSBHostInterface@2  <class IOUSBHostInterface, id 0x100000b38, registered, matched, active, busy 0 (220 ms), retain 5>
    | |   | | |   | |   +-o Android File Tra  <class AppleUSBHostDeviceUserClient, id 0x100000b3a, !registered, !matched, active, busy 0, retain 6>
    | |   | | |   | |   +-o Android File Tra  <class AppleUSBHostDeviceUserClient, id 0x100000b4e, !registered, !matched, active, busy 0, retain 6>

The problem here is:

  1. Will I be able to do this? make macOS no longer uses a dial-up modem driver in my system and simply lets the CDC-ACM serial ports become TTY serial ports? Or force the use of a serial port driver for this device?

  2. How can I allow the modem driver to resume it (i.e. easily undo the deletion)? I’ve already tried everything a previous post and it wouldn’t work.

(The flashability of the CMSIS DAP interface is perfectly fine. Only the macOS virtual serial port device is missing. It would work on my Windows computer and even Asahi Linux.)