Author |
Post |
|
#1 Sat Sep 16, 2017 19:35, 87 months ago.
|
Member
Registered: Aug 2017
Location: Iran, Iran
|
Operating system name and version: Ubuntu 16.04 Version of smsd: 3.1.21 Smsd installed from: sources Name and model of a modem / phone: D-link Interface: serial / USB When I send the ussd code to retrieve the balance of my credit, I get the following error:
|
|
#2 Sat Sep 16, 2017 19:50, 87 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Is there other port than ttyUSB0 provided by the modem? If there is, try to use another port. Some modems provide multiple ports, and USSD does not work with all ports.
|
|
#3 Sun Sep 17, 2017 04:42, 87 months ago.
|
Member
Registered: Aug 2017
Location: Iran, Iran
Topic owner
|
Here's the output of wvdialconf: It seems there are two ports ttyUSB0 and ttyUSB1. I checked both ports with miniterm.py. The output of port ttyUSB0 is as follows: and there is no correct output!! And for port ttyUSB1 I cannot send any AT commands and I get error.
|
|
#4 Sun Sep 17, 2017 11:49, 87 months ago.
|
Member
Registered: Aug 2017
Location: Iran, Iran
Topic owner
|
I did some more tests. I think I should send the USSD code via /dev/ttyUSB0 and receive the result from /dev/ttyUSB1!! The problem is that how can I make use of this behavior in smstools?? I mean how can I use both ports in smstools3 to send and receive the result of the USSD codes?
|
|
#5 Wed Sep 20, 2017 08:01, 87 months ago.
|
Member
Registered: Sep 2017
Location: Munich, Germany
|
All, I have a language problem and a provider problem and your help solving them will be much appreciated. My modem is a ZTE MF112, my provider is the German e-plus. When querying the prepaid balance using AT+CUSD=1,"*100#" I get error 258 (device busy). This is true for both smsd via GSM1.sh and a direct AT-command based conversation with the modem. However, I can get an answer by requesting the German character set in a third argument (15) to CUSD: This can be decoded to "Ihr Guthaben beträgt: 9,77 ." Questions: 1.) what is a good way of splicing the extra argument in? The proposed GSM1.sh does not appear to support this. Maybe there is a general AT command I could use for setting the character set in all modem responses? 2.) the answer is funny in that it contains '00' as every second byte, potentially making decoding fail. Any thoughts on this? 3.) the response does not yield the remaining time for using the SIM card. For this I need to use *102#. A sample answer would then be (after removing zeroes and decoding): "Das aktuelle Aktivitätszeitfenster Ihrer SIM-Karte endet am 24.08.2018 und kann durch weitere Aufladungen verlängert werden." Nice and clean. I could configure a first script for balance (say GSM1.sh) and a second one (GSM2.sh) for time. Can anybody think of a more elegant way to check both figures in one go? Kind regards birnbacs
|
|
#6 Wed Sep 20, 2017 13:35, 87 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
birnbacs, The response is hexadecimal representation of UCS2 encoding. Use a modem setting ussd_convert = 1 to decode it. You could just handle the expiration manually, as it does not change all the time.
|
|
#7 Thu Sep 21, 2017 04:41, 87 months ago.
|
Member
Registered: Aug 2017
Location: Iran, Iran
Topic owner
|
Quote I did some more tests. I think I should send the USSD code via /dev/ttyUSB0 and receive the result from /dev/ttyUSB1!! The problem is that how can I make use of this behavior in smstools?? I mean how can I use both ports in smstools3 to send and receive the result of the USSD codes?
Dear Keke, Do you have any idea for the above issue? Thanks.
|
|
#8 Thu Sep 21, 2017 06:06, 87 months ago.
|
Member
Registered: Sep 2017
Location: Munich, Germany
|
keke wrote birnbacs, The response is hexadecimal representation of UCS2 encoding. Use a modem setting ussd_convert = 1 to decode it. You could just handle the expiration manually, as it does not change all the time.
Thanks a ton but this did not make much differende. GSM1.balance still reads:
|
|
#9 Thu Sep 21, 2017 07:30, 87 months ago.
|
Member
Registered: Sep 2017
Location: Munich, Germany
|
keke wrote birnbacs, The response is hexadecimal representation of UCS2 encoding. Use a modem setting ussd_convert = 1 to decode it. You could just handle the expiration manually, as it does not change all the time.
Thanks Keke, I will work on problems 2 and 3 as soon as I get there, I am sure I will find a solution. I am still blocked by problem #1 though. Do you have any idea on fixing the problems issuing the USSD command?
|
|
#10 Thu Sep 21, 2017 13:11, 87 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
birnbacs wrote I am still blocked by problem #1 though. Do you have any idea on fixing the problems issuing the USSD command?
Did you try this: ussd_command="AT+CUSD=1,\"*100#\",15"
|
|
#11 Thu Sep 21, 2017 13:21, 87 months ago.
|
Member
Registered: Sep 2017
Location: Munich, Germany
|
keke wrote birnbacs, The response is hexadecimal representation of UCS2 encoding. Use a modem setting ussd_convert = 1 to decode it. You could just handle the expiration manually, as it does not change all the time.
I found a solution to problem 1 and it is embarrassingly straightforward: GSM1.sh now contains the line
|
|
#12 Thu Sep 21, 2017 13:30, 87 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
sinai wrote Quote I did some more tests. I think I should send the USSD code via /dev/ttyUSB0 and receive the result from /dev/ttyUSB1!! The problem is that how can I make use of this behavior in smstools?? I mean how can I use both ports in smstools3 to send and receive the result of the USSD codes?
Dear Keke, Do you have any idea for the above issue? Thanks.
Smstools3 cannot use dual ports for single modem. As this issue is rare, and you likely will have problems with delivery reports too, I'm not willing to create dual-port facility to this software. I recommend to buy a better modem.
|