2

I have gammu-smsd up and running on a raspberry-pi with jessie. I am using runonreceive to process incoming texts. I have the following script working using runonreceive. In the script I am calling gammu sendsms instead of gammu-smsd-inject as the documentation states. All other references state gammu will not work while gammu-smsd daemon is running. The only reason I got this to work is after pulling my hair out trying to get gammu-smsd-inject to work. Can anyone explain what is going on?

RunOnReceive = /home/jaalfs/bin/sms_back.sh

sms_back.sh

#!/bin/bash
from=$SMS_1_NUMBER
echo "sms_back" >> /home/jaalfs/bin/sms_back.log
echo "Test from: $from" >> /home/jaalfs/bin/sms_back.log
echo -e "\n"
if [ "$from" != "+1310xxxxxxx" ]; then
    echo -e "not accepted number \n" >> /home/jaalfs/bin/sms_back.log
    exit 0
else
    echo "accepted number" >> /home/jaalfs/bin/sms_back.log
    echo "hello world!!!!!!" | sudo gammu sendsms TEXT "$from"
    echo -e " text sent back \n" >> /home/jaalfs/bin/sms_back.log
    exit 0
fi
exit 1
Jake
  • 21
  • 4
  • Gammu and Gammu SMSD usually do not play nicely together as both are accessing same device and may end up reading responses which was expected by other tool. What is your problem with gammu-smsd-inject? – Michal Čihař Apr 29 '16 at 06:59
  • Please check if you gammu is calling your script if yes then try to include your config in `echo "hello world!!!!!!" | sudo gammu sendsms -c /path/to/your/smsdrc TEXT "$from"` let me know if it works :) – Bevin NIno Jun 24 '21 at 03:38
  • Bevin, I appreciate the help. Regrettably, I am not trying to get gammu to work anymore so I can't provide feedback. I hope this helps someone else. – Jake Jul 01 '21 at 17:45

0 Answers0