0

Hello I use Leon G100 gprs modem. I communicate over USART Terminal, everything works ok.

(I will mark CR and LF characters with hex values)

When I ask for the service, if response is not menu I got everything ok, like this:

 request  : AT+CUSD=1,"*121#",15 0x0D
 response : +CUSD: 0, "Message sentence", 15
            (followed by 0x0D 0x0A 0x0D 0x0A "OK" 0x0D 0x0A)

But when response is menu I don't know how to select menu item

 request  : AT+CUSD=1,"*111#",15 0x0D
 response : +CUSD: 1, "Welcome.0x0A 1.Do1 0x0A 2.Do2", 15 0x0D 0x0A

What should I send to select 1.Do1, like I send answer "1" from my phone ?

MRB
  • 422
  • 1
  • 8
  • 16
  • You need to continue with the USSD session, by using the same AT+CUSD command, eg, AT+CUSD=1,"1",15 – Danie Oct 01 '18 at 07:48

1 Answers1

1

If the last received character is ">" try to send him answer like: [selected option number][ctrl+z] (or [esc]).

If not, try to replace "*111#" with "*111*[option1]*[option2]...#"

Looongcat
  • 156
  • 1
  • 7
  • It doesn't end with ">", it ends with "15" 0x0D 0x0A. After that if I send "1" it just drops out, giving me "OK". Same happens if I send ESC(0x1B) or if I send 0x01. Sending "*111*1#" doesn't work too. – MRB Jun 18 '14 at 08:06
  • Could you give the link to AT Command Set PDF specifically for your model? – Looongcat Jun 18 '14 at 08:38
  • Sure. I can't find normal link, but here it is ... http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&ved=0CDAQFjAE&url=http%3A%2F%2Fwww.u-blox.com%2Fexternal%2Fdownload.php%3Faction%3DdownloadFile%26file%3D..%2Fimages%2Fdownloads%2FProduct_Docs%2Fu-blox_AT_Commands_Manual_(WLS-SW-11000).pdf&ei=KomhU9X5FKu8ygOPzoDoDg&usg=AFQjCNEuPN3trYALC4ipJtGnzBV2KPOi7w&sig2=erbZU6nKmfGBJTRW9cYi-A&bvm=bv.69137298,d.bGQ&cad=rja – MRB Jun 18 '14 at 12:47
  • Look please on _STKPRO_ and _STKTR_ commands, maybe they'll help. It seems like _STKTR_ could transmit menu selection, but it needs _STKPRO_. – Looongcat Jun 19 '14 at 06:08
  • Thanks, I never thought of that section. I can't find any example with these command and USSD on the web. The more I look, they more look to me as some phone menu commands, not USSD menu commands. If you want me to try something on actual modem, then post the responses, I will be happy to do that. Any idea is appreciated and thanks again ;-) – MRB Jun 19 '14 at 13:58
  • Well, you definitely need to: 1. _Try test command_ ("=?" at the end) to find out is your module supports it. 2. Look at the **syntax** (16.3.2, p.216) and **defined values** (the next one) subsections - they're containing all vital information for command synthesizing. 3. Now the main headache - _try different combinations_ to achieve result you need. The modem i've used to work with doesn't have such commands as yours so i really can't help any more =( P.S. My last suggestion - try to use AT+STKTR with AT+CUSD instead of AT+STKPRO, standard commands are the best. – Looongcat Jun 20 '14 at 17:06
  • Thanks, I will give it a try, but not in next 2 weeks, going on a trip... Besides Leon G100 I will get SIM900 meanwhile. Your modem has no such commands, were you maybe doing USSD stuff on your modem ? If yes, can you tell me which modem it was. Thanks! – MRB Jun 22 '14 at 08:43
  • I'm working with Cinterion BGS2T and dunno how to manage menus just as you (just have no time for it :), currently i'm writing routines for sms with pdu mode) – Looongcat Jun 23 '14 at 07:44
  • I gave up on these menus for now. If I ever find a solution in the future I will post it here. Thanks Looongcat for your help – MRB Jul 22 '14 at 09:01