Should be dead simple - read/write serial port from bash
Hi, I can only use bash for this and although there are many C examples just need the basics of reading & writing to a serial port, its controlling a modem.
I'm trying things like this #!/bin/sh echo ATD555667676; > /dev/ttyS1 read LINE < /dev/ttyS1 echo $LINE but its not sending it (minicom is fine, its not a hardware problem). Basically I just need the read and write commands, I want to do things like "Send AT", wait for "OK", "Dial number" when recieved, if "BUSY" then blah blah... Thanks in advance |
Quote:
echo ATD555667676 > /dev/ttyS1 |
Hi
I'm having some troubles reading the serial por using cat /dev/ttyS0 since the data received does not have the return carriage (char 13), insted of it uses the char 20 to idicate the end of transmission. Any sugestions how to print or read the buffer without using cat Mario |
How are you setting the baud rate and flow control parameters. Modems are especially picky.
|
All times are GMT -5. The time now is 01:44 AM. |