site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM
AuthorAll Replies

dlsauers

join:2005-10-25
Wellston, OH

reply to Maxo

Re: BASH script serial input

said by Maxo:
Is it possible something like this may work?

I'll try that ... I have things working with dd and nuking its extraneous output off to /dev/null land...but it seems to miss data at points due to dd or seomthing else and thats an issue,

I really would like to get this to work with exec and telnet via ser2net.. but BASH doesn't seem to want to co-operate with

exec 6/dev/tcp/192.168.0.2/9200

When its this device.

I can telnet into it and see the line on the screen change with the data, but its one line it keeps over writing, but if I use exec in the script it never gets any data.


leibold
Premium,MVM
join:2002-07-09
Sunnyvale, CA
kudos:6
Reviews:
·SONIC.NET

said by dlsauers:

I have things working with dd and nuking its extraneous output off to /dev/null land...but it seems to miss data at points due to dd or seomthing else and thats an issue,

You put the dd command into a loop and keep opening and closing the serial device. It is no surprise that this causes you to loose data.
Make sure that you keep the serial device open ( Maxo See Profile showed an example of how to do a loop that keeps the serial port open).

As for the "one line it keeps over writing" there is apparently a difference in end-of-line handling between the old and new adapter. You may be able to compensate by using the stty options icrnl and -inlcr to convert carriage returns into new lines (line feed).
--
Got some spare cpu cycles ? Join Team Helix or Team Starfire!

Sunday, 19-May 13:07:47 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics