Rev 4 March 2019
The first time you connect, you are prompted to change your Linux root pass-
word.
For more information, refer to the Legato shell documentation on
Useful Linux commands
Useful Linux commands include:
•
Get device information: cm info
•
Get SIM information: cm sim
•
Get APN status: cm data
•
Get modem status: cm radio
•
Switch to AT mode: microcom -E /dev/ttyAT
<CTRL +x> to escape
•
Read GPIO Value: cat /sys/class/gpio/gpioxx/value
•
Set GPIO: echo 1 > /sys/class/gpio/gpioxx/value
•
Clear GPIO: echo 0 > /sys/class/gpio/gpioxx/value
•
Establish a data connection: cm data connect
•
Check Legato application status: app status
For a complete list of Linux commands, see:
http://legato.io/legato-docs/latest/toolsTarget_cm.html
Here are some Linux shell command examples for GPIOs:
Table 2-6: Linux shell command examples
To...
Turn on the green User LED
Turn off the green User LED
Read the push button state
Read the analog input value (in µV)
33
Installation and Startup
Use...
echo 0 > /sys/class/gpio/gpio48/value
echo 1 > /sys/class/gpio/gpio48/value
cat /sys/class/gpio/gpio7/value
cat /sys/class/hwmon/hwmon0/device/mpp_05
legato.io
41110030