[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 01 Aug 2006 21:25:21 +0300
Thunderbird 188.8.131.52 (X11/20060522)
Yes, it is possible with AT commands. As far as I know, after a successful
AT+CMGS command, the GSM
device returns the so-called MR (message reference). This MR is a number
between 0 and 255 which is
incremented by the device every time a message is sent (of course, when the 255
limit is reached,
the counter is set to 0 again). The delivery notification includes this ID
automatically. So, a
combination phone number - MR would represent the index key for setting the
message status in the
database (delivered or pending).
Have a look over this discussion:
It is quite old, but someone had the same intention as myself pretty long time
ago. I don't know if
he succeeded or not. He found where to modify gnokii and what to do to enable
Unfortunately my C skills are not so strong... and I got pretty lost in all the
files gnokii has...
Below is a quote from the GSM 03.40 standard:
184.108.40.206 TP-Message-Reference (TP-MR)
The TP-Message-Reference field gives an integer representation of a reference
number of the
SMS-SUBMIT or SMS-COMMAND submitted to the SC by the MS. The MS increments
TP-Message-Reference by 1 for each SMS-SUBMIT or SMS-COMMAND being submitted.
The value to
be used for each SMS-SUBMIT is obtained by reading the Last-Used-TP-MR value
from the SMS Status
data field in the SIM (see TS GSM 11.11) and incrementing this value by 1.
After each SMS-SUBMIT has
been submitted to the network, the Last-Used-TP-MR value in the SIM is updated
with the TP-MR that
was used in the SMS-SUBMIT operation. The reference number may possess values
in the range 0 to
255. The value in the TP-MR assigned by the MS is the same value which is
received at the SC.
In the case where no acknowledgement or an appropriate RP-Error is received in
response to an
SMS-SUBMIT or SMS-COMMAND, then the MS may automatically repeat the SMS-SUBMIT
SMS-COMMAND but must use the same TP-MR value. The number of times the MS may
SMS-SUBMIT or SMS-COMMAND is an implementation matter.
If all automatic attempts fail (including the case where no automatic repeat is
provided), the user
informed. The failed message shall be stored in the mobile in such a way that
the user can request a
retransmission using the same TP-MR value, without needing to re-enter any
information. Such storage
need only be provided for a single failed message, the one most recently
The SC may discard an SMS-SUBMIT or SMS-COMMAND which has the same TP-MR value
previous SMS-SUBMIT or SMS-COMMAND received from the same originating address.
A phase 2 or later ME using a phase 1 SIM cannot read or update the
TP-Message-Reference from/to the
SIM, and so the ME shall always retain the Last-Used-TP-MR value in its own
memory, to be used only
in the case of a phase 1 SIM.
The SMS-STATUS-REPORT also contains a TP-Message-Reference field. The value
sent to the MS will
be the same as the TP-Message-Reference value generated by the MS in the
earlier SMS-SUBMIT or
SMS-COMMAND to which the status report relates.
AT+CMGS Send an SMS
Test command Response
Write command Parameter
<length> Length of PDU
If PDU mode (+CMGF=0)
<pdu> See ”AT+CMGL”
+CMGS=<length><CR>PDU is given
<mr> Message reference
If sending is successful:
If sending is not successful:
+CMS ERROR: <err>
All the best!
Pawel Kot wrote:
> On 7/31/06, Dorian <address@hidden> wrote:
>> As far as I know, some GSM terminals send back a message id for each sent
>> sms (a 8bit number). Do you have any idea how to find out such message id
>> using gnokii?
> I don't think it is possible using FBUS protocol. But as Philippe
> says, it should be possible with AT communication. So it is not
> implemented, but it could be implemented.
> take care,