Next CircuitPython release will let users disable USB features #1595
Replies: 1 comment 1 reply
-
Previously detection was via a USB VID/PID list, with wildcard PID possible. But the VID/PID info was extracted from the serial port info, so there had to be a serial port to query. Now as of #1371, the identification is based on the CDC interface name, not the VID/PID. The primary reason to look at the interface name was to choose the proper port as the REPL, since we also added an optional secondary CDC port. Details on how to disable USB devices and enable the secondary CDC port in CircuitPython are here. Compile time customization of USB devices has been available via custom builds in CircuitPython for a while, and also available in limited form at run-time in MicroPython. |
Beta Was this translation helpful? Give feedback.
-
So we might encounter situations where a device suddenly has a MSD drive and no CDC serial, or the other way around.
I believe (need to confirm this) that Mu CircuitPython device detection is via serial info, so we might not be able to detect the CircuitPython devices connected without a CDC. This is probably okay, as that would just mean it would show an error when trying to open the Serial or Plotter.
If the connected device has CDC but no MSD drive, then it would likely be detected by Mu, offer to switch modes and then fail to find the CIRCUITPY drive. This might fail silently, meaning it would just automatically save the files to the
mu_code
directory, so not ideal, but not a problem either.If a device has neither, then it probably will be "invisible" to Mu.
All these modes need to be tested though, in case we fail and crash in unexpected ways.
Beta Was this translation helpful? Give feedback.
All reactions