karplus / PteroDAQ

Other
3 stars 2 forks source link

macos Catalina can't see serial connection through USB 2.0 hub #56

Open karplus opened 4 years ago

karplus commented 4 years ago

macos 10.15 (Catalina) changed the USB stack yet again, breaking PteroDAQ.

Turning on debug printing in the current macgetports implementation did not help me much, as only the Bluetooth serial now appears to use IOSerialBSDClient.

I'm trying to use ioreg to figure out what is new—it seems that the Teensy is now an AppleUSBDevice, an IOUSBHostDevice, and an IOUSBHostInterface. The IOUSBHostInterface is something we were looking for before, so I'll see if I can figure out the tree for it. It is the child of the IOUSBHostDevice, which is a child of AppleUSB20HubPort, which is a child of AppleUSB20Hub, which is a child of IOUSBHostDevice, a child of AppleUSB20XHCIPort, a child of AppleUSBXHCILPT, a child of IOPCIDevice, a child of AppleACPIPCI, a child of IOACPIPlatformDevice, a child of AppleACPIPlatformExpert, a child of IOPlatformExpertDevice, a child of the root IORegistryEntry.

But what we were returning before was getstring(service, kIODialinDeviceKey), where "service" was an IOSerialBSDClient, which was several layers lower than IOUSBHostInterface. Does the new USB stack not recognize the USB serial of the teensy?

I'm a little stumped about what to do next. I can find the PteroDAQ name, but I'm not sure how to open it as a serial device now.

Further debugging revealed that without the USB 2.0 hub (part of the Cerebrus cable I was using), the Teensy board was still visible as an IOSerialBSDClient as before, and PteroDAQ worked fine. Since most user will be using a direct connection and not an old USB 2.0 hub, I won't treat this as a high priority, unless it turns out that USBC-USB3 docks show a similar problem.