SMS Server Tools 3
 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. The forum is currently read-only, but will open soon. Thu Nov 21, 2024 23:19
SMSTools3 Community » Help and support Bottom

[answered] PDU ERROR on recieve SMS message

  This topic is locked

Page:  1

Author Post
Member
Registered:
Jun 2011
Location: United Kingdom
Operating system name and version: Linux RHEL 6
Version of smsd: 3.1.14
Smsd installed from: sources
Name and model of a modem / phone: Maestro 100 GSM/GPRS Modem, High Speed GPRS
Interface: serial


I am only trying to recieve messages currently, but I have noticed sometime the messages are not recieved correctly.
I get the following in the spooled file.



What is confusing it it appears the message is not in PDU format, as the field PDU: contains the actual text of the message. The length is also invalid.


Here is a the same message recieved correctly



I am not sure if the problem lies in the modem or smstools. Has anyone else had similar problems ?

thanks
Ben


« Last edit by keke on Thu Jun 09, 2011 11:40, 163 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I have not seen this kind of problem before.

Do you have a log with loglevel = 7, or smsd_trouble.log, which show whole communication with a modem when incorrect message was received?

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
I have just been playing witht he logging. I have set log_read_from_modem = yes in the conf file.

Looking at the data, it appears that the modem is sending out messages in non PDU format sometimes.

Clearly the invalid message is being read as a text message. Does smstools set the message mode before retrieving each message, just once, or rely on the default modem settings ?

Will turn up log level to 7 and see what happens.

Have been incontact with the modem suppliers and waiting to hear back from their technical support at the moment.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Message mode is set every time when receiving or sending is started after smsd has been idle. If more than one SMS is received consecutively, PDU mode is selected once, not for each message.

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
Ok here are two snippets of log at level 7, first one is ok, the second is a failure






smstools is setting the PDU mode, however where I am seeing failures the modem is replying
: <- ERROR +CMTI: "SM",3
to the first sending of -> AT+CMGF=0
No idea why.

The modem then resends -> AT+CMGF=0 after the error, but obviously something is wrong as the message is in plain text.
very strange


« Last edit by keke on Thu Jun 09, 2011 13:27, 163 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
When PDU mode was set, the modem was receiving SMS at the same time. It seems that this caused the problem, but usually modems do not work like that. Because of error, smsd retried and got an answer OK. Still the mode is wrong, probably because the modem is receiving more messages.

You could try to save CMGF=0 to the modems profile. It seems that the modem defaults to ASCII mode, and does not remember the mode which was set through the AT interface.

Do you have a complete manual of AT commands for this device?

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
I have a datasheet from the supplier, it is a Wavecom AT command set. I assume internally it is a wavecom modem.

The +WSSW command for version number does comeback with a text string.

How would I go about setting CMGF=0 to the modems profile ?


suppliers pdf


« Last edit by benh on Thu Jun 09, 2011 12:37, 163 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Use the modem setting report_device_details = yes, restart smsd and show those details from the log.

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
2011-06-09 07:53:31,7, GSM1: ## Start of device details
2011-06-09 07:53:31,7, GSM1: # Manufacturer identification:
2011-06-09 07:53:31,7, GSM1: -> AT+CGMI
2011-06-09 07:53:32,7, GSM1: <- WAVECOM WIRELESS CPU
OK
2011-06-09 07:53:32,7, GSM1: # Model identification:
2011-06-09 07:53:32,7, GSM1: -> AT+CGMM
2011-06-09 07:53:32,7, GSM1: <- MULTIBAND 900E 1800
OK
2011-06-09 07:53:32,7, GSM1: # Revision identification:
2011-06-09 07:53:32,7, GSM1: -> AT+CGMR
2011-06-09 07:53:33,7, GSM1: <- R73_00gg.WMP100 2087432 121208 15:34
OK
2011-06-09 07:53:33,7, GSM1: # New message indications, list of supported modes:
2011-06-09 07:53:33,7, GSM1: -> AT+CNMI=?
2011-06-09 07:53:33,7, GSM1: <- +CNMI: (0-3),(0-3),(0-3),(0-2),(0,1)
OK
2011-06-09 07:53:33,7, GSM1: # New message indications, current settings:
2011-06-09 07:53:33,7, GSM1: -> AT+CNMI?
2011-06-09 07:53:34,7, GSM1: <- +CNMI: 0,1,0,0,0
OK
2011-06-09 07:53:34,7, GSM1: # Preferred message storage, list of supported mem's:
2011-06-09 07:53:34,7, GSM1: -> AT+CPMS=?
2011-06-09 07:53:34,7, GSM1: <- +CPMS: (("SM","ME","BM","SR"),("SM","ME"),("SM","ME"))
OK
2011-06-09 07:53:34,7, GSM1: # Phonebook storage, available mem's:
2011-06-09 07:53:34,7, GSM1: -> AT+CPBS=?
2011-06-09 07:53:35,7, GSM1: <- +CPBS: ("SM","FD","LD","MC","ON","ME","RC","MT","EN","SN")
OK
2011-06-09 07:53:35,7, GSM1: # List messages, list of supported stat's:
2011-06-09 07:53:35,7, GSM1: -> AT+CMGL=?
2011-06-09 07:53:35,7, GSM1: <- +CMGL: (0-4)
OK
2011-06-09 07:53:35,7, GSM1: # Delete message, list of supported values:
2011-06-09 07:53:35,7, GSM1: -> AT+CMGD=?
2011-06-09 07:53:36,7, GSM1: <- OK
2011-06-09 07:53:36,7, GSM1: # Phone activity status, list of supported stat's:
2011-06-09 07:53:36,7, GSM1: -> AT+CPAS=?
2011-06-09 07:53:36,7, GSM1: <- +CPAS: (0-5)
OK
2011-06-09 07:53:36,7, GSM1: # TE character set, list of supported charset's:
2011-06-09 07:53:36,7, GSM1: -> AT+CSCS=?
2011-06-09 07:53:37,7, GSM1: <- +CSCS: ("GSM","PCCP437","CUSTOM","HEX")
OK
2011-06-09 07:53:37,7, GSM1: # TE character set, current setting:
2011-06-09 07:53:37,7, GSM1: -> AT+CSCS?
2011-06-09 07:53:37,7, GSM1: <- +CSCS: "PCCP437"
OK
2011-06-09 07:53:37,7, GSM1: ## End of device details

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Stop the smsd if it's running.

Reset the modem (power off-on).

Start smsd in communication mode:
smsd -C GSM1

Follow the instructions on screen.

Set "echo on" (for easier typing):
ATE1

Check the current mode:
AT+CMGF?

What was it?

Set it to PDU mode:
AT+CMGF=0

Store settings:
AT&W

Exit with Ctrl-C and reset the modem again. Once again start communication mode, and check the current mode. It should be 0.

Hopefully this will help, but let's see...

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
Ok I had actually done the AT&W already and on power up the modem is in PDU mode.

It appears that maybe sending any command and getting an error because the phone is recieving as message causes the text message to be in text mode. I have just seen this happen. I had just recieved a good message, so the modem was in PDU mode. This time trying to read a message when a new message arrives caused an error. It looks like pretty bad firmware in the modem.


2011-06-09 15:45:00,6, GSM1: Checking memory size
2011-06-09 15:45:01,7, GSM1: -> AT+CPMS?
2011-06-09 15:45:01,7, GSM1: Command is sent, waiting for the answer
2011-06-09 15:45:01,7, GSM1: <- +CPMS: "SM",1,50,"SM",1,50,"SM",1,50 OK
2011-06-09 15:45:01,6, GSM1: Used memory is 1 of 50
2011-06-09 15:45:01,6, GSM1: Trying to get stored message 1
2011-06-09 15:45:01,7, GSM1: -> AT+CMGR=1
2011-06-09 15:45:01,7, GSM1: Command is sent, waiting for the answer
2011-06-09 15:45:01,7, GSM1: <- ERROR +CMTI: "SM",2
2011-06-09 15:45:01,6, GSM1: Trying to get stored message 2
2011-06-09 15:45:02,7, GSM1: -> AT+CMGR=2
2011-06-09 15:45:02,7, GSM1: Command is sent, waiting for the answer
2011-06-09 15:45:02,7, GSM1: <- +CMGR: "REC READ","+000000000000",,"11/06/09,15:44:44+04" name,1,57.4,0.12,50.1 this is a test message OK

This was followed by 2 further bad messages, before again recieving 6 good messages

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You could try a modem setting init = AT+CNMI=0,0,0,0,0. With these settings SMS deliver indications are not routed. But I do not believe that this helps, as 2011-06-09 06:44:30 there was no error but still modem used wrong mode.

Hopefully you will get a new firmware, or replacement device from the supplier.

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
So far I have seen 2 diffrerent messages ( AT+CMGF=0 and AT_CMGR=1) cause errors because a message is being recieved, which seem to cause the message mode to go back to plain text. I will try turning off the SMS deliever indications and see what happens tomorrow.


I am sending the logs and the problems I have to the modem distributor and they are going to talk with the modem people.

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
Ok a quick update.
This morning I have disabled the message notification as you have suggested and so far I have not seen any errors.
Of course as this seems to be down to timing, I may just be lucky. I have sent 5 burts of 10 messages without any errors, where before I would have had several.

Many thanks for your help

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You have sent messages? I think the problem occurs when the modem receives messages.

Probably you are not asking for status report when sending messages. Before making a final decision with this modem, you could try to ask reports. In the SMS file use the header Report: yes, and in the configuration of modem add the settings:
primary_memory = SM
secondary_memory = SR


You could also use a global setting report = /var/spool/sms/report to save reports into different directory than normal messages.

Send some 10 messages and especially check how status reports are received and what are the message id numbers.

Member
Registered:
Jun 2011
Location: United Kingdom
Topic owner
Sorry you misunderstand. I am sending the GSM modem the messages from my phone. I have a small android app to send multiple messages.
I have not actually sent any messages yet through smstools and the GSM modem.

I sent a string of 20 messages to the modem from my phone, with 16 arriving about 1 second apart with no errors. That just wasn't happening before. Disabling the SMS message notification, certainly seems to have made things better. I won't say it has fixed the issue until the modem people can find the reason for the errors and provide a fix or tell me yes, disabling SMS notification messages will stop it from happening.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Okay :).

If you are going to use this modem for sending later, you could test it now with status reports. This is because some modems based on Wavecom chip have serious problems while receiving reports. If your device has problems, it's better to know it now when you already have contacted the supplier.

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.