1

I am trying to send SMS using gammu-smsd, but it does not work.

Modem: Huawei E1550

Steps:

#vi /etc/gammu-smsdrc

port= /dev/ttyUSB0
connection = at

Then restarted gammu-smsd:

# /etc/init.d/gammu-smsd restart

SMS Sending test

echo "Test message" | gammu-smsd-inject TEXT 335123456

It does not send SMS.

Log

Sep 27 14:19:25 Dell-Laptop gammu-smsd[10285]: Going to 30 seconds sleep because of too much connection errors
Sep 27 14:19:55 Dell-Laptop gammu-smsd[10285]: Starting phone communication...
Sep 27 14:19:55 Dell-Laptop gammu-smsd[10285]: Error at init connection: Error opening device, it doesn't exist. (DEVICENOTEXIST[4])
Robin
  • 31
  • 1
  • 1
  • 6

2 Answers2

2

Be sure gammu itself is reading from a right device path, and your user profile is in dialout group.

You may need to adjust bitrate to communicate to the module, so try to initiate direct communication using as example screen /dev/ttyUSB0 115200 and see what value fits at best.

The tool gammu-detect is also available, for spotting an initial configuration with a device, so man gammu-detect for more info.

alessio
  • 136
0

I have installed Gammu and Gammu-smsd and worked with the configuration same configuration: OS: Ubuntu GSM Modem: wavecom pl2303

Output:

gammu-smsd-inject[2518]: Using FILES service
gammu-smsd-inject[2518]: Configuring Gammu SMSD...
gammu-smsd-inject[2518]: SHM token: 0x10008a8 (16779432)
gammu-smsd-inject[2518]: Warning: No PIN code in /etc/gammu-smsdrc file
gammu-smsd-inject[2518]: CommTimeout=30, SendTimeout=30, ReceiveFrequency=15, ResetFrequency=0, HardResetFrequency=0
gammu-smsd-inject[2518]: checks: CheckSecurity=0, CheckBattery=1, CheckSignal=1, CheckNetwork=1
gammu-smsd-inject[2518]: mode: Send=1, Receive=1
gammu-smsd-inject[2518]: deliveryreport = sms
gammu-smsd-inject[2518]: phoneid =
gammu-smsd-inject[2518]: Inbox is "/var/spool/gammu/inbox/" with format "unicode"
gammu-smsd-inject[2518]: Outbox is "/var/spool/gammu/outbox/" with format "unicode" and transmission format "auto"
gammu-smsd-inject[2518]: Sent SMS moved to "/var/spool/gammu/sent/"
gammu-smsd-inject[2518]: SMS with errors moved to "/var/spool/gammu/error/"
gammu-smsd-inject[2518]: Created outbox message OUTC20250521_032303_00_<phoneNumber>_sms0.txt
Written message with ID /var/spool/gammu/outbox/OUTC20250521_032303_00_<phoneNumber>_sms0.txt

Installation Guide: Connect the modem and then check if it is recognized as tty:

ls /dev/tty* | grep USB

Then give required permissions:

chmod 777 /dev/ttyUSB0

Install gammu:

apt-get install gammu

Config gammu:

gammu-config

Check the status:

screen /dev/ttyUSB0 115200

add user to dialout (Maybe you won't need this but i tried this too):

adduser user dialout

Install gammu-smsd:

apt-get install gammu-smsd

check the configuration file gammu-smsd:

nano /etc/gammu-smsdrc

Restart gammu-smsd:

/etc/init.d/gammu-smsd restart

Use gammu automatic detection:

gammu-detect

configur gammu:

mkdir -p /var/log/gammu /var/spool/gammu/{inbox,outbox,sent,error}
chown user:user -R /var/spool/gammu/*
chmod 777 -R /var/spool/gammu/*
wget -c https://raw.githubusercontent.com/antonraharja/playSMS/master/contrib/gammu/linux/gammu-smsdrc
cp gammu-smsdrc /etc/

gammu-smsdrc configs:

nano /etc/gammu-smsdrc

port = /dev/ttyUSB0 connection = at115200 logfile = /var/log/gammu/gammu.log logformat = textall [smsd] Service = files InboxPath = /var/spool/gammu/inbox/ OutboxPath = /var/spool/gammu/outbox/ SentSMSPath = /var/spool/gammu/sent/ ErrorSMSPath = /var/spool/gammu/error/ InboxFormat = unicode OutboxFormat = unicode TransmitFormat = auto debugLevel = 1 LogFile = /var/log/gammu/smsd.log DeliveryReport = sms DeliveryReportDelay = 7200 CheckSecurity = 0