Author |
Post |
|
#1 Sat Jul 22, 2017 07:38, 89 months ago.
|
Member
Registered: Jul 2017
Location: Italy
|
Good morning, my gsm modem has some GPIO pins that can be controlled by an AT command. The question is: is it possible to send AT commands to the modem via the eventhandler (so I can control the onboard GPIO sending a SMS) ? I was unable to find this. Thank you. « Last edit by it9xxs on Sat Jul 22, 2017 07:42, 89 months ago. »
|
|
#2 Sat Jul 22, 2017 15:45, 89 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
You could use regular_run feature to send commands. Define a modem setting regular_run_cmdfile = /var/spool/sms/GSM1.cmd. In eventhandler create this file with proper command. When this file exists, smsd will send commands to the modem and deletes the file. Also define regular_run_interval = 1 to make the commands run quickly enough.
|
|
#3 Sat Jul 22, 2017 16:47, 89 months ago.
|
Member
Registered: Jul 2017
Location: Italy
Topic owner
|
keke thank you very much for your reply. I did not know the regular_run option. Now I have to realize how to put the the at string properly (e.g. AT+WIOW=2,1) inside the .cmd file. Regards
|
|
#4 Sat Jul 22, 2017 19:21, 89 months ago.
|
Member
Registered: Jul 2017
Location: Italy
Topic owner
|
Hi keke, it worked flawlessly ! Thank you again !
|