[Reference] Naming USB serial ports on Linux

Questions about the Waspmote board and its modules
Post Reply
libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

[Reference] Naming USB serial ports on Linux

Post by libelium-dev » Thu Oct 17, 2013 12:53 pm

(just for Linux users)

Dear all,

There is a unique serial number associated which each Waspmote FTDI driver, that can be used to associate a "friendly name" to each Waspmote. This will allow to easy recognize each Waspmote when you are playing with many at the same time. Just follow next process.
  1. Connect a Waspmote to the computer and ensure it is in dev/ttyUSB0.
  2. Open a terminal and type: udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | head -n1.
    It will answer with the serial number associated with this dev/ttyUSB0.

    Image


    Repeat this operation with all of your Waspmotes to obtain each serial number.
  3. Go to path: /etc/udev/rules.d and create a file called "99-usb-serial.rules" (You will need root access).

    Image
  4. Now edit the file and add lines like next ones:
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", TTRS{serial}=="A800eWJf", SYMLINK+="gateway"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AE01H77H", SYMLINK+="waspmote"

    Where the orange field is the serial number, and the green field is the friendly name.

    Create as many lines as you need for your devices.

    Image
  5. In this way, every time you connect the same device, the "gateway" device will appear pointing to the right device.

    Image
  6. Now you can use a serial monitor to open the right port. The image below shows cutecom, which allows opening ports named with friendly names, as "gateway", etc.

    Image
Note: This FTDI serial number is not related with the Waspmote serial ID. they are different numbers.

Note 2: The IDE version v03 does not recognize serial ports named with friendly names. This feature will be included in the future.

Source: http://hintshop.ludvig.co.nz/show/persi ... l-devices/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest