Greetings,
I’ve been writing some code to support the sending/receipt of UCS-2 encoded SMS messages within our software product. (With a view to supporting Russian/Cyrillic).
I have test-run my code using a couple of different GSM modems, and have seen inconsistent results. I do not know if I’ve failed to set the appropriate device mode, mis-interpreted the GSM standard, or whether one or more of the modems I’ve used could be at fault.
The problem is this:
I send a 70 character long UCS-2 message to my Siemens TC35i modem. I see the result code come in
+CMT: , [],[,,,,,,,]
(I have set AT+CNMI=3,2 so that the TA forwards all unsolicited SMS results/messages to the TE).
I’ve also set +CSDH=1, so that I see all of the above message parameters.
I see the following field values:
= 0
= 8
= 140,
all of which is as I would expect.
Notably, the of 8 indicates that the message is not compressed (otherwise bit 5 would be set), and that UCS-2 encoding is being used (bit 3 is set).
And the field is 140 because the message is 70 UCS-2 characters i.e. 140 octets since each UCS-2 character is 16 bits.
When I send the same message to my Wavecom WMOD2 modem (from the same handset) I see a similar result code come in. (Obviously timestamp and message reference are different, but most of the important message parameters are the same.
The big difference which I do not understand is that the length is given as 70 not 140.
i.e. it’s as though it’s saying “70 characters” as opposed to “140 octets”. Can anybody please explain why this might be?
Section 9.2.3.16 of GSM 03.40 seems fairly clear to me, that the length should be given in octets.
“If the TP-User-Data is coded using UCS2 data, the TP-User-Data-Length field gives an integer
representation of the number of octets within the TP-User-Data field to follow.”
Can anybody clarify please?
Is it the Siemens modem that is wrong, the Wavecom that is wrong, or are they both right - and I’m wrong!?