FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
5,633 views 17 comments
by anonymous
Hello!

I'm using Teltonika RUT955 H7V3C0 (modem: Quectel EC25E) with prepaid SIM card. What I'd like to do is track my account balance. For me, option to send USSD and receive answer would be suitable enough, I could process the repsonse then. But are there any Teltonika toolkits to send USSD codes?

1 Answer

+1 vote
by anonymous

Hello,

Yes, you can send USSD from your RUT955. For that you would need to connect to router's CLI ("Services -> CLI" menu) or SSH (e.g. using "Putty" software for windows):

  • SSH/CLI login: root
  • SSH/CLI password: <your router's password>

and use the following command: "gsmctl -A 'ATD<dial_code>''", example: gsmctl -A 'ATD*1234#'

Additionally, you can enable "Mobile data limit" feature on the router (from "Network -> Mobile -> Data limit" menu), which would allow you to see used data amount, even if router was restarted (i.e. data counter would not reset even after router's restart). Once feature is enabled, you need "Limit Guard" tad would appear in "Status -> Overview" menu.

by anonymous

Thank you very much, this command seems to be very helpful in the near future... However, for this moment I'm getting error "NO CARRIER"

~# gsmctl -A 'ATD*100#'
NO CARRIER

It's quite strange since I can connect to the Internet through LTE and surf the web without any problems. But your answer inspired me to read about gsmctl command. I tried another USSD code:

# gsmctl -A 'AT+CUSD=1,*100#,15'

OK

And it's fine, but I didn't get the response. My command structure comes from Quectel EC25 AT commands manual with options as follows:

  1. AT+CUSD=1 enables the result presentation
  2. *100# is obviously command to retrieve balance from my provider
  3. 15, 3rd parameter is "3GPP TS 23.038 Cell Broadcast Data Coding Scheme (default 15)"
I also tried to use command mode gsmctl -H, but still cannot get the provider response. Do you know how to get it?
by
I tried all these commands and get the same reponse: the version with  'ATD...' gives 'NO CARRIER, and the 'AT+CUSD' version gives 'OK' (but not the actual text of the response). At first I thought this might just be an issue with being connected to a 4G/LTE network, but the problem persists when connected 3G as well.

If anyone has any leads on how to get the actual USSD response, that would be great.
by
Hello,

I got the same issue as you.

Does anyone make it work proprely?

We follow the same procedure and got same results.

Best regard,
by anonymous

Hello,

Indeed, I slightly misled you. Sorry about that.

You have already found the correct command, which should be used to send USSD codes form the router - AT+CUSD. However, currently this command cannot be fully executed using build in "gsmctl" function.

Here is temporary solution for you how to send USSD codes from the router and how to read the response from operator:

  • Use "microcom /dev/modem_cmd" SSH command to establish direct communication with LTE module.
  • Type "ATE1" if modem does not respond to your commands.
  • You might see, that modem is constantly printing "QCSQ" information. Do not mind it and type "AT+QCSQ=0" to stop this information from being printed.
  • Then use "AT+CUSD=1,*100#,15" command. Modem should respond with "OK" right away. Few seconds later you should see response from network operator.

by
Hello,

Thanks a lot for your answer, it works fine with this work around.

Did you know when it will be possible to use the gsmctl command?

I need to implement a script to check available credit on the sim card for sending this information by sms.

Can we use "microcom /dev/modem_cmd" in crontab?

Thanks for your help.

Best regards,
by anonymous

Hello,

No, crontab/scrips cannot be used to directly communicate with the modem (without causing interruption to other router's services).

We might be able to upgrade gsmctl function in upcoming month. Once new firmware will be available, I will share firmware download link here.

by
Hello,

Thanks for your answer.

I will wait for this new firmware.

Best regards,
by anonymous
What about gsmctl upgrade? Do you still plan to develop response getting feature in this command?
by anonymous

Hello,

Yes, as promised.

Due to few priority tasks we had to postpone this functionality. Nonetheless, it is already developed. In.the near future this functionality will also be added to standard firmware release.

You can download testing firmware with this functionality from here.

How to use it:

 - With "gsmctl -U" command you can send desired USSD command to the operator. Example: gsmctl -U "*100#"

 - Since response from operator takes couple of seconds to arrive and since "maintaining active connection with LTE module" (to wait for response) would interface with standard router's functionality each time when USSD command is sent, router cannot print response to initial "gsmctl -U' command. Instead, router saves the response into a "/tmp/ussd"file, which you can read at any time with "cat /tmp/ussd" command.

by anonymous

Hello, 

Is this new "gsmctl -U" command included in the newly released RUT2XX_R_00.01.07.1 firmware for the RUT240 router? 

Thanks.

by anonymous
Hello,

Currently no. This option will be added in the upcoming firmware releases.
by
hi. I have the same need. I have rut950 router and need to send ussd messages. Is it possible now?
by anonymous

Hello,

Yes, this is possible. Nowadays you do not even need "special firmware", any standard/base firmware release are also able to do that.

Simply use above instructions. In short:

 - Connect to your router via SSH/CLI:

  • SSH/CLI login: root
  • SSH/CLI password: <your router's password>
 - Then send your desired USSD command with "gsmctl -U" CLI/SSH command. Example: gsmctl -U "*100#"
 - Read the response form operator using "cat /tmp/ussd" CLI/SSH command. Take note that answer might few moments to arrive. If this response is not yet available (e.g. file is not present), simply check few moments latter.
by

Great! It really works.

by anonymous

Hi!

I have no idea what I am doing wrong on my RUT950s (attempting to check the SIM balance via USSD). I followed the steps exactly, yet I always get the same response (even if trying to check the cat /tmp/ussd file for up to 5 minutes afterwards, multiple times).

I am running FW version RUT9_R_00.07.02.7

What am I doing wrong.

The USSD functionality using that same USSD code works perfectly in the Web interface, but for some reason not here.

Please help!

by anonymous

Hello,

With RUTOS firmware versions (00.07.00 and higher), the USSD command's output is stored in a slightly different file.

The file's name would be different for different device models.

In your case, the file's name would most likely be "ussd_1-1.4_1". I.e. "cat /tmp/ussd_1-1.4_1" command should show you the command's output.

In case this command would also not work, or if you would ever use different Teltonika devices/models, you can do the following:

 - Execute USSD command with the same command: gsmctl -U "*100#"

 - Use "ls /tmp" command to see all files in the /tmp directory. You should look for a file, which would start with "ussd" text. Alternatively, you can manually type "cat /tmp/ussd" in the command's field and then press the "tab" keyboard button, so that the SSH window could autocomplete the command.

by anonymous

Excellent!! It works!

Thank you so much! I should have signed up to the crowd-support ages ago!!