Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

problems with USB/CDC serial (umodem) - devices work with Linux, Mac OS X, and FreeBSD, but not NetBSD

This is not necessarily limited to NetBSD-CURRENT, though the problem exists there (that’s where I reproduced it).  I’m happy to take it elsewhere or offline — I just couldn’t figure out where the right eyes might see it.  Please point me elsewhere if I’m not in the right spot.

Short story: 

I have two different USB devices that expose a USB CDC modem interface (BTW, my USB vocabulary is rusty — I don’t mean “interface” to carry any technical baggage).

These devices work fine when talking to Linux, Mac OS X, and FreeBSD.  But NetBSD doesn’t (on two different systems — Raspberry Pi and amd64 VMWare virtual machine).  I haven’t been able to debug why yet.  I was asking here to see if anyone might be willing to help me.

Longer story:

I’m trying to get Thread ( radios working with NetBSD, using OpenThread’s stack (

I’m using two different chipsets (Silicon Labs EFR32 and Nordic NRF52840), and both demonstrate the problem.

I’ve built and flashed OpenThread binaries that run on the devices themselves.

There’s a host system component (wpantund, available at, which opens the serial port and communicates with the device.  wpantund does some other stuff, like using the tun(4) device to proxy the OpenThread 6LowPAN stack through the kernel, etc.  And wpantund is a bear to compile — it uses a bunch of C++ boost stuff. But I’ve built it on Linux, Mac OS X, FreeBSD and NetBSD.

wpantund works fine everywhere except NetBSD (on both Raspberry Pi and my VMWare VM), and the part that’s failing is communication with the device over the USB CDC modem — wpantund thinks it is making read requests to the kernel, but I can’t tell if those ever go out to USB.  Certainly wpantund never seems to get any data back — but I don’t know if it’s simply never getting anything over USB, or it’s not making it through the kernel.  My gut says there’s something weird about the umodem/ucom driver.  I tried other USB serial devices (when I plug my Raspberry Pi into a NetBSD VM, it shows up as a different kind of serial port — uftdi/ucom — and that works fine).

I don’t have access to a USB sniffer, though I’m trying to see if I can come by one.  (I’ve thought about getting a BeagleBone Black and using and WireShark, but I was worried it might not work that well.  I don’t want to shell out for an expensive sniffer/analyzer, but if someone can loan one or provide me some time with one — I’m in the Bay Area — let me know.  Advice on this front is welcome.  I haven’t yet looked to see if there’s good USB debugging in the kernel — as I’m using current, it seemed part of kernhist, which is pretty new to me.)

Anyone here interested in getting these USB CDC devices that work elsewhere to work with NetBSD?  I’m technical enough, and can build and test kernels and even debug a bit on my own.  But I’m not a USB expert and it’s gonna take a fair bit of time to come backup to speed — if someone else is an expert, I’d love some guidance.



Home | Main Index | Thread Index | Old Index