You are currently assuming that the connected device is a serial device. That is a BAD thing. You should use some code like:
switch (device.TYPE)
{
case USBH_DeviceType.Serial_Prolific:
etc
that will then allow you to connect a USB thumb drive to the Domino and not try to write to it like a serial port.
If you check the ENUM definition this board is NOT presenting itself as a Serial device. It’s presenting to Fez as an UNKNOWN device (hint: to see the ENUM, put your cursor in the Serial_Prolific text in the above case statement in VS and hit F12 to see the definition). FTDI normally reports a type of 8.
hope that helps in some way - I seem to remember some previous case where someone reported this - I’ll hit search chortly to check if I can find what they did…
You are correct, and I had it that way, but removed all extra code while trying to get it to work. It is not correctly reporting type 8, and that’s what I’m trying to figure out.
I have hard coded it to create a USBH_Device of type Serial_FTDI and it works, it just doesn’t correctly find the device type.
** works **
USBH_Device ftdi = new USBH_Device(device.ID, device.INTERFACE_INDEX,
USBH_DeviceType.Serial_FTDI, device.VENDOR_ID,
device.PRODUCT_ID, device.PORT_NUMBER);