New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gammu-smsd: add support for delivery reports in SR memory [$800] #408

Closed
melones opened this Issue Jun 18, 2018 · 47 comments

Comments

Projects
None yet
3 participants
@melones

melones commented Jun 18, 2018

At the moment gammu-smsd supports reading delivery reports from ME/SM memory of a modem.
There is a relatively large group of modems (for example SIMCOM modems) where delivery reports are stored in SR memory and this is not changeable in modem config. It would be great if gammu-smsd could also read delivery reports from SR memory.

From what I saw in code the method ATGEN_ReplyGetSMSMemories(...) in libgammu/phone/at/at-sms.c has this feature as TODO. Maybe it's time to go ahead with implementation :)

Below is a sample log for a modem with SR memory for delivery reports.

Thu 2018/06/07 11:29:17 gammu-smsd[15840]: Using SQL service
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: Configuring Gammu SMSD...
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: SHM token: 0x1020769 (16910185)
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: Warning: No PIN code in /etc/pool-smsdrc-1 file
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: CommTimeout=10, SendTimeout=30, ReceiveFrequency=15, ResetFrequency=0, HardResetFrequency=0
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: checks: CheckSecurity=1, CheckBattery=0, CheckSignal=1, CheckNetwork=1
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: mode: Send=1, Receive=1
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: deliveryreport = sms
Thu 2018/06/07 11:29:17 gammu-smsd[15840]: phoneid = phone2
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Connected to database: mydb on 127.0.0.1. Server version: 90412 Protocol: 3
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Execute SQL: SELECT  * FROM gammu  LIMIT 1
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Execute SQL: SELECT  * FROM inbox  LIMIT 1
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Execute SQL: SELECT  * FROM sentitems  LIMIT 1
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Execute SQL: SELECT  * FROM outbox  LIMIT 1
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Execute SQL: SELECT  * FROM outbox_multipart  LIMIT 1
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Execute SQL: SELECT  * FROM phones  LIMIT 1
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Execute SQL: SELECT "Version" FROM gammu
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Database structures version: 17, SMSD current version: 17
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Connected to Database native_pgsql: mydb on 127.0.0.1
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Created POSIX RW shared memory at 0x76f85000
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: Starting phone communication...
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: gammu: [Gammu            - 1.39.0]
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: gammu: [Connection       - "at115200"]
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: gammu: [Connection index - 0]
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: gammu: [Model type       - ""]
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: gammu: [Device           - "/dev/ttyPMDM0"]
Thu 2018/06/07 11:29:17 gammu-smsd[15841]: gammu: [Running on       - Linux, kernel 4.4.50-v7+ (#1 SMP Thu Mar 23 10:57:53 EET 2017)]
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: Serial device: DTR is up, RTS is up, CAR is down, CTS is up
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: Setting speed to 115200
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: [Module           - "auto"]
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: Escaping SMS mode
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x02/2
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: 1B |0D                                                          ..              
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: Sending simple AT command to wake up some devices
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x03/3
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: 41A|54T|0D                                                      AT.             
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: 1 "AT"
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: 41A|54T|0D |0D |0A |4FO|4BK|0D |0A                              AT...OK..       
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: Enabling echo
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x05/5
Thu 2018/06/07 11:29:18 gammu-smsd[15841]: gammu: 41A|54T|45E|311|0D                                              ATE1.           
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 1 "ATE1"
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x0B/11
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A                      ATE1...OK..     
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: Trying Motorola mode switch
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D                          AT+MODE=2.      
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 1 "AT+MODE=2"
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x13/19
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |45E|52R|52R|4FO AT+MODE=2...ERRO
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 52R|0D |0A                                                      R..             
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: Seems not to be supported
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: Enabling CME errors
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:19 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D                          AT+CMEE=1.      
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 1 "AT+CMEE=1"
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CMEE=1...OK..
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3F?|0D                              AT+CSCS?.       
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 1 "AT+CSCS?"
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 2 "+CSCS: "GSM""
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53S AT+CSCS?...+CSCS
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 3A:|20 |22"|47G|53S|4DM|22"|0D |0A |0D |0A |4FO|4BK|0D |0A      : "GSM"....OK.. 
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D                          AT+CSCS=?.      
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 1 "AT+CSCS=?"
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 2 "+CSCS: ("IRA","GSM","UCS2")"
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2F/47
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43C AT+CSCS=?...+CSC
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 53S|3A:|20 |28(|22"|49I|52R|41A|22"|2C,|22"|47G|53S|4DM|22"|2C, S: ("IRA","GSM",
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 22"|55U|43C|53S|322|22"|29)|0D |0A |0D |0A |4FO|4BK|0D |0A      "UCS2")....OK.. 
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: Chosen GSM as normal charset
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: Chosen UCS2 as unicode charset
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: Getting model
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x08/8
Thu 2018/06/07 11:29:20 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|4DM|0D                                  AT+CGMM.        
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CGMM"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "SIMCOM_SIM5320E"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x21/33
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|4DM|0D |0D |0A |53S|49I|4DM|43C|4FO|4DM AT+CGMM...SIMCOM
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 5F_|53S|49I|4DM|355|333|322|300|45E|0D |0A |0D |0A |4FO|4BK|0D  _SIM5320E....OK.
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 0A                                                              .               
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Unknown model, but it should still work
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Model name: `SIMCOM_SIM5320E']
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Model data: `']
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Model data: `unknown']
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Connected model  - "SIMCOM_SIM5320E"]
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x08/8
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|49I|0D                                  AT+CGMI.        
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CGMI"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "SIMCOM INCORPORATED"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x25/37
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |53S|49I|4DM|43C|4FO|4DM AT+CGMI...SIMCOM
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 20 |49I|4EN|43C|4FO|52R|50P|4FO|52R|41A|54T|45E|44D|0D |0A |0D   INCORPORATED...
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 0A |4FO|4BK|0D |0A                                              .OK..           
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Manufacturer info received
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Manufacturer: SIMCOM INCORPORATED]
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking for OBEX support
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0B/11
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D                      AT+CPROT=?.     
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CPROT=?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x14/20
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D |0D |0A |45E|52R|52R AT+CPROT=?...ERR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 4FO|52R|0D |0A                                                  OR..            
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking for SYNCML/OBEX support
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0C/12
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D                  AT+SYNCML=?.    
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+SYNCML=?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x15/21
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D |0D |0A |45E|52R AT+SYNCML=?...ER
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 52R|4FO|52R|0D |0A                                              ROR..           
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0D/13
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D              AT$TSSPCSW=?.   
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT$TSSPCSW=?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x16/22
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D |0D |0A |45E AT$TSSPCSW=?...E
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 52R|52R|4FO|52R|0D |0A                                          RROR..          
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Module           - "A2D|iPAQ|at|M20|S25|MC35|TC35|C35i|S65|S300|5110|5130|5190|5210|6110|6130|6150|6190|6210|6250|6310|6310i|6510|7110|8210|8250|8290|8310|8390|8850|8855|8890|8910|9110|9210"]
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Escaping SMS mode
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x02/2
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1B |0D                                                          ..              
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Sending simple AT command to wake up some devices
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x03/3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|0D                                                      AT.             
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|0D |0D |0A |4FO|4BK|0D |0A                              AT...OK..       
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Enabling echo
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x05/5
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|45E|311|0D                                              ATE1.           
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "ATE1"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x0B/11
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A                      ATE1...OK..     
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Trying Motorola mode switch
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D                          AT+MODE=2.      
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+MODE=2"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x13/19
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |45E|52R|52R|4FO AT+MODE=2...ERRO
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 52R|0D |0A                                                      R..             
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Seems not to be supported
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Enabling CME errors
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D                          AT+CMEE=1.      
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CMEE=1"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CMEE=1...OK..
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3F?|0D                              AT+CSCS?.       
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CSCS?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "+CSCS: "GSM""
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53S AT+CSCS?...+CSCS
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3A:|20 |22"|47G|53S|4DM|22"|0D |0A |0D |0A |4FO|4BK|0D |0A      : "GSM"....OK.. 
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D                          AT+CSCS=?.      
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CSCS=?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "+CSCS: ("IRA","GSM","UCS2")"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2F/47
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43C AT+CSCS=?...+CSC
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 53S|3A:|20 |28(|22"|49I|52R|41A|22"|2C,|22"|47G|53S|4DM|22"|2C, S: ("IRA","GSM",
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 22"|55U|43C|53S|322|22"|29)|0D |0A |0D |0A |4FO|4BK|0D |0A      "UCS2")....OK.. 
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Chosen GSM as normal charset
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Chosen UCS2 as unicode charset
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x08/8
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|49I|0D                                  AT+CGMI.        
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CGMI"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "SIMCOM INCORPORATED"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x25/37
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |53S|49I|4DM|43C|4FO|4DM AT+CGMI...SIMCOM
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 20 |49I|4EN|43C|4FO|52R|50P|4FO|52R|41A|54T|45E|44D|0D |0A |0D   INCORPORATED...
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 0A |4FO|4BK|0D |0A                                              .OK..           
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Manufacturer info received
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Manufacturer: SIMCOM INCORPORATED]
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking for OBEX support
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0B/11
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D                      AT+CPROT=?.     
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CPROT=?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x14/20
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D |0D |0A |45E|52R|52R AT+CPROT=?...ERR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 4FO|52R|0D |0A                                                  OR..            
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking for SYNCML/OBEX support
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0C/12
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D                  AT+SYNCML=?.    
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+SYNCML=?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x15/21
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D |0D |0A |45E|52R AT+SYNCML=?...ER
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 52R|4FO|52R|0D |0A                                              ROR..           
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0D/13
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D              AT$TSSPCSW=?.   
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT$TSSPCSW=?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "ERROR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: ERROR
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 3
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x16/22
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D |0D |0A |45E AT$TSSPCSW=?...E
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 52R|52R|4FO|52R|0D |0A                                          RROR..          
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Getting firmware versions
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x08/8
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|52R|0D                                  AT+CGMR.        
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CGMR"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "+CGMR: 1575B13SIM5320E"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x28/40
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|4DM|52R|0D |0D |0A |2B+|43C|47G|4DM|52R|3A: AT+CGMR...+CGMR:
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 20 |311|355|377|355|42B|311|333|53S|49I|4DM|355|333|322|300|45E  1575B13SIM5320E
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 0D |0A |0D |0A |4FO|4BK|0D |0A                                  ....OK..        
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Received firmware version: "1575B13SIM5320E"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Number version is "1575135320.000000"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Firmware version - "1575B13SIM5320E"]
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: [Connected]
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Entering GSM_GetSecurityStatus
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Getting security code status
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D                              AT+CPIN?.       
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 1 "AT+CPIN?"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 2 "+CPIN: READY"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D |0D |0A |2B+|43C|50P|49I|4EN AT+CPIN?...+CPIN
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: 3A:|20 |52R|45E|41A|44D|59Y|0D |0A |0D |0A |4FO|4BK|0D |0A      : READY....OK.. 
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Parsing +CPIN: READY with +CPIN: @r
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Grabbed string from reply: "READY" (parsed 5 bytes)
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Parsed raw string "READY"
Thu 2018/06/07 11:29:21 gammu-smsd[15841]: gammu: Security status received - nothing to enter
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Leaving GSM_GetSecurityStatus
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Entering GSM_SetIncomingSMS
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Getting available SMS memories
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|3F?|0D                          AT+CPMS=?.      
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CPMS=?"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "+CPMS: ("ME","MT","SM","SR"),("ME","MT","SM","SR"),("ME","SM")"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x52/82
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|3F?|0D |0D |0A |2B+|43C|50P|4DM AT+CPMS=?...+CPM
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 53S|3A:|20 |28(|22"|4DM|45E|22"|2C,|22"|4DM|54T|22"|2C,|22"|53S S: ("ME","MT","S
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 4DM|22"|2C,|22"|53S|52R|22"|29)|2C,|28(|22"|4DM|45E|22"|2C,|22" M","SR"),("ME","
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 4DM|54T|22"|2C,|22"|53S|4DM|22"|2C,|22"|53S|52R|22"|29)|2C,|28( MT","SM","SR"),(
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 22"|4DM|45E|22"|2C,|22"|53S|4DM|22"|29)|0D |0A |0D |0A |4FO|4BK "ME","SM")....OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Available SMS memories received: read: ME : ok, SM : ok, save: ME : ok, SM = ok, Motorola = no
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Setting SMS memory type to ME
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0D/13
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|0D              AT+CPMS="ME".   
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CPMS="ME""
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,255,0,255,0,255"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2F/47
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|0D |0D |0A |2B+ AT+CPMS="ME"...+
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|355|2C,|300|2C,|322|355 CPMS: 0,255,0,25
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 355|2C,|300|2C,|322|355|355|0D |0A |0D |0A |4FO|4BK|0D |0A      5,0,255....OK.. 
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4EN|4DM|49I|3D=|3F?|0D                          AT+CNMI=?.      
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CNMI=?"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "+CNMI: (0,1,2),(0,1,2,3),(0,2),(0,1,2),(0,1)"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x40/64
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4EN|4DM|49I|3D=|3F?|0D |0D |0A |2B+|43C|4EN|4DM AT+CNMI=?...+CNM
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 49I|3A:|20 |28(|300|2C,|311|2C,|322|29)|2C,|28(|300|2C,|311|2C, I: (0,1,2),(0,1,
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 322|2C,|333|29)|2C,|28(|300|2C,|322|29)|2C,|28(|300|2C,|311|2C, 2,3),(0,2),(0,1,
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 322|29)|2C,|28(|300|2C,|311|29)|0D |0A |0D |0A |4FO|4BK|0D |0A  2),(0,1)....OK..
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Parsing range: (0,1,2),(0,1,2,3),(0,2),(0,1,2),(0,1)
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Returning range: 0, 1, 2, -1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Parsing range: (0,1,2,3),(0,2),(0,1,2),(0,1)
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Returning range: 0, 1, 2, 3, -1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Parsing range: (0,2),(0,1,2),(0,1)
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Returning range: 0, 2, -1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Parsing range: (0,1,2),(0,1)
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Returning range: 0, 1, 2, -1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4EN|4DM|49I|3D=|322|2C,|311|2C,|300|2C,|322|0D  AT+CNMI=2,1,0,2.
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CNMI=2,1,0,2"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x16/22
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4EN|4DM|49I|3D=|322|2C,|311|2C,|300|2C,|322|0D  AT+CNMI=2,1,0,2.
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 0D |0A |4FO|4BK|0D |0A                                          ..OK..          
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Leaving GSM_SetIncomingSMS
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Entering GSM_SetIncomingUSSD
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Enabling incoming USSD
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|55U|53S|44D|3D=|311|0D                          AT+CUSD=1.      
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CUSD=1"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|55U|53S|44D|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CUSD=1...OK..
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Leaving GSM_SetIncomingUSSD
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Entering GSM_GetIMEI
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Getting IMEI
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x08/8
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|53S|4EN|0D                                  AT+CGSN.        
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CGSN"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "861311004135785"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x21/33
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|53S|4EN|0D |0D |0A |388|366|311|333|311|311 AT+CGSN...861311
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 300|300|344|311|333|355|377|388|355|0D |0A |0D |0A |4FO|4BK|0D  004135785....OK.
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 0A                                                              .               
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Received IMEI 861311004135785
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Leaving GSM_GetIMEI
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Entering GSM_GetSIMIMSI
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Getting SIM IMSI
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x08/8
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|49I|4DM|49I|0D                                  AT+CIMI.        
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CIMI"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "260034666320415"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x21/33
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|49I|4DM|49I|0D |0D |0A |322|366|300|300|333|344 AT+CIMI...260034
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 366|366|366|333|322|300|344|311|355|0D |0A |0D |0A |4FO|4BK|0D  666320415....OK.
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 0A                                                              .               
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Received IMSI 260034666320415
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Leaving GSM_GetSIMIMSI
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: Execute SQL: DELETE FROM phones WHERE "IMEI" = '861311004135785'
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: Inserting phone info
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: Execute SQL: INSERT INTO phones ("IMEI", "IMSI", "ID", "NetCode", "NetName", "Send", "Receive", "InsertIntoDB", "TimeOut", "Client", "Battery", "Signal") VALUES ('861311004135785', '260034666320415', 'phone2', '', '', 'yes', 'yes', now(), now() + interval '10 seconds', 'Gammu 1.39.0, Linux, kernel 4.4.50-v7+ (#1 SMP Thu Mar 23 10:57:53 EET 2017), GCC 4.9', -1, -1)
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Entering GSM_SetFastSMSSending
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Enabling fast SMS sending
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|4DM|53S|3D=|322|0D                          AT+CMMS=2.      
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CMMS=2"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|4DM|53S|3D=|322|0D |0D |0A |4FO|4BK|0D |0A  AT+CMMS=2...OK..
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Leaving GSM_SetFastSMSSending
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Entering GSM_GetSecurityStatus
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Getting security code status
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D                              AT+CPIN?.       
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 1 "AT+CPIN?"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 2 "+CPIN: READY"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D |0D |0A |2B+|43C|50P|49I|4EN AT+CPIN?...+CPIN
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: 3A:|20 |52R|45E|41A|44D|59Y|0D |0A |0D |0A |4FO|4BK|0D |0A      : READY....OK.. 
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Parsing +CPIN: READY with +CPIN: @r
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Grabbed string from reply: "READY" (parsed 5 bytes)
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Parsed raw string "READY"
Thu 2018/06/07 11:29:22 gammu-smsd[15841]: gammu: Security status received - nothing to enter
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Leaving GSM_GetSecurityStatus
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Entering GSM_GetSMSStatus
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting SIM SMS status
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CPMS="SM","SM""
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,25,0,25,0,255"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x32/50
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|2C, "...+CPMS: 0,25,
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 300|2C,|322|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A |4FO|4BK 0,25,0,255....OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,25,0,25,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 25
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Size : 25
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting phone SMS status
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CPMS="ME","ME""
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,255,0,255,0,255"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x34/52
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|355 "...+CPMS: 0,255
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2C,|300|2C,|322|355|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A  ,0,255,0,255....
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 4FO|4BK|0D |0A                                                  OK..            
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,255,0,255,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 255
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Size : 255
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Leaving GSM_GetSMSStatus
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: Execute SQL: SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = 'phone2' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Entering GSM_GetSignalQuality
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting signal quality info
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x07/7
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|51Q|0D                                      AT+CSQ.         
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CSQ"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+CSQ: 23,99"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1C/28
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|51Q|0D |0D |0A |2B+|43C|53S|51Q|3A:|20 |322 AT+CSQ...+CSQ: 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 333|2C,|399|399|0D |0A |0D |0A |4FO|4BK|0D |0A                  3,99....OK..    
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Signal quality info received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CSQ: 23,99 with +CSQ: @i, @i
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 23
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 99
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Leaving GSM_GetSignalQuality
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Entering GSM_GetNetworkInfo
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Enable full network info
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3D=|322|0D                          AT+CREG=2.      
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CREG=2"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3D=|322|0D |0D |0A |4FO|4BK|0D |0A  AT+CREG=2...OK..
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Enable full packet network info
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0B/11
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3D=|322|0D                      AT+CGREG=2.     
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CGREG=2"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x11/17
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3D=|322|0D |0D |0A |4FO|4BK|0D  AT+CGREG=2...OK.
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 0A                                                              .               
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting GPRS state
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|41A|54T|54T|3F?|0D                          AT+CGATT?.      
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CGATT?"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+CGATT: 1"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1D/29
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|41A|54T|54T|3F?|0D |0D |0A |2B+|43C|47G|41A AT+CGATT?...+CGA
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 54T|54T|3A:|20 |311|0D |0A |0D |0A |4FO|4BK|0D |0A              TT: 1....OK..   
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: GPRS state received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CGATT: 1 with +CGATT: @i
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting network LAC and CID and state
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3F?|0D                              AT+CREG?.       
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CREG?"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+CREG: 2,1,DF16,2C69938"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2A/42
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3F?|0D |0D |0A |2B+|43C|52R|45E|47G AT+CREG?...+CREG
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3A:|20 |322|2C,|311|2C,|44D|46F|311|366|2C,|322|43C|366|399|399 : 2,1,DF16,2C699
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 333|388|0D |0A |0D |0A |4FO|4BK|0D |0A                          38....OK..      
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Network LAC & CID & state received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CREG: 2,1,DF16,2C69938 with +CREG: @i, @i, @r, @r, @i
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CREG: 2,1,DF16,2C69938 with +CREG: @i, @i, @r, @r
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Home network
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting packet network LAC and CID and state
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3F?|0D                          AT+CGREG?.      
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+CGREG?"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+CGREG: 2,1,DF16,2C69938"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2C/44
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3F?|0D |0D |0A |2B+|43C|47G|52R AT+CGREG?...+CGR
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 45E|47G|3A:|20 |322|2C,|311|2C,|44D|46F|311|366|2C,|322|43C|366 EG: 2,1,DF16,2C6
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 399|399|333|388|0D |0A |0D |0A |4FO|4BK|0D |0A                  9938....OK..    
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Network LAC & CID & state received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CGREG: 2,1,DF16,2C69938 with +CGREG: @i, @i, @r, @r, @i, @r
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CGREG: 2,1,DF16,2C69938 with +CGREG: @i, @i, @r, @r, @i
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +CGREG: 2,1,DF16,2C69938 with +CGREG: @i, @i, @r, @r
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Home network
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Setting short network name format
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0C/12
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|322|0D                  AT+COPS=3,2.    
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+COPS=3,2"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|322|0D |0D |0A |4FO|4BK AT+COPS=3,2...OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting network code
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D                              AT+COPS?.       
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+COPS?"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+COPS: 0,2,"26003",2"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x27/39
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D |0D |0A |2B+|43C|4FO|50P|53S AT+COPS?...+COPS
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3A:|20 |300|2C,|322|2C,|22"|322|366|300|300|333|22"|2C,|322|0D  : 0,2,"26003",2.
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 0A |0D |0A |4FO|4BK|0D |0A                                      ...OK..         
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Network code received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +COPS: 0,2,"26003",2 with +COPS: @i, @i, @r
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "26003" (parsed 7 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "26003"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: String do not end same!
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +COPS: 0,2,"26003",2 with +COPS: @i, @i, @r, @i
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "26003" (parsed 7 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed raw string "26003"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu:    Network code              : 260 03
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu:    Network name for Gammu    : Orange (Poland)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Setting long string network name format
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0C/12
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|300|0D                  AT+COPS=3,0.    
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+COPS=3,0"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|300|0D |0D |0A |4FO|4BK AT+COPS=3,0...OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Getting network code
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D                              AT+COPS?.       
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 1 "AT+COPS?"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 2 "+COPS: 0,0,"Orange",2"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x28/40
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D |0D |0A |2B+|43C|4FO|50P|53S AT+COPS?...+COPS
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 3A:|20 |300|2C,|300|2C,|22"|4FO|72r|61a|6En|67g|65e|22"|2C,|322 : 0,0,"Orange",2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: 0D |0A |0D |0A |4FO|4BK|0D |0A                                  ....OK..        
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Network name received
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +COPS: 0,0,"Orange",2 with +COPS: @i, @i, @s
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "Orange" (parsed 8 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed generic string "Orange"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Generic string decoded as "Orange"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: String do not end same!
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsing +COPS: 0,0,"Orange",2 with +COPS: @i, @i, @s, @i
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Grabbed string from reply: "Orange" (parsed 8 bytes)
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed generic string "Orange"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Generic string decoded as "Orange"
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: gammu: Leaving GSM_GetNetworkInfo
Thu 2018/06/07 11:29:23 gammu-smsd[15841]: Execute SQL: UPDATE phones SET "TimeOut"= now() + interval '10 seconds', "Battery" = 0, "Signal" = 69, "NetCode" = '260 03', "NetName" = 'Orange' WHERE "IMEI" = '861311004135785'
Thu 2018/06/07 11:29:32 gammu-smsd[15841]: Execute SQL: SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = 'phone2' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: Entering GSM_GetSecurityStatus
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: Getting security code status
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D                              AT+CPIN?.       
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: 1 "AT+CPIN?"
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: 2 "+CPIN: READY"
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D |0D |0A |2B+|43C|50P|49I|4EN AT+CPIN?...+CPIN
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: 3A:|20 |52R|45E|41A|44D|59Y|0D |0A |0D |0A |4FO|4BK|0D |0A      : READY....OK.. 
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: Parsing +CPIN: READY with +CPIN: @r
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: Grabbed string from reply: "READY" (parsed 5 bytes)
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: Parsed raw string "READY"
Thu 2018/06/07 11:29:37 gammu-smsd[15841]: gammu: Security status received - nothing to enter
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Leaving GSM_GetSecurityStatus
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Entering GSM_GetSMSStatus
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Getting SIM SMS status
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 1 "AT+CPMS="SM","SM""
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,25,0,25,0,255"
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x32/50
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|2C, "...+CPMS: 0,25,
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 300|2C,|322|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A |4FO|4BK 0,25,0,255....OK
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,25,0,25,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Parsed int 25
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Size : 25
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Getting phone SMS status
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 1 "AT+CPMS="ME","ME""
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,255,0,255,0,255"
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x34/52
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|355 "...+CPMS: 0,255
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 2C,|300|2C,|322|355|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A  ,0,255,0,255....
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: 4FO|4BK|0D |0A                                                  OK..            
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,255,0,255,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Parsed int 255
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Size : 255
Thu 2018/06/07 11:29:38 gammu-smsd[15841]: gammu: Leaving GSM_GetSMSStatus
Thu 2018/06/07 11:29:42 gammu-smsd[15841]: Execute SQL: SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = 'phone2' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: Entering GSM_GetSecurityStatus
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: Getting security code status
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D                              AT+CPIN?.       
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: 1 "AT+CPIN?"
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: 2 "+CPIN: READY"
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D |0D |0A |2B+|43C|50P|49I|4EN AT+CPIN?...+CPIN
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: 3A:|20 |52R|45E|41A|44D|59Y|0D |0A |0D |0A |4FO|4BK|0D |0A      : READY....OK.. 
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: Parsing +CPIN: READY with +CPIN: @r
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: Grabbed string from reply: "READY" (parsed 5 bytes)
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: Parsed raw string "READY"
Thu 2018/06/07 11:29:52 gammu-smsd[15841]: gammu: Security status received - nothing to enter
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Leaving GSM_GetSecurityStatus
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Entering GSM_GetSMSStatus
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting SIM SMS status
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CPMS="SM","SM""
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,25,0,25,0,255"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x32/50
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|2C, "...+CPMS: 0,25,
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 300|2C,|322|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A |4FO|4BK 0,25,0,255....OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,25,0,25,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 25
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Size : 25
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting phone SMS status
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CPMS="ME","ME""
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,255,0,255,0,255"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x34/52
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|355 "...+CPMS: 0,255
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2C,|300|2C,|322|355|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A  ,0,255,0,255....
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 4FO|4BK|0D |0A                                                  OK..            
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,255,0,255,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 255
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Size : 255
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Leaving GSM_GetSMSStatus
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: Execute SQL: SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = 'phone2' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: Execute SQL: UPDATE outbox SET "SendingTimeOut" = now() + interval '60 seconds' WHERE "ID" = '456' AND ("SendingTimeOut" < now() OR "SendingTimeOut" IS NULL)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: Execute SQL: SELECT "Text", "Coding", "UDH", "Class", "TextDecoded", "ID", "DestinationNumber", "MultiPart", "RelativeValidity", "DeliveryReport", "CreatorID", "Retries", "Status", "StatusCode" FROM outbox WHERE "ID"='456'
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: Message: test
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: New message to send: 456
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: Message without SMSC, assuming you want to use the one from phone
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Entering GSM_GetSMSC
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting SMSC
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|41A|3F?|0D                              AT+CSCA?.       
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CSCA?"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+CSCA: "+48501200777",145"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2C/44
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|43C|41A|3F?|0D |0D |0A |2B+|43C|53S|43C|41A AT+CSCA?...+CSCA
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3A:|20 |22"|2B+|344|388|355|300|311|322|300|300|377|377|377|22" : "+48501200777"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2C,|311|344|355|0D |0A |0D |0A |4FO|4BK|0D |0A                  ,145....OK..    
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SMSC info received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CSCA: "+48501200777",145 with +CSCA: @p, @i
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "+48501200777" (parsed 14 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed phone string "+48501200777"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Phone string decoded as "+48501200777"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 145
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Leaving GSM_GetSMSC
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Entering GSM_GetSignalQuality
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting signal quality info
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x07/7
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|51Q|0D                                      AT+CSQ.         
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CSQ"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+CSQ: 23,99"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1C/28
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|53S|51Q|0D |0D |0A |2B+|43C|53S|51Q|3A:|20 |322 AT+CSQ...+CSQ: 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 333|2C,|399|399|0D |0A |0D |0A |4FO|4BK|0D |0A                  3,99....OK..    
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Signal quality info received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CSQ: 23,99 with +CSQ: @i, @i
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 23
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 99
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Leaving GSM_GetSignalQuality
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Entering GSM_GetNetworkInfo
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Enable full network info
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3D=|322|0D                          AT+CREG=2.      
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CREG=2"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3D=|322|0D |0D |0A |4FO|4BK|0D |0A  AT+CREG=2...OK..
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Enable full packet network info
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0B/11
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3D=|322|0D                      AT+CGREG=2.     
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CGREG=2"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x11/17
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3D=|322|0D |0D |0A |4FO|4BK|0D  AT+CGREG=2...OK.
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 0A                                                              .               
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting GPRS state
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|41A|54T|54T|3F?|0D                          AT+CGATT?.      
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CGATT?"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+CGATT: 1"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1D/29
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|41A|54T|54T|3F?|0D |0D |0A |2B+|43C|47G|41A AT+CGATT?...+CGA
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 54T|54T|3A:|20 |311|0D |0A |0D |0A |4FO|4BK|0D |0A              TT: 1....OK..   
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: GPRS state received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CGATT: 1 with +CGATT: @i
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting network LAC and CID and state
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3F?|0D                              AT+CREG?.       
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CREG?"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+CREG: 2,1,DF16,2C69938"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2A/42
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|52R|45E|47G|3F?|0D |0D |0A |2B+|43C|52R|45E|47G AT+CREG?...+CREG
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3A:|20 |322|2C,|311|2C,|44D|46F|311|366|2C,|322|43C|366|399|399 : 2,1,DF16,2C699
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 333|388|0D |0A |0D |0A |4FO|4BK|0D |0A                          38....OK..      
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Network LAC & CID & state received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CREG: 2,1,DF16,2C69938 with +CREG: @i, @i, @r, @r, @i
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CREG: 2,1,DF16,2C69938 with +CREG: @i, @i, @r, @r
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Home network
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting packet network LAC and CID and state
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3F?|0D                          AT+CGREG?.      
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CGREG?"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+CGREG: 2,1,DF16,2C69938"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x2C/44
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|47G|52R|45E|47G|3F?|0D |0D |0A |2B+|43C|47G|52R AT+CGREG?...+CGR
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 45E|47G|3A:|20 |322|2C,|311|2C,|44D|46F|311|366|2C,|322|43C|366 EG: 2,1,DF16,2C6
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 399|399|333|388|0D |0A |0D |0A |4FO|4BK|0D |0A                  9938....OK..    
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Network LAC & CID & state received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CGREG: 2,1,DF16,2C69938 with +CGREG: @i, @i, @r, @r, @i, @r
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CGREG: 2,1,DF16,2C69938 with +CGREG: @i, @i, @r, @r, @i
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +CGREG: 2,1,DF16,2C69938 with +CGREG: @i, @i, @r, @r
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "DF16" (parsed 4 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "DF16"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "2C69938" (parsed 7 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "2C69938"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Home network
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Setting short network name format
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0C/12
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|322|0D                  AT+COPS=3,2.    
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+COPS=3,2"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|322|0D |0D |0A |4FO|4BK AT+COPS=3,2...OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting network code
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D                              AT+COPS?.       
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+COPS?"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+COPS: 0,2,"26003",2"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x27/39
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D |0D |0A |2B+|43C|4FO|50P|53S AT+COPS?...+COPS
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3A:|20 |300|2C,|322|2C,|22"|322|366|300|300|333|22"|2C,|322|0D  : 0,2,"26003",2.
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 0A |0D |0A |4FO|4BK|0D |0A                                      ...OK..         
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Network code received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +COPS: 0,2,"26003",2 with +COPS: @i, @i, @r
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "26003" (parsed 7 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "26003"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: String do not end same!
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +COPS: 0,2,"26003",2 with +COPS: @i, @i, @r, @i
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "26003" (parsed 7 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed raw string "26003"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu:    Network code              : 260 03
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu:    Network name for Gammu    : Orange (Poland)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Setting long string network name format
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0C/12
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|300|0D                  AT+COPS=3,0.    
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+COPS=3,0"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x12/18
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3D=|333|2C,|300|0D |0D |0A |4FO|4BK AT+COPS=3,0...OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Getting network code
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D                              AT+COPS?.       
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+COPS?"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "+COPS: 0,0,"Orange",2"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x28/40
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4FO|50P|53S|3F?|0D |0D |0A |2B+|43C|4FO|50P|53S AT+COPS?...+COPS
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 3A:|20 |300|2C,|300|2C,|22"|4FO|72r|61a|6En|67g|65e|22"|2C,|322 : 0,0,"Orange",2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 0D |0A |0D |0A |4FO|4BK|0D |0A                                  ....OK..        
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Network name received
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +COPS: 0,0,"Orange",2 with +COPS: @i, @i, @s
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "Orange" (parsed 8 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed generic string "Orange"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Generic string decoded as "Orange"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: String do not end same!
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsing +COPS: 0,0,"Orange",2 with +COPS: @i, @i, @s, @i
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Grabbed string from reply: "Orange" (parsed 8 bytes)
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed generic string "Orange"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Generic string decoded as "Orange"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Parsed int 2
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Leaving GSM_GetNetworkInfo
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Entering GSM_SendSMS
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Trying SMS PDU mode
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0A/10
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|47G|46F|3D=|300|0D                          AT+CMGF=0.      
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CMGF=0"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "OK"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x10/16
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|47G|46F|3D=|300|0D |0D |0A |4FO|4BK|0D |0A  AT+CMGF=0...OK..
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SMS Submit
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Recipient number "660123456"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SMSC number "+48501200777"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SMS class -1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SMS validity ff
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: TPMR: 00 0
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 7 bit SMS, length 4, 4
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: test
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Waiting for modem prompt
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x0B/11
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|47G|53S|3D=|311|377|0D                      AT+CMGS=17.     
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1 "AT+CMGS=17"
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 2 "> "
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Checking line: > 
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: AT reply state: 7
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x0F/15
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|47G|53S|3D=|311|377|0D |0D |0A |3E>|20      AT+CMGS=17...>  
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Sending SMS
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x32/50
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 300|377|399|311|388|344|300|355|322|311|300|300|377|377|46F|377 07918405210077F7
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 333|311|300|300|300|399|388|311|366|366|322|300|344|399|344|399 3100098166204949
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 46F|355|300|300|300|300|46F|46F|300|344|46F|344|46F|322|399|43C F50000FF04F4F29C
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 300|45E                                                         0E              
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x01/1
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: 1A                                                              .               
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: gammu: Leaving GSM_SendSMS
Thu 2018/06/07 11:29:53 gammu-smsd[15841]: Execute SQL: UPDATE outbox SET "SendingTimeOut" = now() + interval '60 seconds' WHERE "ID" = '456' AND ("SendingTimeOut" < now() OR "SendingTimeOut" IS NULL)
Thu 2018/06/07 11:29:55 gammu-smsd[15841]: Execute SQL: UPDATE outbox SET "SendingTimeOut" = now() + interval '60 seconds' WHERE "ID" = '456' AND ("SendingTimeOut" < now() OR "SendingTimeOut" IS NULL)
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 1 "AT+CMGS=17"
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 2 "> 07918405210077F73100098166204949F50000FF04F4F29C0E"
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 3 "+CMGS: 116"
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 4 "OK"
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x57/87
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|4DM|47G|53S|3D=|311|377|0D |0D |0A |3E>|20 |300 AT+CMGS=17...> 0
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 377|399|311|388|344|300|355|322|311|300|300|377|377|46F|377|333 7918405210077F73
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 311|300|300|300|399|388|311|366|366|322|300|344|399|344|399|46F 100098166204949F
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 355|300|300|300|300|46F|46F|300|344|46F|344|46F|322|399|43C|300 50000FF04F4F29C0
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 45E|0D |0A |0D |0A |2B+|43C|4DM|47G|53S|3A:|20 |311|311|366|0D  E....+CMGS: 116.
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: 0A |0D |0A |4FO|4BK|0D |0A                                      ...OK..         
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: SMS sent OK
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: Parsing +CMGS: 116 with +CMGS: @i
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: gammu: Parsed int 116
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: SMS sent on device: "/dev/ttyPMDM0" status=0, reference=116
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: Transmitted 456 (total: 1) to 660123456
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: Execute SQL: SELECT "Text", "Coding", "UDH", "Class", "TextDecoded", "ID", "DestinationNumber", "MultiPart", "RelativeValidity", "DeliveryReport", "CreatorID", "Retries", "Status", "StatusCode" FROM outbox WHERE "ID"='456'
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: Execute SQL: INSERT INTO sentitems ("CreatorID", "ID", "SequencePosition", "Status", "SendingDateTime", "SMSCNumber", "TPMR", "SenderID", "Text", "DestinationNumber", "Coding", "UDH", "Class", "TextDecoded", "InsertIntoDB", "RelativeValidity", "StatusCode")  VALUES ('admin', '456', 1, 'SendingOK', now(), '+48501200777', 116, 'phone2', '0074006500730074', '660123456', 'Default_No_Compression', '', -1, 'test', '2018-06-07 11:29:43 GMT', 255, -1)
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: Execute SQL: UPDATE phones SET "Sent"= "Sent" + 1 WHERE "IMEI" = '861311004135785'
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: Execute SQL: DELETE FROM outbox WHERE "ID"='456';INSERT INTO user_sentitems (id_sentitems, id_user) (SELECT id_outbox, id_user FROM user_outbox WHERE id_outbox = '456');DELETE FROM user_outbox WHERE id_outbox = '456';
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: Execute SQL: DELETE FROM outbox_multipart WHERE "ID"='456'
Thu 2018/06/07 11:29:56 gammu-smsd[15841]: Execute SQL: SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = 'phone2' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
Thu 2018/06/07 11:30:06 gammu-smsd[15841]: Execute SQL: SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = 'phone2' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Entering GSM_GetSecurityStatus
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Getting security code status
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x09/9
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D                              AT+CPIN?.       
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 1 "+CDSI: "SR",0"
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Checking line: +CDSI: "SR",0
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: AT reply state: 4
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x0F/15
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 2B+|43C|44D|53S|49I|3A:|20 |22"|53S|52R|22"|2C,|300|0D |0A      +CDSI: "SR",0.. 
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 1 "AT+CPIN?"
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 2 "+CPIN: READY"
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D |0D |0A |2B+|43C|50P|49I|4EN AT+CPIN?...+CPIN
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: 3A:|20 |52R|45E|41A|44D|59Y|0D |0A |0D |0A |4FO|4BK|0D |0A      : READY....OK.. 
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Parsing +CPIN: READY with +CPIN: @r
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Grabbed string from reply: "READY" (parsed 5 bytes)
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Parsed raw string "READY"
Thu 2018/06/07 11:30:07 gammu-smsd[15841]: gammu: Security status received - nothing to enter
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Leaving GSM_GetSecurityStatus
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Entering GSM_GetSMSStatus
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Getting SIM SMS status
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 1 "AT+CPMS="SM","SM""
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,25,0,25,0,255"
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x32/50
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|2C, "...+CPMS: 0,25,
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 300|2C,|322|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A |4FO|4BK 0,25,0,255....OK
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 0D |0A                                                          ..              
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,25,0,25,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Parsed int 25
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Size : 25
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Getting phone SMS status
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: SENDING frame type 0x00/length 0x12/18
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 22"|0D                                                          ".              
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 1 "AT+CPMS="ME","ME""
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 2 "+CPMS: 0,255,0,255,0,255"
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 3 "OK"
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Checking line: OK
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: AT reply state: 1
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: RECEIVED frame type 0x00/length 0x34/52
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|355|355 "...+CPMS: 0,255
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 2C,|300|2C,|322|355|355|2C,|300|2C,|322|355|355|0D |0A |0D |0A  ,0,255,0,255....
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: 4FO|4BK|0D |0A                                                  OK..            
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: SMS status received
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Parsing +CPMS: 0,255,0,255,0,255 with +CPMS: @i, @i, @0
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Parsed int 0
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Parsed int 255
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Used : 0
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Size : 255
Thu 2018/06/07 11:30:08 gammu-smsd[15841]: gammu: Leaving GSM_GetSMSStatus

As you can see, a modem sends notification when delivery report is received with the storage location: +CDSI: "SR",0.

Maybe this could be a solution to read and process +CDSI command? Modems which use ME memory for delivery reports also send +CDSI (for example: +CDSI: "ME",1) with the storage location of received delivery report.

@melones melones changed the title from Add support for delivery reports in SR memory to gammu-smsd: add support for delivery reports in SR memory Jun 18, 2018

@nijel nijel changed the title from gammu-smsd: add support for delivery reports in SR memory to gammu-smsd: add support for delivery reports in SR memory [$500] Jun 21, 2018

@nijel nijel added the bounty label Jun 21, 2018

@melones

This comment has been minimized.

melones commented Jun 25, 2018

For anyone that would like to contribute: bounty link
Maybe @gnidorah?

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jun 28, 2018

Having reviewed your log and the code I can resolve this ticket, I estimate ~20hrs work so the bounty currently is to low for me to commit that time.

If you're able to encourage contributions I can look at it again, or if you'd like to discuss further let me know.

@melones

This comment has been minimized.

melones commented Jun 29, 2018

@kstuart can you specify what bounty level would get you involved?

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jun 30, 2018

Based on constraining the scope to your use-case I can undertake the work for USD750, my original estimation of effort was a little short as the codebase is reasonably intricate to understand well and there is potential for added complications.

Scope

For devices, functionality will target ATGEN (Generic AT module), which among others would cover your SIM5320E modem.

Requirements

  • Update/create tests and test data for initial coverage of changes.
  • Support reading from SR Memory.
  • Accept/process incoming +CDSI/+CDS messages (PDU SR reports).
  • Support libgammu user callback mechanism (may already work after other requirements met).

Once the work is complete the unsolicited delivery reports are the same as current delivery reports in terms of backend processing.

During acceptance testing If there are any minor changes needed to support your other devices I will of course be happy to make them, however any new functionality required to support esoteric devices is deemed out of scope; Should such a case occur the new requirements can be reviewed and may warrant funding.

Let me know if you've any comments or concerns, if you decide to fund the remaining bounty please consider doing so before my familiarity with the code subsides, thanks.

@melones

This comment has been minimized.

melones commented Jul 2, 2018

The overall approach looks good to me. One suggestion from my side, to try to make it reasonably easy to enable support of SR memory in other devices that SIM5320E (for example other SIMCOM modems). Maybe something like those flags defined in gsmphones.c

The bounty is funded.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 2, 2018

Thanks, I'll get started.

In theory reading SR memory should work across the board for devices advertising support, hopefully the same will be the case for receiving unsolicited status reports, we'll know more once you're able to test and provide updated logs from your modems.

@melones

This comment has been minimized.

melones commented Jul 2, 2018

Should work. I have a device without SR memory, and notification about received status report is also with AT CDSI command. For example: +CDSI: "ME",1

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 2, 2018

Yes, CDSI from non SR memory should be supported, I'll add a test case for that.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 5, 2018

Initial code is available here: https://github.com/kstuart/gammu/tree/408_unsolicited_delivery_reports

If you need a binary let me know, but I'm assuming you've got that covered ;)

In summary, added support for:

  • GSM SR memory
  • Processing of incoming +CDSI messages
  • Feature flags: F_SMS_SR, F_SMS_NO_SR

I've no hardware for testing so had to rely on software tests only. All existing and new tests are passing, however do test thoroughly outside of a production environment before deploying. If it doesn't work as expected, to keep the ticket easy to follow please attach logs rather than pasting them.

Though you didn't ask for it, for completeness I intended to also add support for +CDS messages, however unfortunately I was unable to find any examples to guide me, I can revisit this if such examples become available (a log including +CMT messages might do it).

Thanks for funding the work! Let me know if you've any issues before I make a pull request.

@melones

This comment has been minimized.

melones commented Jul 6, 2018

Ok. Many thanks.
Binary is not needed, we will handle it. We will do the testing in next few days and give feedback.

@melones

This comment has been minimized.

melones commented Jul 6, 2018

We did first tests and unfortunately it didn't work as expected. Once "+CDSI: "SR",0" is received it is correctly identified as "Incoming SMS status report". However the report is not read/processed from SR memory.

See the log:
dev_with_SR.txt
We did 2 tests:
First test without F_SMS_SR flag
Second test with F_SMS_SR flag set for the device in gsmphones.c

For comparison and troubleshooting I attach a log of a device that stores unsolicited delivery reports in ME memory. This is the case where gammu reads/processes the report correctly.
dev_without_SR.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 6, 2018

Made an incorrect assumption regarding SMSD, please try again with latest code, SMSD should now process the report.

FYI: The log dev_without_SR.txt shows the unsolicited status report being ignored, I don't believe unsolicited status reports were previously processable as libgammu ignores +CDS/+CDSI messages, it's likely any delivery reports were received via a different mechanism.

@melones

This comment has been minimized.

melones commented Jul 9, 2018

Hi, will compile and check again .

BTW, look at the following content of dev_without_SR.txt:

Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: SMS listing received
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Parsing +CMGL: 1,0,,25 with +CMGL: @i, @0
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Parsed int 1
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: ATGEN folder 2 & location 1 -> SMS folder 0 & location 100001
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Parsing +CMGL: 1,0,,25 with +CMGL: @i, @i, @0
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Parsed int 1
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Parsed int 0
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Read 1 SMS locations
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Getting message from cache
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: 07918497908952F006F20B918466204994F5816070117504808160701175248000
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Number Length=7
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Number type 91 (1 0 0 1|0 0 0 1)
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: International number
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Len 6
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: SMS center number : "+48790998250"
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: SMS type: Status report
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: SMS MR: 0xF2
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Number Length=11
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Number type 91 (1 0 0 1|0 0 0 1)
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: International number
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Len 6
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Remote number : "+48123456789"
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Decoding date & time: Thu 07 Jun 2018 11:57:40  +0200
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Decoding date & time: Thu 07 Jun 2018 11:57:42  +0200
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Leaving GSM_GetNextSMS
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: Received message from: +48123456789
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Entering GSM_GetNextSMS
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Number = 1, Location = 100001, Folder = 0
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Cache status: Found: 1, count: 1
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: GSM_GetNextSMS failed with error EMPTY[22]: Empty entry.
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: gammu: Leaving GSM_GetNextSMS
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: Read 1 messages
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: Delivery report: Delivered to +48123456789
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: Execute SQL: SELECT "ID", "Status", "SendingDateTime", "DeliveryDateTime", "SMSCNumber" FROM sentitems WHERE "DeliveryDateTime" IS NULL AND "SenderID" = 'phone1' AND "TPMR" = 242 AND "DestinationNumber" = '+48123456789'
Thu 2018/06/07 11:57:50 gammu-smsd[17373]: Checking for delivery report, SMSC=+48790998250, state=SendingOK

This is the place where unsolicited status report is read from memory and processed by SMSD. This is at the end of attached file.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 9, 2018

Ah, thanks for clarification, so it's not receiving the report via CDSI mechanism, but via standard polling.
I've had to update code to ensure reports/SMS aren't read multiple times as I've implemented CDSI via callback, also noticed a small bug, could you please pull latest code for testing.

Unfortunately as I don't have a device for testing, we may have to round trip a couple more times, hope that's not too inconvenient. I'll investigate creating a functional test for this at the SMSD level but that may not be possible.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 9, 2018

Sorry, hold testing for now. I've created an SMSD functional test and see issues, will update when tests are passing.

@melones

This comment has been minimized.

melones commented Jul 9, 2018

Ok :)
Anyway, here is the log from SMSD+hardware. Maybe it will be of some use as well.
dev_test_20180709-1.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 12, 2018

The issue is gammu doesn't support nested calls, to support +CDSI notifications in SMSD they would need to be collected and messages read outside of the callback, also a bug in the state machine meant notification messages wouldn't be cleaned up properly.

A simpler and more efficient solution is to use +CDS notifications since they push the status report to the TE, I've defaulted SMSD to use +CDS and implemented initial support, the test passes however it's based on documentation of +CDS, the exact format of the notification may differ on actual hardware so please run the latest code and attach a log.

@melones

This comment has been minimized.

melones commented Jul 12, 2018

It compiles. We will do the testing now.

@melones

This comment has been minimized.

melones commented Jul 12, 2018

Right now the SR memory is checked with AT+CPMS="SR","SR". Modem reports that there are messages in the SR memory: +CPMS: 1,1,1,1,0,255. However those messages are never read and processed.

I attach a log file.
dev_test_20180712-1.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 12, 2018

That log doesn't look right, SMSD isn't initially connecting to the device so no device initialization/setup is occurring?

From line 26 onward:

Thu 2018/07/12 12:24:35 gammu-smsd[4688]: gammu: [Device           - "/dev/ttyPMDM0"]
Thu 2018/07/12 12:24:35 gammu-smsd[4688]: gammu: [Running on       - Linux, kernel 4.4.50-v7+ (#1 SMP Thu Mar 23 10:57:53 EET 2017)]
Thu 2018/07/12 12:24:35 gammu-smsd[4688]: gammu: [System error     - failed to lock device, probably opened by other process, 11, "Resource temporarily unavailable"]
Thu 2018/07/12 12:24:35 gammu-smsd[4688]: gammu: Init:GSM_TryGetModel failed with error DEVICEOPENERROR[2]: Error opening device. Unknown, busy or no permissions.
Thu 2018/07/12 12:24:35 gammu-smsd[4688]: Can't open device: Error opening device. Unknown, busy or no permissions. (DEVICEOPENERROR[2])
Thu 2018/07/12 12:24:35 gammu-smsd[4688]: Stopping Gammu smsd: No error. (NONE[1])
Thu 2018/07/12 12:24:35 gammu-smsd[4688]: Disconnecting from SQL database.
Thu 2018/07/12 12:24:37 gammu-smsd[4456]: gammu: Entering GSM_GetSecurityStatus

To clarify, the device wasn't configured by gammu-smsd due to the initial failure to open it, so among other setup tasks the +CNMI messages to configure delivery reports were not made, which is why the reports were not delivered via +CDS messages.

Really gammu-smsd should have tried to recover or exited rather than operate from an unknown state, If you'd like I can change the behaviour so it does actually shutdown if it initially cannot connect to the device?

@melones

This comment has been minimized.

melones commented Jul 13, 2018

Hi,
Yes, that would be desired to recover or shutdown if gammu-smsd initially cannot connect to the device.

I did another test, however still no success. Modem is now initialized correctly, beside one thing: gammu-smsd tries to set AT+CNMI=2,1,0,1 but fails with response:
Fri 2018/07/13 11:11:15 gammu-smsd[507]: gammu: 2 "+CMS ERROR: 303"
I checked what is a default setting for CNMI on the modem at it's +CNMI: 2,1,0,2,0.

Please see full log for details:
dev_test_20180713-1.txt

@melones

This comment has been minimized.

melones commented Jul 16, 2018

@kstuart if you need any more tests or logs just let me know.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 16, 2018

At least for that hardware it looks like CNMI mode would also need to be set to 1, I'll hold off on that approach as I've implemented support for nested state machine calls and re-enabled CDSI processing.

Please pull branch cdsi-nested and test.
SMSD will now shutdown during initialization if it fails to open device.

When a +CDSI response is received, SMSD should read, process and delete the message from memory.

@melones

This comment has been minimized.

melones commented Jul 16, 2018

I did first test. We are one step further :) PDU with delivery report is received. PDU is correct (I tested it in PDU decoder),
However there are problems with PDU decoding in SMSD. While SMSD reads and processes the PDU with delivery report it throws series of "UNKNOWN response" errors. Please see the attached log file:
dev_test_20180716-1.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 17, 2018

Despite allowing nested calls from the callback it's apparent that the software doesn't know how to handle the hanging security check that was interrupted by the +CDSI.

Changed the callback so it now simply caches the +CDSI information, and process that cache just before checking for incoming SMS.

Please pull update and test.

@melones

This comment has been minimized.

melones commented Jul 17, 2018

Pulling and testing.

@melones

This comment has been minimized.

melones commented Jul 17, 2018

Build error occured:

/source/gammu/smsd/core.c: In function ‘SMSD_ProcessSMSInfo’:
/source/gammu/smsd/core.c:2068:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
  for(unsigned int i = 0; i < Cache->cache_used; i++) {
  ^
/source/gammu/smsd/core.c:2068:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
[ 46%] Built target messagecmdline
smsd/CMakeFiles/gsmsd.dir/build.make:62: recipe for target 'smsd/CMakeFiles/gsmsd.dir/core.c.o' failed
make[2]: *** [smsd/CMakeFiles/gsmsd.dir/core.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 17, 2018

fixed, try again.

@melones

This comment has been minimized.

melones commented Jul 17, 2018

Still, SMSD throws unknown response errors. See attached log:
dev_test_20180717-1.txt

If you need access to test machine, please share your email. I will contact you on priv for details.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 17, 2018

Huh, well that's a completely different issue, it looks like ATGEN_GetSMS would never have worked for that modem.

Adjusted pattern matching to catch that +CMGR format.

If you pull latest code that will no longer fail ;).

Yes, I think it would be productive if I can test against hardware and iron out any issues, I'm out of office for about an hour or so, will send you an email soon as I get back.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 17, 2018

Actually that +CMGR response is only returning the message length, not the state. erroneously the hastily added pattern match is setting the state to the message length.

Have adjusted to default state to 0 which should be 'New Message'.

You'll need to pull again.

@melones

This comment has been minimized.

melones commented Jul 17, 2018

Attached log from the latest pull. Delivery report has been processed.
Now only slight problem with delete command remains.
GSM_DeleteSMS failed with error INVALIDLOCATION[24]: Invalid location.
See the log:
dev_test_20180717-2.txt

@melones

This comment has been minimized.

melones commented Jul 17, 2018

And another log where first SMSD sends SMS/receives delivery report, then receives incoming SMS. For incoming SMS delete process is performed correctly. Check timestamp: Tue 2018/07/17 13:35:15
dev_test_20180717-3.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 18, 2018

From reviewing the logs the delete command, it's argument, and the preceeding CPMS command appear to be correct.

For log 20180717-3 line 1125 shows that for SR memory there is a total of 1 locations with 1 used. It looks like at least for this modem SR memory may be treated specially and could be read only.

Please run a test that results in multiple +CDSI notifications for SR memory to see how that effects CPMS results, and if all reports are captured and correct.

Also if you've any other modems that use +CDSI and SR memory please also test on them so results can be compared.

@melones

This comment has been minimized.

melones commented Jul 18, 2018

I have sent you a detailed log analysis in private message

@melones

This comment has been minimized.

melones commented Jul 26, 2018

Hi,
We have got another device with SR memory. I have run tests and it seems that there is one final part to be done. At the end of delivery report reading process an error occurs:

Thu 2018/07/26 13:12:28 gammu-smsd[29680]: gammu: Requested memory not available for writing: SR
Thu 2018/07/26 13:12:28 gammu-smsd[29680]: gammu: GSM_DeleteSMS failed with error MEMORY_NOT_AVAILABLE[44]: The type of memory is not available or has been disabled.
Thu 2018/07/26 13:12:28 gammu-smsd[29680]: gammu: Leaving GSM_DeleteSMS
Thu 2018/07/26 13:12:28 gammu-smsd[29680]: Error deleting SMS: The type of memory is not available or has been disabled. (MEMORY_NOT_AVAILABLE[44])

and the delivery report is not deleted from SR memory. The report should be deleted with AT+CMGD=[location] And this should fix the problem.

See the full log for details.
dev_test_20180726-1.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 26, 2018

This is because the default implementation of ATGEN_DeleteSMS mistakenly expects the target memory to be writeable, however this is not required for deleting messages.

Being cautions of changing existing behaviour unless absolutely necessary and since the SIMCOM modem reported SR as both readable and writeable I left well alone.

I've updated the implementation to delete from <mem1> (read/delete), but preserve existing behaviour just in case some other code relies on it, though I believe it's likely incorrect for any such dependency.

Please pull and retest.

@melones

This comment has been minimized.

melones commented Jul 26, 2018

An error occured during fetching from memory:

Thu 2018/07/26 14:55:37 gammu-smsd[4360]: gammu: Did not parse all PDU data (35, 36)!
Thu 2018/07/26 14:55:37 gammu-smsd[4360]: gammu: GSM_GetSMS failed with error UNKNOWN[27]: Unknown error.
Thu 2018/07/26 14:55:37 gammu-smsd[4360]: gammu: Leaving GSM_GetSMS
Thu 2018/07/26 14:55:37 gammu-smsd[4360]: Error fetching SMS from memory SR:2

See the log file:
dev_test_20180726-2.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 26, 2018

I've written a test for the PDU decoder and it appears to choke on that PDU, works on the PDU from your previous uploaded log.

Will investigate further.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 26, 2018

There appears to be data at end of PDU that's not required for successfully parsing a GSM 03.40 9.2.2.3 SMS-STATUS-REPORT. This probably should not be an error as GSM_DecodePDUFrame parsed the status report without error.

Have changed this from an error to a diagnostic.

Please retest.

@melones

This comment has been minimized.

melones commented Jul 27, 2018

Tested. Still error occurs in delete process. I think there is a wrong location given. It is AT+CMGD=0 and should be AT+CMGD=3, because we earlier received +CDSI: "SR",3. See details in the log.
dev_test_20180727-1.txt

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 27, 2018

When patching DeleteSMS to work with non writeable memory I failed to ensure GetSMSLocation was called for all cases.

I've written a test case for DeleteSMS, it should now work, please update and retest.

@melones

This comment has been minimized.

melones commented Jul 27, 2018

It works! 👍
Delivery report is read and deleted from SR memory as expected.
See the log:
dev_test_20180727-2.txt

My only remark is that in GSM_DeleteSMS procedure message is read/decoded/deleted. Whereas I think only the delete part (AT+CMGD) would be only needed here. @nijel: can you share your opinion whether this is necessary? But this is a minor flaw and doesn't affect the new feature.

The issue can be closed.

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 27, 2018

Awesome, glad it's working for you :)

Agreed the read in DeleteSMS strictly speaking is redundant, the comment for doing so is /* By reading SMS we check if it is really inbox/outbox */

I can't say I really understand that, or if such reasoning remains valid today, I don't believe the current test suite is sufficient to be able to perform such behavioural changes with confidence.

@nijel After cleaning up the commits and tests I'll make a PR, in the meantime could you please close this issue, thanks.

@melones is it OK to use the PDUs from your logs in the official tests?

@melones

This comment has been minimized.

melones commented Jul 27, 2018

Id' rather not have my numbers left in PDUs in test suites... Can you create a modified PDU with masked phone number?

@kstuart

This comment has been minimized.

Contributor

kstuart commented Jul 27, 2018

OK, those tests will not be included in PR at this time.

@nijel

This comment has been minimized.

Member

nijel commented Jul 27, 2018

Masking out numbers in PDU is quite easy, they are just reordered and there is no checksum.

@nijel nijel self-assigned this Sep 20, 2018

@nijel nijel closed this in 5dabe59 Sep 20, 2018

@nijel nijel changed the title from gammu-smsd: add support for delivery reports in SR memory [$500] to gammu-smsd: add support for delivery reports in SR memory [$800] Sep 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment