There is a GSM module with which you need to send SMS. I was able to send an SMS using the AT command through minicom, now the task is to send an SMS right away from the Linux terminal, in order to put these commands into the program on Golang to find how to do it using echo , but nothing happened:

 echo -e 'AT+CMGS="89169478466"\n' > /dev/ttyAMA0 echo -e 'qwerty\n' > /dev/ttyAMA0 echo -e '^Z' > /dev/ttyAMA0 

GSM module is connected to /dev/ttyAMA0

  • And if you try in one line? echo -e 'AT+CMGS="89169478466"\nqwerty^Z' > /dev/ttyAMA0 - Herman Borisov

1 answer 1

sudo apt-get install gammu sudo gammu-config

Initial configuration Final configuration

 echo "Dragon Ball super is Awsome!" |sudo gammu --sendsms TEXT 8********** 

https://techexpert.tips/ubuntu/send-sms-from-ubuntu-linux-command-line/