Skip to content

Instantly share code, notes, and snippets.

@b-alidra b-alidra/
Last active Jul 1, 2019

What would you like to do?
Send AT commands using atinout to Huawei E3531 modem after Kannel service has started
while ! sudo systemctl is-active --quiet $SERVICE; do
echo "waiting the $SERVICE service to start"
sleep 10
echo "$SERVICE service started"
echo "Wait 30 more seconds for initialization"
sleep 30;
# Select Message Service
echo "Setting CSMS..."
echo "AT+CSMS=1" | $ATINOUT_BIN - $TTY -
echo ""
echo "Checking CSMS..."
echo "AT+CSMS?" | $ATINOUT_BIN - $TTY -
echo ""
# Indicate new messages to TE
echo "Setting CNMI..."
echo "AT+CNMI=1,2,0,1,0" | $ATINOUT_BIN - $TTY -
echo ""
echo "Checking CNMI..."
echo "AT+CNMI?" | $ATINOUT_BIN - $TTY -
echo ""
# Report Mobile Termination Error
echo "Setting CMEE..."
echo "AT+CMEE=1" | $ATINOUT_BIN - $TTY -
echo ""
echo "Checking CMEE..."
echo "AT+CMEE?" | $ATINOUT_BIN - $TTY -
echo ""
/home/pi/ > /home/pi/e3531_init.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.