I’m trying to set up the USBH_SerialUSB to read NMEA data that comes from a GPS puck.
The device type reported is 0 (unknown) but I know that just plugging in the GPS and leaving it for a minute will enable it to start spitting out sentences of GPS default data.
A first chance exception of type ‘System.Exception’ occurred in GHIElectronics.NETMF.USBHost.dll
An unhandled exception of type ‘System.Exception’ occurred in GHIElectronics.NETMF.USBHost.dll
@ RobRogjam - Which puck are you using? I have a GlobalSat BU-353 that I found for cheap on Amazon that I was going to try hacking on until @ ransomhall 's GPS module is finished. This puck uses the SiRF Star III chip, which is not the same chip (MTK3339) that a driver is available for.
I haven’t tried plugging it into the SerialUSB as you mention, can probably give it a whirl later tonight or tomorrow if no one else can come up with a solution right off for you.
I do know that based on other threads in the past though, you may need to write a specific driver for the type of chip (just like WiFi USB dongles)
you’re likely hitting the SiLabs issue. For the exact code you should use check out the Wiki GHI Electronics – Where Hardware Meets Software and see specifically this in the connected handler:
case USBH_DeviceType.Unknown: // SiLabs but not recognized
// force SiLabs
USBH_Device silabs = new USBH_Device(device.ID,
device.INTERFACE_INDEX,
USBH_DeviceType.Serial_SiLabs, device.VENDOR_ID,
device.PRODUCT_ID, device.PORT_NUMBER);
serialUSB = new USBH_SerialUSB(silabs, 9600,
System.IO.Ports.Parity.None, 8,
System.IO.Ports.StopBits.One);
serialUSB.Open();
serialUSBThread = new Thread(SerialUSBThread);
serialUSBThread.Start();