+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Full Member level 4
    Points: 1,840, Level: 9

    Join Date
    Feb 2012
    Posts
    220
    Helped
    10 / 10
    Points
    1,840
    Level
    9

    USSD code to check Balance (AT+UCSD) in GSM/GPRS A6 module

    hi

    how get sim card balance by gsm/gprs A6 module?

    I used the following AT, but does not work and result in unreadable characters or numeric code.

    note : my sim card language is English.

    I used all four AT+CSCS that is supported by A6.but I can not get +CUSD: "English-message".
    why?

    AT commands:

    Code:
    AT+CMGF=1 AND/OR 0
    
    AT+CSCS="GSM" AND/OR ["UCS2 - "GSM" - "PCCP936"]
    
    AT+CUSD=1,"*140*11#",15
    WHERE : *140*11# is our request code


    Another AT commands such as (AT,AT+CMGF,AT+CSQ and ...) works perfectly.

    please clarify me...

    •   Alt11th January 2017, 11:51

      advertising

        
       

  2. #2
    FvM
    FvM is offline
    Super Moderator
    Points: 221,762, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    38,051
    Helped
    11651 / 11651
    Points
    221,762
    Level
    100

    Re: USSD code to check Balance (AT+UCSD) in GSM/GPRS A6 module

    Are you your sure that the message code is correct for the respective mobile phone provider? Each provider has it's own unsolicited message codes, e.g. for balance check.



    •   Alt11th January 2017, 12:41

      advertising

        
       

  3. #3
    Full Member level 4
    Points: 1,840, Level: 9

    Join Date
    Feb 2012
    Posts
    220
    Helped
    10 / 10
    Points
    1,840
    Level
    9

    Re: USSD code to check Balance (AT+UCSD) in GSM/GPRS A6 module

    Quote Originally Posted by FvM View Post
    Are you your sure that the message code is correct for the respective mobile phone provider? Each provider has it's own unsolicited message codes, e.g. for balance check.
    Yes,I'm sure. when I use this code (*140*11#) in the mobile phone,I will receive correct answer.
    But I don't know that why answer by the module is incorrect.

    I hope to see a solution or clue from someone:)



    •   Alt11th January 2017, 12:59

      advertising

        
       

  4. #4
    FvM
    FvM is offline
    Super Moderator
    Points: 221,762, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    38,051
    Helped
    11651 / 11651
    Points
    221,762
    Level
    100

    Re: USSD code to check Balance (AT+UCSD) in GSM/GPRS A6 module

    I didn't notice the "unreadable characters" point. Problem is that some providers answer with an alphabet that enforces PDU mode. I remember that I needed to implement a PDU decoder to receive CUSD responses in a SMS application. Not sure if it might help to change the default alphabet.



  5. #5
    Full Member level 4
    Points: 1,840, Level: 9

    Join Date
    Feb 2012
    Posts
    220
    Helped
    10 / 10
    Points
    1,840
    Level
    9

    Re: USSD code to check Balance (AT+UCSD) in GSM/GPRS A6 module

    Quote Originally Posted by FvM View Post
    I didn't notice the "unreadable characters" point. Problem is that some providers answer with an alphabet that enforces PDU mode. I remember that I needed to implement a PDU decoder to receive CUSD responses in a SMS application. Not sure if it might help to change the default alphabet.
    When I set the AT+CSCS="HEX" and then used from AT+CUSD=1,"*140*11#",15, received following answer:
    untitled111.png

    How can I convert it to a readable message?

    note :
    I don't have any problem with send or receive sms via this module. only problem is this ussd to check the balance.



    •   Alt11th January 2017, 13:58

      advertising

        
       

  6. #6
    FvM
    FvM is offline
    Super Moderator
    Points: 221,762, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    38,051
    Helped
    11651 / 11651
    Points
    221,762
    Level
    100

    Re: USSD code to check Balance (AT+UCSD) in GSM/GPRS A6 module

    Google "decode pdu"



+ Post New Thread
Please login
--[[ ]]--