Skip to content
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

GSM_SetIncomingUSSDCallback is never called with libgammu 1.36.5 #130

Closed
mhogomchungu opened this issue Aug 30, 2015 · 5 comments
Closed
Labels

Comments

@mhogomchungu
Copy link

I have a modem that ``lsusb` identifies as:

Bus 001 Device 041: ID 19d2:0117 ZTE WCDMA Technologies MSM 

When the modem is connected to the computer,dmesg reports the following:

[    0.000000] usb 1-6: new high-speed USB device number 41 using xhci_hcd
[    0.000000] usb 1-6: New USB device found, idVendor=19d2, idProduct=0117
[    0.000000] usb 1-6: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[    0.000000] usb 1-6: Product: ZTE WCDMA Technologies MSM
[    0.000000] usb 1-6: Manufacturer: ZTE,Incorporated
[    0.000000] usb 1-6: SerialNumber: MF1900ZTED010000
[    0.000000] option 1-6:1.0: GSM modem (1-port) converter detected
[    0.000000] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB0
[    0.000000] option 1-6:1.1: GSM modem (1-port) converter detected
[    0.000000] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB1
[    0.000000] option 1-6:1.2: GSM modem (1-port) converter detected
[    0.000000] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB2
[    0.000000] usb-storage 1-6:1.3: USB Mass Storage device detected
[    0.000000] scsi host36: usb-storage 1-6:1.3
[    0.000000] scsi 36:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2
[    0.000000] scsi 36:0:0:1: Direct-Access     ZTE      MMC Storage      2.31 PQ: 0 ANSI: 2
[    0.000000] sr 36:0:0:0: [sr1] scsi-1 drive
[    0.000000] sr 36:0:0:0: Attached scsi CD-ROM sr1
[    0.000000] sr 36:0:0:0: Attached scsi generic sg3 type 5
[    0.000000] sd 36:0:0:1: Attached scsi generic sg4 type 0
[    0.000000] sd 36:0:0:1: [sdc] Attached SCSI removable disk

The problem seems to be that a call back function set with GSM_SetIncomingUSSDCallback() is not called with libgammu version 1.36.5 but it does work correctly when using libgammu version 1.33.0

Logs for libgammu version 1.33.0 where things work and GSM_DialService() generates a response is below:

Logs for libgammy version 1.36.5 where things do not work will follow afterwards

[mtz@ink build-ussd-gui-Desktop-Release]$ ./ussd-gui
[Gammu            - 1.33.0 built 07:45:33 Nov 15 2014 using GCC 4.7]
[Connection       - "at19200"]
[Connection index - 0]
[Model type       - ""]
[Device           - "/dev/ttyUSB1"]
[Running on       - Linux, kernel 4.1.5-pclos1 (#1 SMP Mon Aug 10 21:49:43 CDT 2015)]
Serial device: DTR is up, RTS is up, CAR is down, CTS is down
Setting speed to 19200
[Module           - "auto"]
Escaping SMS mode
SENDING frametype 0x00/length 0x02/2
1B |0D                                                          ..
Sending simple AT command to wake up some devices
SENDING frametype 0x00/length 0x03/3
41A|54T|0D                                                      AT.
1 "AT"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x09/9
41A|54T|0D |0D |0A |4FO|4BK|0D |0A                              AT...OK..
Enabling echo
SENDING frametype 0x00/length 0x05/5
41A|54T|45E|311|0D                                              ATE1.
1 "ATE1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x0B/11
41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A                      ATE1...OK..
Trying Motorola mode switch
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D                          AT+MODE=2.
1 "AT+MODE=2"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x13/19
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |45E|52R|52R|4FO AT+MODE=2...ERRO
52R|0D |0A                                                      R..
Seems not to be supported
Enabling CME errors
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D                          AT+CMEE=1.
1 "AT+CMEE=1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CMEE=1...OK..
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D                              AT+CSCS?.
1 "AT+CSCS?"
2 "+CSCS: "GSM""
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x1F/31
41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53S AT+CSCS?...+CSCS
3A:|20 |22"|47G|53S|4DM|22"|0D |0A |0D |0A |4FO|4BK|0D |0A      : "GSM"....OK..
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|49I|0D                                  AT+CGMI.
1 "AT+CGMI"
2 "ZTE CORPORATION"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x21/33
41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |5AZ|54T|45E|20 |43C|4FO AT+CGMI...ZTE CO
52R|50P|4FO|52R|41A|54T|49I|4FO|4EN|0D |0A |0D |0A |4FO|4BK|0D  RPORATION....OK.
0A                                                              .
Manufacturer info received
[Manufacturer: ZTE CORPORATION]
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D                          AT+CSCS=?.
1 "AT+CSCS=?"
2 "+CSCS: ("IRA","GSM","UCS2")"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x2F/47
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43C AT+CSCS=?...+CSC
53S|3A:|20 |28(|22"|49I|52R|41A|22"|2C,|22"|47G|53S|4DM|22"|2C, S: ("IRA","GSM",
22"|55U|43C|53S|322|22"|29)|0D |0A |0D |0A |4FO|4BK|0D |0A      "UCS2")....OK..
Chosen GSM as normal charset
Chosen UCS2 as unicode charset
Getting model
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|4DM|0D                                  AT+CGMM.
1 "AT+CGMM"
2 "MF190A"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x18/24
41A|54T|2B+|43C|47G|4DM|4DM|0D |0D |0A |4DM|46F|311|399|300|41A AT+CGMM...MF190A
0D |0A |0D |0A |4FO|4BK|0D |0A                                  ....OK..
Unknown model, but it should still work
[Model name: `MF190A']
[Model data: `']
[Model data: `unknown']
[Connected model  - "MF190A"]
Checking for OBEX support
SENDING frametype 0x00/length 0x0B/11
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D                      AT+CPROT=?.
1 "AT+CPROT=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x14/20
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D |0D |0A |45E|52R|52R AT+CPROT=?...ERR
4FO|52R|0D |0A                                                  OR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0C/12
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D                  AT+SYNCML=?.
1 "AT+SYNCML=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x15/21
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D |0D |0A |45E|52R AT+SYNCML=?...ER
52R|4FO|52R|0D |0A                                              ROR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0D/13
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D              AT$TSSPCSW=?.
1 "AT$TSSPCSW=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x16/22
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D |0D |0A |45E AT$TSSPCSW=?...E
52R|52R|4FO|52R|0D |0A                                          RROR..
[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"]
Escaping SMS mode
SENDING frametype 0x00/length 0x02/2
1B |0D                                                          ..
Sending simple AT command to wake up some devices
SENDING frametype 0x00/length 0x03/3
41A|54T|0D                                                      AT.
1 "AT"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x09/9
41A|54T|0D |0D |0A |4FO|4BK|0D |0A                              AT...OK..
Enabling echo
SENDING frametype 0x00/length 0x05/5
41A|54T|45E|311|0D                                              ATE1.
1 "ATE1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x0B/11
41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A                      ATE1...OK..
Trying Motorola mode switch
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D                          AT+MODE=2.
1 "AT+MODE=2"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x13/19
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |45E|52R|52R|4FO AT+MODE=2...ERRO
52R|0D |0A                                                      R..
Seems not to be supported
Enabling CME errors
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D                          AT+CMEE=1.
1 "AT+CMEE=1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CMEE=1...OK..
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D                              AT+CSCS?.
1 "AT+CSCS?"
2 "+CSCS: "GSM""
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x1F/31
41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53S AT+CSCS?...+CSCS
3A:|20 |22"|47G|53S|4DM|22"|0D |0A |0D |0A |4FO|4BK|0D |0A      : "GSM"....OK..
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|49I|0D                                  AT+CGMI.
1 "AT+CGMI"
2 "ZTE CORPORATION"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x21/33
41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |5AZ|54T|45E|20 |43C|4FO AT+CGMI...ZTE CO
52R|50P|4FO|52R|41A|54T|49I|4FO|4EN|0D |0A |0D |0A |4FO|4BK|0D  RPORATION....OK.
0A                                                              .
Manufacturer info received
[Manufacturer: ZTE CORPORATION]
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D                          AT+CSCS=?.
1 "AT+CSCS=?"
2 "+CSCS: ("IRA","GSM","UCS2")"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x2F/47
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43C AT+CSCS=?...+CSC
53S|3A:|20 |28(|22"|49I|52R|41A|22"|2C,|22"|47G|53S|4DM|22"|2C, S: ("IRA","GSM",
22"|55U|43C|53S|322|22"|29)|0D |0A |0D |0A |4FO|4BK|0D |0A      "UCS2")....OK..
Chosen GSM as normal charset
Chosen UCS2 as unicode charset
Checking for OBEX support
SENDING frametype 0x00/length 0x0B/11
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D                      AT+CPROT=?.
1 "AT+CPROT=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x14/20
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D |0D |0A |45E|52R|52R AT+CPROT=?...ERR
4FO|52R|0D |0A                                                  OR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0C/12
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D                  AT+SYNCML=?.
1 "AT+SYNCML=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x15/21
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D |0D |0A |45E|52R AT+SYNCML=?...ER
52R|4FO|52R|0D |0A                                              ROR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0D/13
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D              AT$TSSPCSW=?.
1 "AT$TSSPCSW=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x16/22
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D |0D |0A |45E AT$TSSPCSW=?...E
52R|52R|4FO|52R|0D |0A                                          RROR..
Getting firmware versions
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|52R|0D                                  AT+CGMR.
1 "AT+CGMR"
2 "BD_MF190TLF3V1.0.0B11"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x27/39
41A|54T|2B+|43C|47G|4DM|52R|0D |0D |0A |42B|44D|5F_|4DM|46F|311 AT+CGMR...BD_MF1
399|300|54T|4CL|46F|333|56V|311|2E.|300|2E.|300|42B|311|311|0D  90TLF3V1.0.0B11.
0A |0D |0A |4FO|4BK|0D |0A                                      ...OK..
Received firmware version: "BD_MF190TLF3V1.0.0B11"
Number version is "19031.001100"
[Firmware version - "BD_MF190TLF3V1.0.0B11"]
[Connected]
Entering GSM_SetIncomingUSSD
Enabling incoming USSD
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|55U|53S|44D|3D=|311|0D                          AT+CUSD=1.
1 "AT+CUSD=1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|55U|53S|44D|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CUSD=1...OK..
Leaving GSM_SetIncomingUSSD
Entering GSM_DialService
SENDING frametype 0x00/length 0x18/24
41A|54T|2B+|43C|55U|53S|44D|3D=|311|2C,|22"|2A*|311|344|388|2A* AT+CUSD=1,"*148*
388|388|23#|22"|2C,|311|355|0D                                  88#",15.
1 "AT+CUSD=1,"*148*88#",15"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x1E/30
41A|54T|2B+|43C|55U|53S|44D|3D=|311|2C,|22"|2A*|311|344|388|2A* AT+CUSD=1,"*148*
388|388|23#|22"|2C,|311|355|0D |0D |0A |4FO|4BK|0D |0A          88#",15...OK..
Incoming USSD received
Leaving GSM_DialService
1 "+CUSD: 1,"00420061006E0064006F00200042006F006D006200610020007A006100200049006E00740061006E0065007400690021000A0031002E004300680061006700750061002000420061006E0064006F000A0032002E004D006E0075006E0075006C0069006500200072006100660069006B0069000A0033002E00530061006C0069006F000A0034002E0042006100640069006C00690020006C0075006700680061",72"
Checking line: +CUSD: 1,"00420061006E0064006F00200042006F006D006200610020007A006100200049006E00740061006E0065007400690021000A0031002E004300680061006700750061002000420061006E0064006F000A0032002E004D006E0075006E0075006C0069006500200072006100660069006B0069000A0033002E00530061006C0069006F000A0034002E0042006100640069006C00690020006C0075006700680061",72
AT reply state: 4
RECEIVED frametype 0x00/length 0x150/336
2B+|43C|55U|53S|44D|3A:|20 |311|2C,|22"|300|300|344|322|300|300 +CUSD: 1,"004200
366|311|300|300|366|45E|300|300|366|344|300|300|366|46F|300|300 61006E0064006F00
322|300|300|300|344|322|300|300|366|46F|300|300|366|44D|300|300 200042006F006D00
366|322|300|300|366|311|300|300|322|300|300|300|377|41A|300|300 6200610020007A00
366|311|300|300|322|300|300|300|344|399|300|300|366|45E|300|300 6100200049006E00
377|344|300|300|366|311|300|300|366|45E|300|300|366|355|300|300 740061006E006500
377|344|300|300|366|399|300|300|322|311|300|300|300|41A|300|300 7400690021000A00
333|311|300|300|322|45E|300|300|344|333|300|300|366|388|300|300 31002E0043006800
366|311|300|300|366|377|300|300|377|355|300|300|366|311|300|300 6100670075006100
322|300|300|300|344|322|300|300|366|311|300|300|366|45E|300|300 2000420061006E00
366|344|300|300|366|46F|300|300|300|41A|300|300|333|322|300|300 64006F000A003200
322|45E|300|300|344|44D|300|300|366|45E|300|300|377|355|300|300 2E004D006E007500
366|45E|300|300|377|355|300|300|366|43C|300|300|366|399|300|300 6E0075006C006900
366|355|300|300|322|300|300|300|377|322|300|300|366|311|300|300 6500200072006100
366|366|300|300|366|399|300|300|366|42B|300|300|366|399|300|300 660069006B006900
300|41A|300|300|333|333|300|300|322|45E|300|300|355|333|300|300 0A0033002E005300
366|311|300|300|366|43C|300|300|366|399|300|300|366|46F|300|300 61006C0069006F00
300|41A|300|300|333|344|300|300|322|45E|300|300|344|322|300|300 0A0034002E004200
366|311|300|300|366|344|300|300|366|399|300|300|366|43C|300|300 6100640069006C00
366|399|300|300|322|300|300|300|366|43C|300|300|377|355|300|300 690020006C007500
366|377|300|300|366|388|300|300|366|311|22"|2C,|377|322|0D |0A  6700680061",72..
Incoming USSD received
Parsing +CUSD: 1,"00420061006E0064006F00200042006F006D006200610020007A006100200049006E00740061006E0065007400690021000A0031002E004300680061006700750061002000420061006E0064006F000A0032002E004D006E0075006E0075006C0069006500200072006100660069006B0069000A0033002E00530061006C0069006F000A0034002E0042006100640069006C00690020006C0075006700680061",72
 with +CUSD: @i @0
Parsed int 1
Status: 1
Parsing +CUSD: 1,"00420061006E0064006F00200042006F006D006200610020007A006100200049006E00740061006E0065007400690021000A0031002E004300680061006700750061002000420061006E0064006F000A0032002E004D006E0075006E0075006C0069006500200072006100660069006B0069000A0033002E00530061006C0069006F000A0034002E0042006100640069006C00690020006C0075006700680061",72
 with +CUSD: @i, @s @0
Parsed int 1
Grabbed string from reply: "00420061006E0064006F00200042006F006D006200610020007A006100200049006E00740061006E0065007400690021000A0031002E004300680061006700750061002000420061006E0064006F000A0032002E004D006E0075006E0075006C0069006500200072006100660069006B0069000A0033002E00530061006C0069006F000A0034002E0042006100640069006C00690020006C0075006700680061" (parsed 322 bytes)
Parsed generic string "00420061006E0064006F00200042006F006D006200610020007A006100200049006E00740061006E0065007400690021000A0031002E004300680061006700750061002000420061006E0064006F000A0032002E004D006E0075006E0075006C0069006500200072006100660069006B0069000A0033002E00530061006C0069006F000A0034002E0042006100640069006C00690020006C0075006700680061"
Generic string decoded as "00420061006E0064006F00200042006F006D006200610020007A006100200049006E00740061006E0065007400690021000A0031002E004300680061006700750061002000420061006E0064006F000A0032002E004D006E0075006E0075006C0069006500200072006100660069006B0069000A0033002E00530061006C0069006F000A0034002E0042006100640069006C00690020006C0075006700680061"

logs for libgammu version 1.36.5 follows:

[mtz@ink build-ussd-gui-Desktop-Release]$ ./ussd-gui
[Gammu            - 1.36.5]
[Connection       - "at19200"]
[Connection index - 0]
[Model type       - ""]
[Device           - "/dev/ttyUSB1"]
[Running on       - Linux, kernel 4.1.5-pclos1 (#1 SMP Mon Aug 10 21:49:43 CDT 2015)]
Serial device: DTR is up, RTS is up, CAR is down, CTS is down
Setting speed to 19200
[Module           - "auto"]
Escaping SMS mode
SENDING frametype 0x00/length 0x02/2
1B |0D                                                          ..
Sending simple AT command to wake up some devices
SENDING frametype 0x00/length 0x03/3
41A|54T|0D                                                      AT.
1 "AT"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x09/9
41A|54T|0D |0D |0A |4FO|4BK|0D |0A                              AT...OK..
Enabling echo
SENDING frametype 0x00/length 0x05/5
41A|54T|45E|311|0D                                              ATE1.
1 "ATE1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x0B/11
41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A                      ATE1...OK..
Trying Motorola mode switch
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D                          AT+MODE=2.
1 "AT+MODE=2"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x13/19
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |45E|52R|52R|4FO AT+MODE=2...ERRO
52R|0D |0A                                                      R..
Seems not to be supported
Enabling CME errors
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D                          AT+CMEE=1.
1 "AT+CMEE=1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CMEE=1...OK..
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D                              AT+CSCS?.
1 "AT+CSCS?"
2 "+CSCS: "GSM""
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x1F/31
41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53S AT+CSCS?...+CSCS
3A:|20 |22"|47G|53S|4DM|22"|0D |0A |0D |0A |4FO|4BK|0D |0A      : "GSM"....OK..
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|49I|0D                                  AT+CGMI.
1 "AT+CGMI"
2 "ZTE CORPORATION"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x21/33
41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |5AZ|54T|45E|20 |43C|4FO AT+CGMI...ZTE CO
52R|50P|4FO|52R|41A|54T|49I|4FO|4EN|0D |0A |0D |0A |4FO|4BK|0D  RPORATION....OK.
0A                                                              .
Manufacturer info received
[Manufacturer: ZTE CORPORATION]
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D                          AT+CSCS=?.
1 "AT+CSCS=?"
2 "+CSCS: ("IRA","GSM","UCS2")"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x2F/47
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43C AT+CSCS=?...+CSC
53S|3A:|20 |28(|22"|49I|52R|41A|22"|2C,|22"|47G|53S|4DM|22"|2C, S: ("IRA","GSM",
22"|55U|43C|53S|322|22"|29)|0D |0A |0D |0A |4FO|4BK|0D |0A      "UCS2")....OK..
Chosen GSM as normal charset
Chosen UCS2 as unicode charset
Getting model
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|4DM|0D                                  AT+CGMM.
1 "AT+CGMM"
2 "MF190A"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x18/24
41A|54T|2B+|43C|47G|4DM|4DM|0D |0D |0A |4DM|46F|311|399|300|41A AT+CGMM...MF190A
0D |0A |0D |0A |4FO|4BK|0D |0A                                  ....OK..
Unknown model, but it should still work
[Model name: `MF190A']
[Model data: `']
[Model data: `unknown']
[Connected model  - "MF190A"]
Checking for OBEX support
SENDING frametype 0x00/length 0x0B/11
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D                      AT+CPROT=?.
1 "AT+CPROT=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x14/20
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D |0D |0A |45E|52R|52R AT+CPROT=?...ERR
4FO|52R|0D |0A                                                  OR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0C/12
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D                  AT+SYNCML=?.
1 "AT+SYNCML=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x15/21
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D |0D |0A |45E|52R AT+SYNCML=?...ER
52R|4FO|52R|0D |0A                                              ROR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0D/13
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D              AT$TSSPCSW=?.
1 "AT$TSSPCSW=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x16/22
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D |0D |0A |45E AT$TSSPCSW=?...E
52R|52R|4FO|52R|0D |0A                                          RROR..
[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"]
Escaping SMS mode
SENDING frametype 0x00/length 0x02/2
1B |0D                                                          ..
Sending simple AT command to wake up some devices
SENDING frametype 0x00/length 0x03/3
41A|54T|0D                                                      AT.
1 "AT"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x09/9
41A|54T|0D |0D |0A |4FO|4BK|0D |0A                              AT...OK..
Enabling echo
SENDING frametype 0x00/length 0x05/5
41A|54T|45E|311|0D                                              ATE1.
1 "ATE1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x0B/11
41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A                      ATE1...OK..
Trying Motorola mode switch
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D                          AT+MODE=2.
1 "AT+MODE=2"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x13/19
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |45E|52R|52R|4FO AT+MODE=2...ERRO
52R|0D |0A                                                      R..
Seems not to be supported
Enabling CME errors
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D                          AT+CMEE=1.
1 "AT+CMEE=1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CMEE=1...OK..
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D                              AT+CSCS?.
1 "AT+CSCS?"
2 "+CSCS: "GSM""
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x1F/31
41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53S AT+CSCS?...+CSCS
3A:|20 |22"|47G|53S|4DM|22"|0D |0A |0D |0A |4FO|4BK|0D |0A      : "GSM"....OK..
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|49I|0D                                  AT+CGMI.
1 "AT+CGMI"
2 "ZTE CORPORATION"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x21/33
41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |5AZ|54T|45E|20 |43C|4FO AT+CGMI...ZTE CO
52R|50P|4FO|52R|41A|54T|49I|4FO|4EN|0D |0A |0D |0A |4FO|4BK|0D  RPORATION....OK.
0A                                                              .
Manufacturer info received
[Manufacturer: ZTE CORPORATION]
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D                          AT+CSCS=?.
1 "AT+CSCS=?"
2 "+CSCS: ("IRA","GSM","UCS2")"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x2F/47
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43C AT+CSCS=?...+CSC
53S|3A:|20 |28(|22"|49I|52R|41A|22"|2C,|22"|47G|53S|4DM|22"|2C, S: ("IRA","GSM",
22"|55U|43C|53S|322|22"|29)|0D |0A |0D |0A |4FO|4BK|0D |0A      "UCS2")....OK..
Chosen GSM as normal charset
Chosen UCS2 as unicode charset
Checking for OBEX support
SENDING frametype 0x00/length 0x0B/11
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D                      AT+CPROT=?.
1 "AT+CPROT=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x14/20
41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D |0D |0A |45E|52R|52R AT+CPROT=?...ERR
4FO|52R|0D |0A                                                  OR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0C/12
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D                  AT+SYNCML=?.
1 "AT+SYNCML=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x15/21
41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D |0D |0A |45E|52R AT+SYNCML=?...ER
52R|4FO|52R|0D |0A                                              ROR..
Checking for SYNCML/OBEX support
SENDING frametype 0x00/length 0x0D/13
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D              AT$TSSPCSW=?.
1 "AT$TSSPCSW=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
RECEIVED frametype 0x00/length 0x16/22
41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D |0D |0A |45E AT$TSSPCSW=?...E
52R|52R|4FO|52R|0D |0A                                          RROR..
Getting firmware versions
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|52R|0D                                  AT+CGMR.
1 "AT+CGMR"
2 "BD_MF190TLF3V1.0.0B11"
3 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x27/39
41A|54T|2B+|43C|47G|4DM|52R|0D |0D |0A |42B|44D|5F_|4DM|46F|311 AT+CGMR...BD_MF1
399|300|54T|4CL|46F|333|56V|311|2E.|300|2E.|300|42B|311|311|0D  90TLF3V1.0.0B11.
0A |0D |0A |4FO|4BK|0D |0A                                      ...OK..
Received firmware version: "BD_MF190TLF3V1.0.0B11"
Number version is "19031.001100"
[Firmware version - "BD_MF190TLF3V1.0.0B11"]
[Connected]
Entering GSM_SetIncomingUSSD
Enabling incoming USSD
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|55U|53S|44D|3D=|311|0D                          AT+CUSD=1.
1 "AT+CUSD=1"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|55U|53S|44D|3D=|311|0D |0D |0A |4FO|4BK|0D |0A  AT+CUSD=1...OK..
Leaving GSM_SetIncomingUSSD
Entering GSM_DialService
SENDING frametype 0x00/length 0x18/24
41A|54T|2B+|43C|55U|53S|44D|3D=|311|2C,|22"|2A*|311|344|388|2A* AT+CUSD=1,"*148*
388|388|23#|22"|2C,|311|355|0D                                  88#",15.
1 "AT+CUSD=1,"*148*88#",15"
2 "OK"
Checking line: OK
AT reply state: 1
RECEIVED frametype 0x00/length 0x1E/30
41A|54T|2B+|43C|55U|53S|44D|3D=|311|2C,|22"|2A*|311|344|388|2A* AT+CUSD=1,"*148*
388|388|23#|22"|2C,|311|355|0D |0D |0A |4FO|4BK|0D |0A          88#",15...OK..
Incoming USSD received
Leaving GSM_DialService

@nijel
Copy link
Member

nijel commented Aug 31, 2015

There is no difference in the communication with the modem, so that looks quite strange. Do you get some error from Gammu?

@mhogomchungu
Copy link
Author

No,no errors at all.

Another thing to add is that GSM_ReadDevice() returns true and this return value,without the callback being called put my application ussd-gui in what looks like a hang state.

A place in my code why GSM_ReadDevice() reports there is data to be read while the registered called back in not called is here: https://github.com/mhogomchungu/ussd-gui/blob/ab8980e7e786a8fd77154d4a88aa445790c2eac7/src/mainwindow.cpp#L474

I think GSM_ReadDevice() should not say data has arrived if the call back is not going to be called.

@nijel
Copy link
Member

nijel commented Aug 31, 2015

It doesn't return bool, it returns number of bytes read. So it might be that Gammu didn't yet receive complete reply and could not parse it because of it.

@nijel nijel added the question label Aug 31, 2015
@mhogomchungu
Copy link
Author

I currently do not have the modem so i cant debug the problem by tracing code paths taken for now but looking at the code and i think there is a bug documented below:

When things work as expected,user callback function is called[1] and then the function exits with "success"[2]. But when things fail,there is this[3] code path that exits with "success" without calling the user callback function.

How does whoever calls ATGEN_ReplyGetUSSD() tell the difference between the above two exits?

Looking at other premature exists due to errors and i think the user callback should be called with an "empty" object to let the user know something went wrong instead of just deciding to say nothing.

[1]

s->User.IncomingUSSD(s, &ussd, s->User.IncomingUSSDUserData);

[2]

return ERR_NONE;

[3]

return ERR_NONE;

@nijel
Copy link
Member

nijel commented Aug 31, 2015

The [3] happens only when invoking the AT+CUSD (the reply string then doesn't start with +CUSD, but with AT+CUSD, so it's not the incoming message. So I believe the code is correct here.

As your log doesn't show the received message at all, I'm still quite sure it's the problem I've described - Gammu didn't read enough data to get complete response so it did not process it yet. Calling GSM_ReadDevice just once is not enough in this case.

@nijel nijel closed this as completed Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants