Find the answer to your Linux question:
Results 1 to 9 of 9
Hi. Im working with GPS receivers and i connect them to USB, and communication is serial. To open the port i use /dev/ttyUSB0, but without reason (that i know) the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    11

    USB changes name automatically


    Hi. Im working with GPS receivers and i connect them to USB, and communication is serial.
    To open the port i use /dev/ttyUSB0, but without reason (that i know) the port changes name automatically and turn to /dev/ttyUSB1, and of course the program ends.

    Im working in Ubuntu, and i read about UUID, that it shouldnt change the name.

    I dont know how is the UUID of /dev/ttyUSB0. and /dev/ttyUSB1, because im working with 2 GPS receivers and i have to know both.

    Anyone could tell me if UUID solve my problem, and if solve how can i know the UUID of usb device?
    Then to open the port i use that UUID instead of /dev/ttyUSB0 or /dev/ttyUSB1?

    Thanks

  2. #2
    Linux Guru D-cat's Avatar
    Join Date
    Jan 2009
    Location
    Bounce between Dover, NH - Shapleigh, ME
    Posts
    1,638
    UUID is set for storage devices. There is a unique USB device serial number identifier as well.

    lsusb -v | grep -i serial

    to see what I'm talking about. How you use this to auto-reconfigure in your program, like I said in a previous post, is beyond my knowledge; I just know it can be done since that's how CUPS and SANE addresses USB printers and scanners these days.

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Posts
    11
    Quote Originally Posted by D-cat View Post
    UUID is set for storage devices. There is a unique USB device serial number identifier as well.

    lsusb -v | grep -i serial

    to see what I'm talking about. How you use this to auto-reconfigure in your program, like I said in a previous post, is beyond my knowledge; I just know it can be done since that's how CUPS and SANE addresses USB printers and scanners these days.
    can't get hub descriptor: Operation not permitted
    can't get device qualifier: Operation not permitted
    can't get debug descriptor: Operation not permitted
    cannot read device status, Operation not permitted (1)
    can't get hub descriptor: Operation not permitted
    cannot read device status, Operation not permitted (1)
    iSerial 1
    iSerial 1
    iSerial 1
    can't get hub descriptor: Operation not permitted
    cannot read device status, Operation not permitted (1)
    can't get hub descriptor: Operation not permitted
    cannot read device status, Operation not permitted (1)
    iSerial 1
    Bus 002 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
    idProduct 0x6001 FT232 USB-Serial (UART) IC
    iSerial 3
    cannot read device status, Operation not permitted (1)
    can't get hub descriptor: Operation not permitted
    cannot read device status, Operation not permitted (1)
    iSerial 1


    With that comand i have this in terminal....

    How can i use this information??

    I have already read about CUPS and SANE code, but i dont know how can solve my problem

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru D-cat's Avatar
    Join Date
    Jan 2009
    Location
    Bounce between Dover, NH - Shapleigh, ME
    Posts
    1,638
    Sorry. That's permissions related.

    Try with sudo

    sudo lsusb -v | grep -i serial

  6. #5
    Just Joined!
    Join Date
    Oct 2009
    Posts
    11
    Quote Originally Posted by D-cat View Post
    Sorry. That's permissions related.

    Try with sudo

    sudo lsusb -v | grep -i serial
    iSerial 1 0000:00:1d.7
    iSerial 1 0000:00:1d.3
    iSerial 1 0000:00:1d.2
    iSerial 1 0000:00:1d.1
    Bus 002 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
    idProduct 0x6001 FT232 USB-Serial (UART) IC
    iProduct 2 usb serial converter
    iSerial 3 ftDC8T6O
    iInterface 2 usb serial converter
    iSerial 1 0000:00:1d.0

  7. #6
    Linux Guru D-cat's Avatar
    Join Date
    Jan 2009
    Location
    Bounce between Dover, NH - Shapleigh, ME
    Posts
    1,638
    Okay then. You do have some issue here... it looked good to me (this is mine)...
    Code:
      iSerial                 1 0000:00:1d.3
      iSerial                 1 0000:00:1d.0
      iSerial                 3 336117
      iSerial                 4 36716
      iSerial                 3 DRXS70URMP100019E30 
      iSerial                 1 0000:00:1d.7
      iSerial                 1 0000:00:1d.2
      iSerial                 0
      iSerial                 0
      iSerial                 0
      iSerial                 3 0002761A131B
      iSerial                 1 0000:00:1d.1
    If you don't use the grep, you can see the whole tree where each one belongs... my example above shows (bolded lines, in order):
    Printer
    USB Card Reader
    USB DVD-RW Driver
    Bluetooth adapter

    What's not in this output is my scanner, which identifies as
    "pixma:04A91727_336117" to sane (yes the last digit set is the same as the printer... it's a Canon Pixma AIO). This tells me there's more to the usb interface than lsusb shows, so maybe my example to you was bunk, but there has to be a way. I'm sorry I'm not being more useful.

  8. #7
    Just Joined! claudiu's Avatar
    Join Date
    Dec 2009
    Location
    Bucharest, Romania
    Posts
    16
    This could be caused by your program.
    Try and connect devices to all usb ports and see what happens then.

  9. #8
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Quote Originally Posted by Marin_ View Post
    Well if i go to filesystem the device that appears there is not USB0 but USB1. I dont understand why USB0 disappears and turn on USB1.
    Hown can i solve this? i have 2 GPS receivers so i need both USB0 and USB1.
    I'm not sure that it will work or help in your case, but you could always try experimenting with some custom udev rules:

    Writing udev rules
    oz

  10. #9
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    I have seen this before with my usb stick. If I forget to unmount it and just unplug it then plug it back in again I have to use another USB port as the one it was connected to thinks that it is still mounted and will not allow it to be used thus causing me to have to move to another port i.e., usb0 to usb1. This might be what is happening in your case. Your system stops using this port but because it doesn't see any activity and once you start using it again it wants you to use a different port. Might try to send a simple ping or something over the connection every so often to make your system think it is still alive. Might just have to keep the circuit busy somehow so that it knows that you are using usb0. Maybe the device powers down after x amount of time not being used.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •