We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Serial connection error (Ubuntu 14.04 LTS)



  • I'm running Ubuntu 14.04 LTS and was trying to install the driver to connect to the Omega through USB cable.

    I followed the instruction on the website. Cut and pasted the steps immediately below:

    1. Unzip the archive.
    2. cd into the unzipped directory.
    3. Compile the driver with make
    4. cp cp210x.ko to /lib/modules/<kernel-version>/kernel/drivers/usb/serial/<kernel-version>
    5. insmod /lib/modules/<kernel-version>/kernel/drivers/usb/serial/usbserial.ko
    6. insmod cp210x.ko

    Here's the error after I typed "sudo insmod cp210x.ko":
    insmod: ERROR: could not insert module cp210x.ko: Invalid module format

    Can anyone help resolve this error? Thanks!


  • administrators

    @Enrico-Bermudez Just to rule out the most obvious, did you substitute <kernel-version> with the version of the Kernel your system is running?

    Also are you running these commands as super user?



  • Thanks for the quick response, Lazar.

    Yes, I did both: (1) replaced <kernel-version> with my kernel version, and (2) ran the commands with sudo.

    Kernel version is 3.16.0-53-generic



  • You may actually not need to go through the instructions to install the kernel module by hand. At least on Ubuntu 15.10 the kernel module already exists. I'm not sure how far back this goes though -- maybe it didn't in 14.04.

    But you can check to see if it's available by running "modinfo cp210x" -- if you get a bunch of info, the module is available already. (You'll get "modinfo: ERROR: Module cp210x not found." otherwise.)


  • administrators

    @fader Thanks! I've added a step in the Get Started guide to check if the driver is already installed.



  • Thanks...progress, I think.

    1. entering 'modinfo cp210x' gives me a lot of info. So this tells me it's installed.
    2. I also checked to see if 'modinfo usbserial' will also give me some info. And yes, it does.

    This is where I see a problem...

    when I execute 'ls /dev/ttyUSB*', I get nothing. (No such file or directory)

    The Omega is powered up and turned on. I can access it via wifi... but I can't access it via USB (and it looks like the USB attachment is not being detected).

    I'm currently connecting my computer to the USB port of the Extension Dock.



  • @Enrico-Bermudez said: Can you try ls /dev/tty.USB*. You missed the dot in the command you posted previously.



  • I tried 'ls /dev/tty.USB*' also -- and it didn't any file.
    Screenshot immediately below:
    Screenshot from 2015-12-04 12:36:59.png

    Here's where I got the command without the period (from the Getting Started webpage).
    Screenshot from 2015-12-04 12:34:55.png

    By the way, I just switched to the MiniDock, in case there's something wrong with my Extension Dock. Same results when using the MiniDock.

    Thanks for the help!



  • @Enrico-Bermudez Oh, that's my mistake. I was so used to the tty naming convention under mac. /dev/ttyUSB* is correct for Linux.

    Hmmm, were you able to run sudo insmod /lib/modules/<kernel-version>/kernel/drivers/usb/serial/usbserial.ko line okay? That should have installed the kernel module already...



  • I ran it, but from what I recall, I ran into an error the first time I ever ran it. It says the file exists.

    Screenshot from 2015-12-04 13:06:38.png

    When I ran 'modinfo usbserial', I got information back. So I assume that it's already installed. But to be honest, I don't recall whether it was already installed before I embarked on tinkering with the Omega.



  • @Enrico-Bermudez Can you cp the file into /lib/modules/<kernel-version>/kernel/drivers/usb/serial/ under a different name, and try to insmod again? One possible reason is that the usbserial.ko is for a different USB-serial driver, and the current one can't be installed because of a name conflict.



  • Do you mean copy the cp210x.ko into that folder (under a different name) and run insmod again using that file?





  • Same result as the original error message: Invalid module format.

    Screenshot from 2015-12-04 13:46:54.png



  • @Enrico-Bermudez What happens if you do insmod with -f flag?



  • Using -f, I still get the same error "Invalid module format"



  • @Enrico-Bermudez Really strange.. I think i will setup a Ubunt 14.04 installation and try it out myself. I will let you know if I discover anything. Meanwhile, I can confirm that they work on Ubuntu 15.04 and 15.10.


  • administrators

    @Enrico-Bermudez can you post a photo of your Omega setup?



  • I had a problem in windows where it wouldnt recognise the device, it would power fine though. I had a cheap cable that stopped being able to charge my iphone (with a lightning adapter).

    I changed my cable and it started to recognise it. I wonder if the kernel recognises the serial device (as did my winblows machine) but cant access it properly.

    Worth a punt



  • @Enrico-Bermudez If the module is present already (i.e. modinfo gives you output), try just "sudo modprobe cp210x". That should make Linux pull in all the dependencies automatically and be easier to deal with than insmod.

    (Also worth noting on Ubuntu, when /dev/ttyUSB0 gets created, no user account will have permission to access it. You'll need to use "sudo screen /dev/ttyUSB0 115200" or add yourself to the dialout group with "sudo usermod -a -G dialout [your_user_name]" and then log out and back in again.)



Looks like your connection to Community was lost, please wait while we try to reconnect.