I have on my git repo two basic branches; master und develop They have 2 Task, tests and deploy_for_development This $DEV_USERNAME,$DEV_PASSWORD $DEV_HOST variables saved under GitLab CE -> Repo -> CI/CD Settings, like this.
Category Archives: Server
Raspberry Pi Zero W + USB Modem – SMS Gateway
Install usb-modeswitch
1 |
sudo apt-get install usb-modeswitch usb-modeswitch-data |
Install smstools
1 |
sudo aptitude install smstools |
Find Right Device and PORT with this Command;
1 |
sudo wvdialconf |
…Found my modem information like this, Modem on ttyUSB1 and Speed 9600…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. ttyUSB1<*1>: ATQ0 V1 E1 -- OK ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- ERROR ttyUSB1<*1>: ATQ0 V1 E1 &C1 -- ERROR ttyUSB1<*1>: ATQ0 V1 E1 &D2 -- ERROR ttyUSB1<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED ttyUSB1<*1>: Speed 9600: AT -- OK ttyUSB1<*1>: Max speed is 9600; that should be safe. ttyUSB1<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud ttyUSB2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. ttyUSB3<*1>: ATQ0 V1 E1 -- OK ttyUSB3<*1>: ATQ0 V1 E1 Z -- OK ttyUSB3<*1>: ATQ0 V1 E1 S0=0 -- ERROR ttyUSB3<*1>: ATQ0 V1 E1 &C1 -- ERROR ttyUSB3<*1>: ATQ0 V1 E1 &D2 -- ERROR ttyUSB3<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK ttyUSB3<*1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED ttyUSB3<*1>: Speed 9600: AT -- OK ttyUSB3<*1>: Max speed is 9600; that should be safe. ttyUSB3<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK Found a modem on /dev/ttyUSB1. Modem configuration written to /etc/wvdial.conf. ttyUSB1<Info>: Speed 9600; init "ATQ0 V1 E1 +FCLASS=0" ttyUSB3<Info>: Speed 9600; init "ATQ0 V1 E1 +FCLASS=0" |
Modify your smsd.conf
1 |
sudo nano /etc/smsd.conf |
my smsd.conf with founded Modem information like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
devices = GSM1 outgoing = /var/spool/sms/outgoing checked = /var/spool/sms/checked incoming = /var/spool/sms/incoming logfile = /var/log/smstools/smsd.log infofile = /var/run/smstools/smsd.working pidfile = /var/run/smstools/smsd.pid outgoing = /var/spool/sms/outgoing checked = /var/spool/sms/checked failed = /var/spool/sms/failed incoming = /var/spool/sms/incoming sent = /var/spool/sms/sent stats = /var/log/smstools/smsd_stats [GSM1] #init = device = /dev/ttyUSB1 incoming = yes pin = 1234 baudrate = 9600 |
Restart then smstools3
1 |
sudo /etc/init.d/smstools restart |
For Testing Create a file under /var/spool/sms/outgoing/ Folder. I create like:
1 |
sudo nano /var/spool/sms/outgoing/mysms |
[…]