SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Sun Oct 25, 2020 10:54
SMSTools3 Community » Help and support Bottom

[Changed in 3.1.21] USSD command in text

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Apr 2017
Location: Russian Federation
Operating system name and version - FreeBSD 11:
Version of smsd - 3.1.20:
Smsd installed from: sources / package repository / from elsewhere... - sources
Name and model of a modem / phone - Huawei:
Interface: serial / USB / some adapter... - USB
Hi!

How I can send USSD command in text? I know only this sequence - *100#

Thank you in advance!

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Try this kind of modem settings:

regular_run_cmd = AT+CUSD=1,"*100#",0;
regular_run_interval = 600
regular_run_logfile = /var/log/smsd_regular_run.log


If you see an error in the log, you could try without the ending ,0;.

If you still get error, replace *100# with AA180C3602 and use a modem setting ussd_convert = 2.

See also this post: Sample config and script for regular_run and balance of prepaid SIM using USSD.

Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
Hi!

It returns UCS encoded string.
Is it possible to decode in code?



Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
By the way - your converter http://smstools3.kekekasvi.com/topic.php?id=288 works great.
I use USSD Entry/Display UCS2 encoding, pressing convert and recieve


with iconv -f UCS-2 -t UTF-8 i got some arabic symbols)

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Iconv does not convert the string, because the string is not UCS2, it is hexadecimal represensation of UCS2.

Modem setting ussd_convert = 1 should do the job.

However, there is an active problem with balance queries in Russian Federation, probably elsewhere too. I'm working with it right now and likely the 3.1.21 version may have some enhancements for handling of ussd.

Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
Hmmm.... Maybe I can get UCS to HEX conversion for each 0x hex byte in my sequence? Let's say, reinterprete your algo on PDU converter)

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Sorry, I think that I did not understand your question, but did you try ussd_convert = 1 and did it work for you?

Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
No, this setting makes nothing for me.
I meant, that maybe it's possible to repeat your code from PDU converter online http://smstools3.kekekasvi.com/topic.php?id=288

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Of course it is possible to repeat the code from PDU converter, but I do not understand why. If you are sending balance queries with regular_run_cmd, smsd should convert the answer automatically.

Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
And put the answer into the log? I see nothing... Will show you the output later.

Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
Let's say - the same)



Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
The code expects OK +CUSD: 2,"data... but CREG information is received after the OK and the code is not 2. This is why the answer is not recognized.

This likely is operator-depended issue, and I have to change the code to accept any variations. I can do it probably tomorrow, and I will post a notification as soon as the 3.1.21beta package is available for your testing.

Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
thank you very much for your help!

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
3.1.21 is now available for download.

As you are running FreeBSD on Raspberry Pi, this version is important for you. See the src/Makefile, there are comments about FreeBSD.

Member
Registered:
Apr 2017
Location: Russian Federation
Topic owner
Hi!

Thank you! Going to try tonight.

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.