Regarding USSD code running

I hope this message finds you well. I am currently working with the EC200UCNAAR03A08M08 module and am seeking assistance regarding the implementation of AT commands for retrieving the recharge status of a SIM card.

For the Airtel SIM, I am using the AT command AT+CUSD=1,"*123#" to query the recharge status, which works on a mobile phone and prompts a selection of options to view the data balance and recharge details. However, I am looking for guidance on how to implement this functionality using AT commands on my current module.

Could you kindly assist with the correct approach to retrieve the recharge and data balance information directly via AT commands without requiring a pop-up prompt, as seen on mobile phones?

Thank you in advance for your support.

Best regards,
Amar

What does

AT+CUSD=1,"*123#",15

return when issued as an AT command on your modem?

Dear @snowgum

Thank you for your response.
Upon executing the command AT+CUSD=1,“*123#”,15 , my modem returned “OK”.

Best regards,
Amar

Have you checked whether the +CUSD: response is present some time after that initial “OK” result:

The following sort of behaviour is typical:

AT+CUSD=1,"#100#",15

OK

+CUSD: 1,"Main Bal: $240.01
Exp: 10 Jun 2019

Upon verification, the following response was observed:

AT+CUSD=1,“*123#”,15

OK

+CME ERROR: 4

The error code +CME ERROR: 4 indicates that the operation is not permitted.

I attempted an alternative approach to query the data balance using an Airtel SIM. When dialing *121*2# directly from a mobile device, it displays a popup with options. To retrieve the data balance, selecting option 3 is required.

I tried the following sequence using AT commands:
AT+CUSD=1,“1212#”,15

OK

+CUSD: 2,“Check your plan benefits, data usage, bills & get access to rewards, perks & privileges with Airtel Thanks App. Download now from Play/App Store.”,15

Subsequently, I attempted to send option 3
AT+CUSD=1,“3”,15

OK

+CME ERROR: 4

The final response was +CME ERROR: 4, indicating the operation is not allowed. Could you please advise on how to resolve this issue?

Thank you.

You could try: AT+CUSD=1,"*121*3#",15

You may need to close the existing USSD session first with: AT+CUSD=2