Community discussions

MikroTik App
 
minfrin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Sat May 09, 2009 2:20 am

LTE: How do you send a USSD message and receive a response?

Fri Aug 19, 2022 5:24 pm

I have a Mikrotik LTAP RouterOS 7.4 with a R11e-LTE6_V034 firmware modem inside, with a simcard that I am trying to activate.

Having read manuals and browsed forums I understand there are two mechanisms that can be used to send USSD messages, however there seems to be few details on where the response is received.

First try using /tool/sms/send, no response, no error:

[minfrin@rescue] /interface/lte> /tool/sms/send lte1 phone-number="*136*0#" type=ussd

Second try using AT commands, there is a response that indicates success, but none of it appears to be a message of any kind, hex or ascii:

[minfrin@rescue] /interface/lte> /interface lte at-chat lte1 input="AT+CUSD=1,\"*136*0#\",15" wait=yes
output: +MSTK: 15, D8080102000100000000
OK
+CUSD: 2
+ZCONSTAT: 0,5
+CREG: 1,"28ad","00000e62",3
$CREG: 1,"28ad","00000e62",3,
+CSQ: 1,0
+CESQ: 0,0,255,255,255,255
*CESQ: 0,0,255,255,255,255,6

Second try using AT commands, success, but no response:

[minfrin@rescue] /interface/lte> /interface lte at-chat lte1 input="AT+CUSD=1,\"*136*0#\",15" wait=yes
output: +MSTK: 15, D8080102000100000000
OK
+CUSD: 2

Having trawled the log, I see nothing that either contains an ascii response, or any blocks of hex characters that could be decoded into a response.

Anyone know how this is supposed to work?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: LTE: How do you send a USSD message and receive a response?

Fri Aug 19, 2022 6:35 pm

+CUSD: 2

2: USSD terminated by network

You must enable GSM or 3G,
LTE only is not able to send USSD codes.

/interface lte at-chat lte1 wait=yes input="AT+CUSD=1,\"*#43#\",15"
output: OK
+CUSD: 2,"556e657870656374656420446174612056616c7565", 244
translated:
55U 6En 65e 78x 70p 65e 63c 74t 65e ....

On log, gsm, info you can read the translation:
USSD: Unexpected Data Value
 
minfrin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Sat May 09, 2009 2:20 am

Re: LTE: How do you send a USSD message and receive a response?

Fri Aug 19, 2022 6:55 pm

You must enable GSM or 3G,
LTE only is not able to send USSD codes.
Am I right in understanding that the following command enables GSM?

[minfrin@rescue] /interface/lte> set lte1 network-mode=gsm
[minfrin@rescue] /interface/lte> print
Flags: R - RUNNING
Columns: NAME, MTU, NETWORK-MODE, APN-PROFILES
# NAME MTU NETWORK-MODE APN-PROFILES
0 lte1 1500 gsm default

I had gsm specified all along, it does not seem to have made a difference.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: LTE: How do you send a USSD message and receive a response?

Fri Aug 19, 2022 7:23 pm

your lte1 is not registered (R) on gsm-only.
Is supported from your modem and mobile operator?
 
minfrin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Sat May 09, 2009 2:20 am

Re: LTE: How do you send a USSD message and receive a response?

Sat Aug 20, 2022 10:51 am

your lte1 is not registered (R) on gsm-only.
Is supported from your modem and mobile operator?
That cut and paste is between times while it was connected, it is back connected again.

[minfrin@rescue] /interface/lte> print
Flags: R - RUNNING
Columns: NAME, MTU, NETWORK-MODE, APN-PROFILES
# NAME MTU NETWORK-MODE APN-PROFILES
0 R lte1 1500 gsm myMTN

After a lot more testing it seems that outgoing USSD started to work after a period of time - I used a "please call me" functionality and that triggered the correct behaviour. The /tools/sms/print last-ussd is very hit and miss, mostly miss. The answer to the "please call me" appeared under last-ussd, but none of the other responses ever did. The missing responses were under /log.

It looks like the simcard needed time to activate, and didn't respond to any USSD at all until some mobile-operator-controlled-cronjob had run that triggered the network to respond.

TL;DR: USSD may not work at all until a mobile-operator-controlled-cronjob runs, which could take many hours.

Who is online

Users browsing this forum: Ahrefs [Bot], DanMos79, Google [Bot], netmas, pants6000, zschlakker and 230 guests