Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Loading on stty on startup
Thank you for your donation

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Loading on stty on startup
21st Aug, 2014, 11:41 PM
Post: #1
Groormat Offline
Registered
Posts: 9
Joined: Apr 2014
Reputation: 0
Loading on stty on startup
Hi there,

i am using an Arduino on one of the USB-Ports. Its accessible over /dev/ttyUSB0.

But if i want to communicate with it its restarting every time. So i have to call stty before:
Terminal
/bin/stty -F /dev/ttyUSB0 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts

After that i can echo commands to the arduino:
Terminal
echo "blink" > /dev/ttyUSB0

Which is the best way to automate this? I want this be done so i dont have to interact via ssh.

I tried it with udev, but it dont seem to work:
Terminal
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", RUN+="/bin/stty -F /dev/ttyUSB0 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts"
Find all posts by this user
8th Oct, 2014, 01:27 PM
Post: #2
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Loading on stty on startup
use /etc/init/tty1.conf as template

cp it to another name - even ardruino.conf

change the getty call for your command line.

also change "start on ......" to "start on startup" (if it is different)

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 10th May, 2025, 04:19 AM Powered By MyBB, © 2002-2025 MyBB Group.