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. Fri Mar 29, 2024 13:30
SMSTools3 Community » Help and support Bottom

[solved] PPC platform problem

  This topic is locked

Page:  Previous  1  2

Author Post
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
Could smsd work with Huawei E1752?

I do not know for sure, but likely it works because it works with E1552. However, all features are not supported. I do not have a complete list of features supported by any device, but at least Huawei cannot make a voice call with tones.

I also have the impression that Huawei devices have had problems with the existence. In some systems those sticks just disappear and are connected back randomly. This does not sound good, as you have already had problems with a device... But those sticks are cheap, so you probably can try it.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You could apply the following patch. It's against 3.1.14 and will check the PDU and report if there are illegal characters. After retrying twice smsd will continue with a cleaned PDU. This patch is important because it shows if retrying helps. If you have a new modem, and still get broken PDU's, the problem is caused by your system.

diff -Naub 3.1.14/src/smsd.c smstools3/src/smsd.c
--- 3.1.14/src/smsd.c   2010-09-21 12:47:47.000000000 +0300
+++ smstools3/src/smsd.c        2010-11-05 19:54:43.000000000 +0200
@@ -2671,6 +2671,11 @@
   char* begin2;
   char* end1;
   char* end2;
+  int retry = 0; // 3.1.15.
+  int retry_count = 2;
+  int src;
+  int dst;
+  char *buffer;

   line2[0]=0;
   line1[0]=0;
@@ -2767,6 +2772,8 @@
     return 0;
   }

+  for (;;)
+  {
   writelogfile(LOG_INFO, 0, "Trying to get stored message %i",sim);
   sprintf(command,"AT+CMGR=%i\r",sim);
   // 3.1beta3: Some modems answer OK in case of empty memory space (added "|(OK)")
@@ -2808,6 +2815,46 @@
 #ifdef DEBUGMSG
   printf("!! line1=%s, line2=%s\n",line1,line2);
 #endif
+
+    // 3.1.15: If PDU contains illegal characters, retry:
+    if ((buffer = (char *)malloc(strlen(line2) + 1)))
+    {
+      src = 0;
+      dst = 0;
+      while (line2[src])
+      {
+        if (isXdigit(line2[src]))
+        {
+          buffer[dst] = line2[src];
+          dst++;
+        }
+        src++;
+      }
+
+      buffer[dst] = 0;
+
+      if (strlen(buffer) < strlen(line2))
+      {
+        writelogfile(LOG_ERR, 1, tb_sprintf("PDU contains illegal characters: %s", line2));
+        alarm_handler(LOG_ERR, tb);
+
+        if (++retry <= retry_count)
+        {
+          free(buffer);
+          continue;
+        }
+
+        writelogfile(LOG_NOTICE, 1, tb_sprintf("Continuing with cleaned PDU"));
+        alarm_handler(LOG_NOTICE, tb);
+        strcpy(line2, buffer);
+      }
+
+      free(buffer);
+    }
+
+    break;
+  }
+
   return sim;
 }
 
 
'diff' Syntax Highlight powered by GeSHi


Save the patch as /tmp/patch.
cd to the smstools3/src and run patch < /tmp/patch.
Then recompile and restart smsd.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
It looks like I need some correct configuration for Huawei E1752... :?

I could something receive and send, but there is errors in comunication between smsd and modem:

smsd.log:


smsd_trouble.log:


Before these logs was created I was able to send out simple (latin only) SMS which file was created by using sendsms script. But the message was sent three times out!?

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
There is also another problem - I got sudden restart/shutdown of my linux box.
Later I found from syslog and internet resources that it is connected with this message:


F.ex. here is similar problem discussion:
http://www.murga-linux.com/puppy/viewtopic.php?p=357695

Are you faced with this - do you know how to fix it?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
Before these logs was created I was able to send out simple (latin only) SMS which file was created by using sendsms script. But the message was sent three times out!?

With N30 you did not have this kind of issues, right?

It seems that you have changed read_timeout from 5 to 3. When a PDU is sent to the modem, by default smsd will wait 60 seconds for the answer. In your case the waiting time is only 37 seconds. Perhaps this is the reason for the failure. Simple messages are sent faster than long message, which may explain why the sending works with them.

Because you have stopped smsd right after the PDU was sent, it is not shown in the log if there was the response received later. In some cases, even when the response is not received, the SMS is still sent by Service Center. Because of the missing response, smsd tries three times, and this causes that the SMS is delivered three times.

If a higher value of read_timeout does not help, you could try to send the same message using another modem.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
There is also another problem - I got sudden restart/shutdown of my linux box.
Later I found from syslog and internet resources that it is connected with this message:


F.ex. here is similar problem discussion:
http://www.murga-linux.com/puppy/viewtopic.php?p=357695

Are you faced with this - do you know how to fix it?

I do not know anything about that kind of issue. It seems to be related to the modem, which means that you could by a third modem, other than Nokia or Huawei.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
I think that this topic could be closed - it seems, that there had some problem with Nokia N30 modem. I changed serial to USB converter and nothing changes: I got the same sporadic problems, when modem connection hangs.

As I got second linux device I successfuly tested the another modem: Huawei E1752
The details in the topic: Huawei E1752

  This topic is locked

Page:  Previous  1  2

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.