Author Topic: Problem whit newcs and /dev/ttyS0  (Read 3863 times)

mami

  • Regular Poster
  • **
  • Posts: 34
    • View Profile
Problem whit newcs and /dev/ttyS0
« on: April 14, 2008, 02:20:59 pm »
My problem whit newcs is that i allways get: "Reset faild..." when starting.
If i unplug the card from reader and plug it in again, then restart newcs it starts working.

I think the problem has something to do whit HAL becouse it uses the port /dev/ttyS0 that i want to use. It's the only Com-port on my computer, so i realy need it. Or is it something else?
I have fixed so newcs starts before HAL when booting, but did'nt help...

/Mami

nosilla99

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: Problem whit newcs and /dev/ttyS0
« Reply #1 on: April 14, 2008, 10:32:36 pm »
@masmi

LMCE is trying to manage the serial port, to avoid this type of conflict you can edit /usr/pluto/bin/ListSerialPorts.sh.

If LMCE does not need to use the serial or usb ports then just place an exit at the top of the file.

NOS

mami

  • Regular Poster
  • **
  • Posts: 34
    • View Profile
Re: Problem whit newcs and /dev/ttyS0
« Reply #2 on: April 15, 2008, 06:49:54 pm »
Thnx, it work.

But say, if I want to have more com-ports in the future. Can i then exclude /dev/ttyS0 in some way?

/Mami

nosilla99

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: Problem whit newcs and /dev/ttyS0
« Reply #3 on: April 15, 2008, 08:24:51 pm »
Thnx, it work.

But say, if I want to have more com-ports in the future. Can i then exclude /dev/ttyS0 in some way?

/Mami

Here is my Ports line which only detects ttyS1-ttyS4 i.e. it excludes LMCE from using ttyS0

Code: [Select]
if [[ -f /proc/tty/driver/serial ]]; then
Ports=$(cat /proc/tty/driver/serial | grep -v unknown | grep '[1-4]: ' | cut -d: -f1)
for i in $Ports; do
echo "/dev/ttyS$i"
done
fi

NOS

mami

  • Regular Poster
  • **
  • Posts: 34
    • View Profile
Re: Problem whit newcs and /dev/ttyS0
« Reply #4 on: April 17, 2008, 05:10:11 pm »
Many thnx for that.  :D

/Mami