This post is about showing how to use USSD code in SIM900 or SIM800 GSM modules.
SIM900 and SIM800 GSM modules provide a set of commands to check the balance of the SIM card. Here they are,
Before you dial a USSD code, you need to enable USSD commands and response notification using the command AT+CUSD=1.
Once you enter AT+CUSD=1 and receive a OK string as response , your USSD command response notification will be enabled and for the next USSD code you enter you will get a response notification.
Now in this example i have used Vodafone SIM card to check the balance. There are two ways to do it,
#Option 1: Using the standard number *111# and get a USSD response string with multiple options to select, and selecting the balance check in the options.
#Option 2: Using the shortcut number *111*2# and get a direct balance information string as a USSD response.
SIM900 and SIM800 GSM modules provide a set of commands to check the balance of the SIM card. Here they are,
Before you dial a USSD code, you need to enable USSD commands and response notification using the command AT+CUSD=1.
Once you enter AT+CUSD=1 and receive a OK string as response , your USSD command response notification will be enabled and for the next USSD code you enter you will get a response notification.
Now in this example i have used Vodafone SIM card to check the balance. There are two ways to do it,
#Option 1: Using the standard number *111# and get a USSD response string with multiple options to select, and selecting the balance check in the options.
#Option 2: Using the shortcut number *111*2# and get a direct balance information string as a USSD response.
#Option 2 : (Note this might not always work with all network operators)