Main Site Documentation

Usb_cdc and linux


#1

I coded a sensor application for a fez board which just reads data from sensors and sends it to PC using USB_CDC.
On windows, thanks to the GHI_NETMF_Interface_with_CDC driver, I can read the sensor data from COM4.

Is there anyway to read that data from a linux computer? Do you have any linux driver just for serial communication (not for debugging or deploying)?

Or is there any other way to read data on a Fez board from a Linux computer without buying a USB->Serial cable?


#2

This is standard CDC and it should work on any OS with support for CDC. Does your Linux version include CDC support?

No need for drivers on Mac or Linux


#3

I wish everything could be as simple as that.
Linux (ubuntu) notice a cdc device is connected, however, it does not recognize it.
Therefore, it does not assign a tty channel for that.


#4

Unfortunately, we do not have a linux machine here to try it fro you.


#5

Are you using CDC only or CDC+Debug ? CDC only should works on linux (But not on Mac).

The problem is that GHI implementation of CDC does not follow the Specs as windows itself not follow it either. Linux drivers were modified to accept this but Apple refuses to change the driver.

As far as I know it should work on linux as they modified the drivers to not complain the specs either.

It would be great if this bug could be corrected (Following the USB cdc specs). I cant remember what was the problem.


#6

Just an update on my original question in case anyone else also needs:

I checked my fez board on 3 different computers. On debian (kernel 2.6.32), cdc-acm works as it should.

However, on ubuntu (kernel 2.6.35) it does not. After plugging the usb, no configuration is assigned on ubuntu. I tried everything to the best of my knowledge (such as defining new dev/rules with specific vendor and product ids), however I was not able to get any success. I guess ubuntu is the source of the problem.


#7

I’m pretty sure that the problem is the CDC on the Usbizi chipset thats why it only works good on windows and some of linux distros. I cant remember what was the problem. In some distribution of linux the drivers where changed and some internal check is commented out to manage this. As far as I remember it was some byte on the ID of the USB thats its not following the original spec.
I’m not an USB expert so I couldnt tell you more than this (It would be different if we were talking about ethernet). If you look on MSP forum from texas there they have the same problem and solved it in some way on MSP side.
There is also a driver code on the code section that solve this on mac that you could use as a base for a linux driver.


#8

In fact you are right. According to the windows, the product id of the Usbizi is 0xf003. However, when I list the device properties on ubuntu with “lsusb -v” I see a completely different product id (0x0102).

I checked the google for a previous discussion that you mentioned. However I could not find anything. Do you (by any chance) remember which msp forum was that? I would like to read it.