Glam Prestige Journal

Bright entertainment trends with youth appeal.

I need to init, with AT commands, a mobile modem without external libraries using only bash on minimal BusyBox. The mobile modem is on a serial port.

It s working well with python but in case of python issues, the device should be still connected. That's why I want to use bash script.

2

1 Answer

stty cheatsheet :

To get current configuration :

stty -F /dev/ttymxc0

To change baudrate of port to 115200 :

stty -F /dev/ttymxc0 115200

Write data to serial port :

echo "HELLO" > /dev/ttymxc0

Read data from serial port :

cat /dev/ttymxc0

To get statistics on serial port:

cat /proc/tty/driver/<driver_name>

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy