This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Help with .NET driver connecting CDC USB device

Hello,

I'm developing a simple test application to connect to a BBB running the StarterWare USB firmware. When using the .NET SerialPort class, I get an IOException when trying to connect to the USB serial port. Connecting with a terminal emulator works fine. Looking through other forums, it seems that the .NET serial class is looking for baud rate information within a certain range. A serial port monitor shows that the CDC driver reports large baud rates (MAX_INT or MAX_UINT) as the baud rate. This apparently causes the exception. 

I realize this is most likely a Windows issue, but has anyone else faced this problem? If so, is their some handshaking that has to occur in the driver or definition that has to occur in the INF file to resolve the issue?

Thanks,

Dave

  • Hi Dave,

    Which type of transfer is causing the exception and what is expected responce from BBB.
    Are there any console or trace of usb transfers available?
     
    Regards,
    Murali Krishna Dama

  • The problem was in our firmware. When the windows code sent bmRequest 0x21 and 0xa1, the firmware driver in StarterWare was returning an uninitialized struct. We changed this and created a handler for SET_CONTROL_LINE_STATE which returns a valid value rather than just an ACK. WIth these changes, the .NET SerialPort class will connect without throwing an exception.