Skip to main content
deleted 1 character in body
Source Link
Zibri
  • 573
  • 5
  • 9

Programs that talk to serial devices:

picocom
minicom
socat

or from shell you can do:

stty -speed 19200 < /dev/ttyS0 # sets the speed of the port
exec 99<>/dev/ttyS0 (or /dev/ttyUSB0...etc)
printf "AT\r" >&99
read answer <&99  # this reads just a CR
read answer <&99  # this reads the answer OK
exec 99<>&99>&-

Programs that talk to serial devices:

picocom
minicom
socat

or from shell you can do:

stty -speed 19200 < /dev/ttyS0 # sets the speed of the port
exec 99<>/dev/ttyS0 (or /dev/ttyUSB0...etc)
printf "AT\r" >&99
read answer <&99  # this reads just a CR
read answer <&99  # this reads the answer OK
exec 99<>&-

Programs that talk to serial devices:

picocom
minicom
socat

or from shell you can do:

stty -speed 19200 < /dev/ttyS0 # sets the speed of the port
exec 99<>/dev/ttyS0 (or /dev/ttyUSB0...etc)
printf "AT\r" >&99
read answer <&99  # this reads just a CR
read answer <&99  # this reads the answer OK
exec 99>&-
added 65 characters in body
Source Link
Zibri
  • 573
  • 5
  • 9

Programs that talk to serial devices:

picocom
minicom
socat

or from shell you can do:

stty -speed 19200 < /dev/ttyS0 # sets the speed of the port
exec 99<>/dev/ttyS0 (or /dev/ttyUSB0...etc)
printf "AT\r" >&99
read answer <&99  # this reads just a CR
read answer <&99  # this reads the answer OK
exec 99<>&-

Programs that talk to serial devices:

picocom
minicom
socat

or from shell you can do:

exec 99<>/dev/ttyS0 (or /dev/ttyUSB0...etc)
printf "AT\r" >&99
read answer <&99  # this reads just a CR
read answer <&99  # this reads the answer OK
exec 99<>&-

Programs that talk to serial devices:

picocom
minicom
socat

or from shell you can do:

stty -speed 19200 < /dev/ttyS0 # sets the speed of the port
exec 99<>/dev/ttyS0 (or /dev/ttyUSB0...etc)
printf "AT\r" >&99
read answer <&99  # this reads just a CR
read answer <&99  # this reads the answer OK
exec 99<>&-
Source Link
Zibri
  • 573
  • 5
  • 9

Programs that talk to serial devices:

picocom
minicom
socat

or from shell you can do:

exec 99<>/dev/ttyS0 (or /dev/ttyUSB0...etc)
printf "AT\r" >&99
read answer <&99  # this reads just a CR
read answer <&99  # this reads the answer OK
exec 99<>&-