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 May 03, 2024 09:01
SMSTools3 Community » Help and support Bottom

[answered] Message_id

  This topic is locked

Page:  1

Author Post
Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Operating system name and version: SLES 10 SP1
Version of smsd: 3.1.6
Smsd installed from: sources
Name and model of a modem / phone: Sony Ericsson j300i / TELE 2
Interface: USB

Good morning all. 'll Show how formed message_id. I do it all the time is 0 :-(. Can it somehow changed??


« Last edit by Eagle on Thu Dec 10, 2009 10:52, 175 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Message id is received from the modem when a message is sent. The modem will select the id and will increase it for the next message. Later this id can be used when a status report is received. Status report contains the same id and with it, report can be targeted to the corresponding message.

In your case, if the value is always zero, there can be two reasons for that: smsd cannot extract this id correctly, or the modem just returns value zero for all messages.

With a loglevel = 7 in the smsd.conf, you could try to send one more message and then show the piece of a log here. From the log it can be seen what is the real value returned and is there any problem in extraction.

You could also set report = yes in the modem section of smsd.conf. After a message is sent, you should receive a status report which contains a value which was used to identify your message. Check if it's non-zero.

After smsd.conf is changed, it's needed to restart smsd.

If you modem always uses zero as an id, source code of smsd could be changed to set the value for each message. Currently the code tells the modem that modem should select the id by itself.

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
On thanks for the quick reply:
Here smsd.conf:



but the log server:



Hidden private text.





« Last edit by keke on Thu Dec 10, 2009 13:32, 175 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Thank's.

Did you later receive a status report for that message?

You know that the message was received, so we can be sure that it was delivered, right?

Your modem clearly returns a zero value and there is no error while extracting it from the response of the modem.

Assuming that you have not status report received (and message is surely delivered): There is a field "TP-Message-Reference" in the outgoing PDU string. Value 0 in that field means that the modem should set the message reference number by itself. It seems that your modem does not do the setting, and we could change the code to see if status report and message id works when message reference number is set by the smsd.

In the smstools3/src directory, open the file pdu.c.

Locate the following:

 /* concatenate the first part of the PDU string */
 if (strcmp(mode,"old")==0)
   sprintf(pdu,"%02X00%02X%02X%s00%02X%02X",flags,numberlength,numberformat,tmp,coding,messagelen);
 else
 {
   if (validity < 0 || validity > 255)
     validity = validity_period;
   sprintf(pdu, "00%02X00%02X%02X%s%02X%02X%02X%02X",
           flags, numberlength, numberformat, tmp,
           (system_msg)? 0x40 : (replace_msg >= 1 && replace_msg <= 7)? 0x40 +replace_msg : 0,
           (system_msg)? 0xF4 : coding, validity, messagelen);
 }

Change the line shown red and bold to:

   sprintf(pdu, "00%02X64%02X%02X%s%02X%02X%02X%02X",

Be careful ;), edit the correct line and in the correct position. The change is: 00 is replaced with 64.

Save, recompile, replace executable if needed and restart smsd. Now when you send a message, it has a fixed message reference number 100. From the log you should see how "<- +CMGS: 100 OK" is returned and there must be "Message_id: 100" stored in the sent message file. I assume that also status report should work now.

If this works with your modem, I will release a path for this including random start for the reference number and an unique reference number for each outgoing message. This requires a new setting for smsd.conf, but it's not a big job to do. It will be available in future versions too.

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
Good morning.
I made changes according to your examples, but have not received proper effect it :-( What could I do wrong?

I completely removed smsd, introduced izmenneiya a file and did make install. Run it and sent the message.


if (strcmp(mode,"old")==0)
sprintf(pdu,"%02X00%02X%02X%s00%02X%02X",flags,numberlength,numberformat,tmp,coding,messagelen);
else
{
if (validity < 0 || validity > 255)
validity = validity_period;
sprintf(pdu, "00%02X64%02X%02X%s%02X%02X%02X%02X",
flags, numberlength, numberformat, tmp,
(system_msg)? 0x40 : (replace_msg >= 1 && replace_msg <= 7)? 0x40 +replace_msg : 0,
(system_msg)? 0xF4 : coding, validity, messagelen);
}




Hidden private text.





Thanks in advance for your prompt response.


« Last edit by keke on Fri Dec 11, 2009 06:15, 175 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
The PDU verifies that you have applied the change successfully. There was a status report requested and the message id is 64 hexadecimal. The phone still returned value 0, which is not good.

This phone supports status reports when sending SMS manually. There is a setting "receive delivery reports" and it probably is set to "yes". In any case the correct message id should be returned when a message is sent. It sounds like the external AT command interface of this phone has a bug or is missing this feature.

You could manually try to see if there is a different memory for status reports:

Stop the smsd.

Start it in communication mode:
smsd -C GSM0

Follow the instructions on the screen.

Type ATE1 (and enter).
The response should be OK.

Type AT+CPMS=?
List of supported memory names is listed.

If there is SR listed, try:
AT+CPMS="SR"

and then:
AT+CPMS?

What is the result?

However, even if there is a memory for status reports, it does not help very much as long as correct message id is not available. Probably using the SIM from another operator does not help, so this phone just is not good :(.

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
Yes, yes, I checked the confirmation in manual mode comes, everything works. Now proverb according to your recommendations.

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
That's what brings modem:

ATE1
OK
AT+CPMS=?
+CPMS: ("ME","SM"),("ME","SM"),("ME","SM")

OK
AT+CPMS="SR"
+CMS ERROR: 321
AT+CPMS?
+CPMS: "ME",0,100,"ME",0,100,"ME",0,100

OK

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Ok, there is only one memory in the device and as you have not received any status reports, it means that this device does not support them while used with AT command interface.

If a better firmware can be found for this device, it may fix this problem. Otherwise, nothing can be done to get this device work well with Smstools or any external software. :(

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
Hi!
Unfortunately for this model phone is no firmware ((. Can you recommend something from the model for the solution to my problem?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I do not have any exact model to recommend, but some modem which is based on Wavecom chip will work well. Anyway, real modems work better than phones.

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
Yes, I agree that the real GSM modem works better :-), but it is expensive compared to conventional telephone. Thank you for the clarification.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Some old phones like Nokia 6210 work well too, but it requires an adapter and may be hard to find nowadays.

Anyway, remember to return the change that was made to a file pdu.c.

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
Yes, I returned. Thank you for your help. It shook that there is a problem with this model phone. I'll try to find something more suitable.

Member
Registered:
Dec 2009
Location: NiNo, Russian Federation
Topic owner
Provide all possible assistance to the development of the project. :-)) Good luck to you in this project!

;) ;) ;)

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Thank you!

  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.