|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Fri Mar 14, 2025 22:25 |
Login and Post Reply
Page: 1
Author |
Post |
|
#1 Wed Feb 27, 2013 17:41, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
|
Operating system name and version: OpenWrt Tp-Link Version of smsd: 3.1.15 Smsd installed from: Name and model of a modem / phone: ZTE mf190 Interface: USB Hi all. I apologize for bad English, modem ZTE MF 190. Logs from three different SIM cards MTS, Velcom, Life. Belarus. Settings are not changed. MTS Velkom Life ???? What's the problem I can not understand the operator "Life" ?
|
|
#2 Mon Mar 04, 2013 18:09, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Hi keke. I can not understand what the problem with receiving ussd-messages ... It comes in the form of torn. This is only one operator "life". Maybe it is too long on the text? Logs and configuration, see below ... config run.log smsd.log complete text
|
|
#3 Mon Mar 04, 2013 18:15, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
ussd #!/bin/sh
touch /var/run/spool/ussd/ussd.file echo "AT+CUSD=1,"*100#",15" >> /var/run/spool/ussd/ussd.file 'bash' Syntax Highlight powered by GeSHi
|
|
#4 Mon Mar 04, 2013 20:50, 146 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
It seems that you need to modify the sources. In the file smsd.c locate this: /* ======================================================================= Device-Spooler (one for each modem) ======================================================================= */
int cmd_to_modem( // // // char *command, int cmd_number ) { int result = 1; char *cmd; char *p; char answer[500]; char buffer[600]; int fd; int log_retry = 3; int i; FILE *fp; int is_ussd = 0; // 3.1.7 'c' Syntax Highlight powered by GeSHi Change those numbers: char answer[1024]; char buffer[1024];
Then save, recompile and try again. It's also a good idea to set "echo OFF", with the modem setting: init = ATE0
|
|
#5 Tue Mar 05, 2013 03:44, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Thank you for your help. Good luck.
|
|
#6 Tue Mar 05, 2013 08:28, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Hi keke. All work properly. Thank you for your help. Maybe someone will come in handy. Small patch. 001-smsd.patch
|
|
#7 Tue Mar 12, 2013 06:53, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Hi keke.
I have another problem. After sending a USSD-request session is not closed. To close the USSD-session need to send another request. Can I duplicate a USSD-request for one minute? In the log file, it shows, I have attached it before.
|
|
#8 Tue Mar 12, 2013 13:19, 146 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Probably the answer is reveiced too slowly, and therefore smsd cuts it. Can you try with a global setting log_read_from_modem = yes and show the results?
|
|
#9 Tue Mar 12, 2013 14:34, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
I will make and post the result. But this problem is a particular provider ... Can I change my SIM card? 
|
|
#10 Tue Mar 12, 2013 15:16, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Log file is 100k Where to send the package? Messages can be translated into English ... Sorry, the log file does not want to cut into pieces. How to package and to attach - the forum can not find ..
Good luck....
|
|
#11 Tue Mar 12, 2013 15:45, 146 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Instructions in the private block: Hidden private text.
|
|
#12 Tue Mar 12, 2013 16:06, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Well, I'll try ... Sorry for my bad english 
|
|
#13 Tue Mar 12, 2013 16:16, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
check all posted
|
|
#14 Wed Mar 13, 2013 20:14, 146 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
It seems that while handling the USSD response, your script should detect if the response was +CUSD: 1, and in that case the script should create a new command which is AT+CUSD=2.
Later version of smsd could do this automatically, but right now I'm too busy to make any changes to it.
USSD session also expires, but I do not know what is the timeout in your service provider. And if you really need to ask the saldo every minute, waiting is not a solution.
|
|
#15 Thu Mar 14, 2013 19:21, 146 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Can you test this highlighted addition in smsd.c: if ((cmd = malloc(strlen(command) + 2))) { sprintf(cmd, "%s\r", command); // 3.1.5: Special case: AT+CUSD, wait USSD message: //put_command(*modem, device, cmd, answer, sizeof(answer), 1, EXPECT_OK_ERROR); if (!strncasecmp(command, "AT+CUSD", 7) && strlen(command) > 9) { is_ussd++; put_command(cmd, answer, sizeof(answer), 3, "(\\+CUSD:)|(ERROR)");
if ((p = strstr(answer, "+CUSD:"))) { if (atoi(p + 6) == 1) { char answer[500];
put_command("AT+CUSD=2\r", answer, sizeof(answer), 1, EXPECT_OK_ERROR); } }
} else // 3.1.12: if (*cmd == '[' && strchr(cmd, ']')) { 'c' Syntax Highlight powered by GeSHi The code is not tested. I would like to see what is the response for AT+CUSD=2 command.
|
|
#16 Fri Mar 15, 2013 08:03, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Hi keke. I sent you the log file. My fix. « Last edit by z-wer on Fri Mar 15, 2013 08:05, 146 months ago. »
|
|
#17 Fri Mar 15, 2013 21:02, 146 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Thank you very much!
It is working. Large buffer is not required because the anwser is always short.
This feature will be included in the future releases. I think that there should be a configuration setting for this, like ussd_session_close = yes (default: no), because some users may handle answer in external script, and session needs to kept open. Generally taken smsd acts as before, when it's upgraded.
|
|
#18 Fri Mar 15, 2013 21:16, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Thank you for your help. I will test more tomorrow. I sometimes get an error. Cause I can not install.
|
|
#19 Sat Mar 16, 2013 15:42, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Sometimes I get this error.
|
|
#20 Sat Mar 16, 2013 16:14, 146 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
CME ERROR: 258 Phone is busy (???)
Nothing can be done. Just ignore it.
|
|
#21 Sat Mar 16, 2013 17:52, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
Topic owner
|
Ok. Good luck.
|
Login and Post Reply
Page: 1
Time in this board is UTC.
|
|
|
 |
|
 |
|