Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Serial port only works after I run minicom

    I'm running the Angstrom Distro on an overo gumstick.

    I'm trying to run the obdgpslogger program.

    The program only correctly connects to the serial port after I run minicom.

    I run minicom at 9600 and no flow control.

    When I reboot the serial port goes back to its initial configuration and I can't communicate with it.

    Seems like I should use stty or setserial, but I'm confused and need some help.

    How can I configure the serial port correctly without needing to run minicom.

    All the best,

    Anthony G.

  2. #2
    try this stty command:

    stty -F /dev/ttyS0 -ixon -ixoff
    check this thread for an explanation of stty options.

    if that works, you can stick in a start-up file, to be called every time the system reboots. Look for a file like /etc/rc.local or /etc/rc.d/rc.local or similar.

  3. #3
    I tried this and it worked. I put it right before I call the obdgpslogger in the startup scripts.

    stty -F /dev/obdii -crtscts -clocal ispeed 9600 ospeed 9600
    ./obdgpslogger -s /dev/obdii -a 2 -d /home/root/obd.db &
    and I made a udev script

    # Put this in /etc/udev/rules.d/ as 99-usb-serial.rules

    # for the usb gps.
    SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="usbgps"

    # the ftdi, obdii to serial to usb
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A800JRNJ", SYMLINK+="obdi"

  4. $spacer_open
  5. #4
    that's cool with the udev stuff. you know you can even combine them: add the stty command to the udev rule. you can try something like this:

    you'd put that after one of your matching SUBSYSTEM lines.

  6. #5
    I was having issues were sometimes the gps ended up /dev/ttyUSB0 and sometimes the obdii->serial->usb converter ended up being /dev/ttyUSB0, so I needed the udev script to help differentiate the two.

    Thanks for the help!

Posting Permissions

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