Author |
Post |
|
#1 Wed Apr 26, 2017 13:21, 95 months ago.
|
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!
|
|
#2 Wed Apr 26, 2017 13:36, 95 months ago.
|
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.logIf 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.
|
|
#3 Thu Apr 27, 2017 19:17, 95 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
Topic owner
|
Hi! It returns UCS encoded string. Is it possible to decode in code?
|
|
#4 Thu Apr 27, 2017 19:38, 95 months ago.
|
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)
|
|
#5 Thu Apr 27, 2017 19:48, 95 months ago.
|
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.
|
|
#6 Thu Apr 27, 2017 20:00, 95 months ago.
|
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)
|
|
#7 Thu Apr 27, 2017 20:10, 95 months ago.
|
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?
|
|
#8 Fri Apr 28, 2017 07:21, 95 months ago.
|
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
|
|
#9 Fri Apr 28, 2017 14:59, 95 months ago.
|
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.
|
|
#10 Fri Apr 28, 2017 15:05, 95 months ago.
|
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.
|
|
#11 Fri Apr 28, 2017 20:49, 95 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
Topic owner
|
|
|
#12 Fri Apr 28, 2017 21:06, 95 months ago.
|
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.
|
|
#13 Fri Apr 28, 2017 21:28, 95 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
Topic owner
|
thank you very much for your help!
|
|
#14 Wed May 03, 2017 21:36, 95 months ago.
|
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.
|
|
#15 Thu May 04, 2017 10:00, 95 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
Topic owner
|
Hi!
Thank you! Going to try tonight.
|