Note: i've had a problem with the stock 2.6 kernel and installed 3.14 kernel-ml from elrepo.
screen /dev/cu.usbserial-A7022UE0 115200
yum install ntp # vi /etc/ntp.conf # update servers chkconfig ntpd on ntpdate ntp1.polaire.nl service ntpd start
yum install minicom
# dmesg |grep -i huawei usb 1-2: Product: HUAWEI Mobile usb 1-2: Manufacturer: Huawei Technologies dmesg |grep CDC cdc_ether 2-1:2.0 eth3: register 'cdc_ether' at usb-0000:00:13.2-1, CDC Ethernet Device, 00:a0:c6:41:37:70
# ls /dev |grep -i ttyusb ttyUSB0 ttyUSB1 ttyUSB2 ttyUSB3 ttyUSB4
minicom -s
AT+CREG? +CME ERROR: SIM PIN required
AT+CPIN="1234" OK ^SIMST: 1 ^SRVST: 2 AT+CPIN? +CPIN: READY OK
AT+COPS? +COPS: 0,0,"simyo",2 OK
AT+CREG? +CREG: 0,1 OK
AT+CSQ +CSQ: 17,99 OK
yum install smstools
chkconfig smsd on
[GSM1] device = /dev/ttyUSB2 incoming = yes pin = 1234 # disable unsolicited results (like ^RSSI) init = AT^CURC=0
2014-05-30 10:27:23,2, smsd: Smsd v3.1.15 started. 2014-05-30 10:27:23,2, smsd: Running as smstools:smstools. 2014-05-30 10:27:23,7, smsd: Running startup_check (shell): /var/spool/sms/incoming/smsd_script.a7tj8n /tmp/smsd_data.4OfwfP 2014-05-30 10:27:23,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0 (0) 2014-05-30 10:27:23,4, smsd: File mode creation mask: 022 (0644, rw-r--r--). 2014-05-30 10:27:23,5, smsd: Outgoing file checker has started. PID: 1273. 2014-05-30 10:27:23,7, smsd: All PID's: 1273,1274 2014-05-30 10:27:23,5, GSM1: Modem handler 0 has started. PID: 1274. 2014-05-30 10:27:23,5, GSM1: Using check_memory_method 1: CPMS is used. 2014-05-30 10:27:23,6, GSM1: Checking device for incoming SMS 2014-05-30 10:27:23,6, GSM1: Checking if modem is ready 2014-05-30 10:27:23,7, GSM1: -> AT 2014-05-30 10:27:23,7, GSM1: Command is sent, waiting for the answer 2014-05-30 10:27:23,7, GSM1: <- AT OK 2014-05-30 10:27:23,6, GSM1: Pre-initializing modem 2014-05-30 10:27:24,7, GSM1: -> ATE0+CMEE=1;+CREG=2 2014-05-30 10:27:24,7, GSM1: Command is sent, waiting for the answer 2014-05-30 10:27:24,7, GSM1: <- ATE0+CMEE=1;+CREG=2 OK 2014-05-30 10:27:24,6, GSM1: Checking if modem needs PIN 2014-05-30 10:27:24,7, GSM1: -> AT+CPIN? 2014-05-30 10:27:24,7, GSM1: Command is sent, waiting for the answer 2014-05-30 10:27:24,7, GSM1: <- +CPIN: READY OK 2014-05-30 10:27:25,7, GSM1: -> AT+CSQ ...
su - smstools
#!/bin/bash OUT=$(mktemp /var/spool/sms/outgoing/sms.XXXXXXXXXX) || { echo "Failed to create temp file"; exit 1; } echo -n "To: 31612345678\n\nHello, this is the sms." >> $OUT
2014-05-30 10:44:55,6, GSM1: I have to send 1 short message for /var/spool/sms/checked/sms.XNBpdjgPIL 2014-05-30 10:44:55,6, GSM1: Sending SMS from to 31612345678 2014-05-30 10:44:55,6, GSM1: Checking if modem is ready ...
loglevel = 5 service smsd restart
If you want the APU speaker to beep, see: PC Engines APU - speaker CentOS 6.5 And if you want other users than root to use beep, set the setuid bit.
chmod 4755 /usr/bin/beep
#!/bin/sh if [ "$1" == "RECEIVED" ]; then beep -f700 -l100 -d100 -r3 -n -f1 -l300 -n -f700 -l300 -r2 -n -f1 -l300 -n -f700 -l100 -d100 -r3 fi
chmod +x /usr/local/bin/smsevent
eventhandler = /usr/local/bin/smsevent
service smsd restart
AT Command | Description |
---|---|
AT+CPIN=“1234” | Enter PIN |
AT+CPIN? | Request PIN info |
AT+COPS? | Check status operator selection |
AT+CREG? | Check network status |
AT+CSQ | Query signal strength |
ATI | Information, manufacturer, product, version, etc.. |
AT+GMI | Manufacturer |
AT+GMM | Product model |
AT+GMR | Software version |
AT+GSN | ESN/IMEI |
AT+GCAP | Capability list |
AT+CCLK=“2014/05/30,16:12:30” | Set time/date |
AT+CCLK? | Read clock |