Main Site Documentation

USB Serial not detected



I’m attempting to get a USB760 (aka U760, MC760) cellular card working with USB Host. I have the USB modeswitch working, and in fact if I can get this all to work properly I’m going to release some small source snippits that should be able to read the usb_modeswitch.conf file from Linux and modeswitch nearly any device – should be useful for others in the future.

However, the resulting devices don’t appear as any known USB->Serial converters – they all show up as Unknown. An attempt to ignore this and hook up USBH_SerialUSB to it anyway yields an exception on write.

Linux sees the device as a USB Serial just fine using the usbserial module.

David Pfeffer


The exception is:

Exception System.Exception - 0xffffffff (8)


GHIElectronics.NETMF.USBHost.USBH_SerialUSB::Write_Helper [IP: 0000]

GHIElectronics.NETMF.USBHost.USBH_SerialUSB::Write [IP: 001a]

FEZ_Cobra_Console_Application1.NETMFHelpers::Write [IP: 0012]

FEZ_Cobra_Console_Application1.Program::DetermineIfModem [IP: 0016]

FEZ_Cobra_Console_Application1.Program+<>c__DisplayClass4::b__1 [IP: 0007]


Take a look at USB serial documentation. It shows how to force a certain USB serial driver. Try them and see if one of them work.


I actually tried that too – I looped through every available USB device type and tried to send, and got an exception.


I’m trying to write directly to the bulk in/out endpoints now, in an attempt to model the usbserial.c source for generic usb serial drivers. However, I can’t seem to read.

I was doing:
var raw = new USBH_RawDevice(device);
var inpipe = raw.OpenPipe(FindFirstBulkInputEndpoint(raw));
var outpipe = raw.OpenPipe(FindFirstBulkOutputEndpoint(raw));

        byte[] buf = new byte[1000];
        inpipe.TransferTimeout = 1000;
        var len = inpipe.TransferData(buf, 0, 1000);
        Debug.Print(new string(Encoding.UTF8.GetChars(buf)));


Honestly I don’t care if its elegant at this point – I can make something pretty once I have it working, but right now I just want to be able to send and receive modem commands from the device.


Do you get exceptions? Do you get any data at all (what’s the read length)?
Call device.GetDescrptors(), expand the returned structure in Visual Studio debugger window and take a snapshot. Maybe we can see what is going on.

Some USB modem starts in a bootloader or mass storage mode. You have to send a command to make it switch to modem mode.
If you have a linux driver, you can take a look at the source code and see what they do. Also, if you have a USB sniffer, take a look at the packets sent to/from PC.