G
@Suman-kumar-Jha One more time
This was the originally installed '/sbin/yunbridge' file on Omega2(+) :
root@Omega-5BE1:/# cat /sbin/yunbridge
#!/bin/sh
stty -F /dev/ttyS0 2500000 clocal cread cs8 -cstopb -parenb
exec < /dev/ttyS0
exec > /dev/ttyS0
exec 2> /dev/ttyS0
askfirst bin/ash --login
I've modified it because
we can't set either 250000 (ie. 250,000 250 kBaud) or 2500000 (ie 2,500,000 2.5 MBaud) with the stty command
and ttyS0 (UART0) is occupied by the Serial Console on Omega2(+) - so I tried to use ttyS1 (UART1) instead
This is the modified '/sbin/yunbridge' file:
root@Omega-5BE1:/# cat /sbin/yunbridge
#!/bin/sh
stty -F /dev/ttyS1 115200 clocal cread cs8 -cstopb -parenb
exec < /dev/ttyS1
exec > /dev/ttyS1
exec 2> /dev/ttyS1
askfirst bin/ash --login
That's it!
I think 115200 Baud is a good choice. It's good for all - for Omega2, Arduino, Arduino Bridge, Arduino IDE, ...
IMO the serial line speed is not the most important problem in this five-liner script now.
BTW please try it what you want:
root@Omega-5BE1:~# stty -F /dev/ttyS1 250000
stty: invalid argument ‘250000’
Try 'stty --help' for more information.
root@Omega-5BE1:~# stty -F /dev/ttyS1 2500000
stty: /dev/ttyS1: unable to perform all requested operations
root@Omega-5BE1:~# stty -F /dev/ttyS1 115200
root@Omega-5BE1:~# stty -F /dev/ttyS1
speed 115200 baud; line = 0;
-brkint -imaxbel