Results 1 to 2 of 2

Thread: How to permanently change /dev/ttyS0

  1. #1
    Join Date
    Jan 2006
    Location
    Örebro, Sweden
    Beans
    491

    How to permanently change /dev/ttyS0

    I have a GPS device that can only be configured to connect to a serial port (/dev/ttyS*).

    I don't have any true serial ports on my computer, so I'm using a serial-to-USB adapter and have removed /dev/ttyS0 and added a symlink to /dev/ttyUSB0 instead.

    This works well, but every time I reboot, the symlink is gone and /dev/ttyS0 is back.

    Is there a way to make this change permanent?

  2. #2
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,180
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How to permanently change /dev/ttyS0

    You could probably change whatever boot script that sets up the /dev/ttyS0 in the first place to make the link instead, but I have no idea how to do that.
    So I guess you could set up a script to do remove /dev/ttyS0 and create the link during boot.
    Try putting something like this in your /etc/rc.local:
    Code:
    rm /dev/ttyS0
    ln -s /dev/ttyUSB0 /dev/ttyS0

Bookmarks

Posting Permissions

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