I believe you need the port of the sensor device. The physical port for the host USB may logically look like several devices depending on what you have plugged in there (e.g. a hub with several more devices).
A good trick is to plug in your sensor and then at the terminal, type in:
# dmesg | tail
That will show you the last 10 messages which should cover events related to detecting your USB device. You may need to filter dmesg in other ways to get at the specific device name you need. For example:
# dmesg | grep ttyUSB
I got this when looking at dmesg when I plugged in my device:
[ 547.739729] usb 1-1: USB disconnect, device number 2
[ 552.200342] usb 1-1: new full-speed USB device number 3 using ohci_hcd
So at least its being recognized, but I still can't seem to find where it would be in /dev
Do those messages tell you where it might be?
Are those the only 2 relevant lines you see? The ohci_hcd looks like generic, USB 1.x support. I suspect that the module to support the serial interface is not present / loading.
Can you give more detail about the sensor?
Its basically just a powered antenna that is usually connected with RS485 but this one has a USB interface.
In the past I've connected it to the Raspberry Pi and that worked right away.
Do you know if Galileo's Yocto has support for USB-Serial? I thought it did.
I've not tried connecting a USB serial peripheral to Galileo but will when I get a chance. If you have your Raspberry Pi handy, you could look at dmesg and / or lsusb there (lsusb on Galileo may give some hints too) to see what module is loading to support it. Of course do this right after connecting it.
Here's what I get on my Raspberry Pi:
[ 2.375805] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[ 2.500185] usb 1-1.2: New USB device found, idVendor=0403, idProduct=6001
[ 2.501935] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.503513] usb 1-1.2: Product: USB-RS485 Cable
[ 2.505037] usb 1-1.2: Manufacturer: FTDI
[ 2.510594] usb 1-1.2: SerialNumber: FTWDC5UD
[ 2.965349] udevd: starting version 175
[ 4.460745] usbcore: registered new interface driver usbserial
[ 4.463872] usbcore: registered new interface driver usbserial_generic
[ 4.509744] usbserial: USB Serial support registered for generic
[ 4.572162] usbcore: registered new interface driver ftdi_sio
[ 4.573933] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 4.675925] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[ 4.677870] usb 1-1.2: Detected FT232RL
[ 4.679479] usb 1-1.2: Number of endpoints 2
[ 4.681028] usb 1-1.2: Endpoint 1 MaxPacketSize 64
[ 4.682524] usb 1-1.2: Endpoint 2 MaxPacketSize 64
[ 4.683951] usb 1-1.2: Setting MaxPacketSize 64
[ 4.912634] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
Looks like it has the proper drivers, specifically "driver usbserial"
I thought that Yocto had usbserial installed, but now I'm not so sure.
The raspberry Pi uses a standard Linux image and many USB serial adapters are supported in the standard Kernels. The Galileo uses a custom image, that is reduced as much as possible to make it small in size. It would not surprise me at all if it did not include the drivers needed for a USB to Serial device.
But installing the driver should not be too difficult.
How would I go about installing the driver?
Unfortunately, the information I am getting from google looks like it might require a rebuild of the kernel.
There seem to be several people who say the ohci_hcd is causing their USB device to not work. So, maybe removing that from the kernel will allow your device to work?
I have also found other posts about how to insert the USB-Serial into the kernel.
How can I "install" a driver for a USB-to-Serial adapter? - Ask Ubuntu
All of this information is third hand. I am not a Linux expert, I just know how to google. :-)
I see the usbserial.ko in the 0.7.5 devtools build from AlexT_Intel at http://telekinect.media.mit.edu/galileo/image-0.7.5-2.tar.bz2. I do not see the ftdi_sio module. I suspect that could be loaded as a user module but I'm not sure.
The source can be found directly through FTDI at http://www.ftdichip.com/Drivers/VCP/Linux/ftdi_sio.tar.gz.
Using the devtools SD image I mentioned above, it should be possible to build it for Galileo. There may be dependencies that make this more complicated.
LeonK, this assumes that you switch to a Linux build that has development tools and are OK building the module and trying to get it to load (a good guide for that is at http://ftdi-usb-sio.sourceforge.net/).
Hope that helps. I'm very interested in your results if you forge ahead. I have an FTDI part that I may want to use someday too so this will go on my list of things to try.
Thanks. I'm going to try and see if I can get this to work.
Hi Leon, okay, so that's the setup you were asking abount in PM :-)
Let's see. Propst had all the good suggestions for you (kudos on that!). As far as I can see Raspberry Pi uses the following modules to make it work:
Looking at the standard kernel config I see all of them but the last one are actually enabled, means - built. They may not be loaded by default though, but that's just a question of "modprobe <drivername>" for manual load and adding them into certain file under /etc - for automatic one.
Now the ftdi_sio is the one that needs to be built. The most straightforward way is to add the respective kernel config option and build the kernel. But that may be too much hassle for the task if that's your only goal. Let me see if i can build a package for you with that module, or at least provide you with the module binary itself at least, the latter shouldn't be too hard.
Okay, here goes the ftdi_sio module:
- or "opkg install kernel-module-ftdi-sio" (don't forget to enable the repo by following instructions here)
- or build the image after enabling the recipe in recipes-addfeatures/enable_ftdi_sio subdir of my repo
You'll need to load the usbserial and ftdi_sio modules manually using modprobe after you have them installed.
Try it out and let's see what you get after enabling these two modules and connecting your sensor.
Thank you so much Alex! I'm going to try this and see if I can get it to work.