himanshusao / smscgateway

Automatically exported from code.google.com/p/smscgateway
0 stars 0 forks source link

SMSC Gateway not respecting the data_coding set in SUBMIT_SM #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Irrespective of what data_coding is set in SUBMIT_SM, when SMSC is sending 
mt-forwardSM, the TP-DCS field doesn't change.

Original issue reported on code.google.com by amit.bha...@gmail.com on 21 Jun 2012 at 7:42

GoogleCodeExporter commented 9 years ago
If we use the following representation: 0001ccmm where cc is a coding (00 for 
default GSM) and mm is message_class`` representation (00 for flash SMS) so 
TP-DCS will be 00010000 for 7bit flash SMS. Right?

Attached are 4 sms i sent, with 
data_coding = 0, esm=0
data_coding = 1, esm=0
data_coding = 0, esm=1
data_coding = 1, esm=1

both smpp and map

Original comment by wasimb...@gmail.com on 21 Jun 2012 at 9:10

Attachments:

GoogleCodeExporter commented 9 years ago
Classes identify the message's importance as well as the location where it 
should be stored. There are 4 message classes.
Class 0: Indicates that this message is to be displayed on the MS immediately 
and a message delivery report is to be sent back to the SC. The message does 
not have to be saved in the MS or on the SIM card (unless selected to do so by 
the mobile user).
Class 1: Indicates that this message is to be stored in the MS memory or the 
SIM card (depending on memory availability).
Class 2: This message class is Phase 2 specific and carries SIM card data. The 
SIM card data must be successfully transferred prior to sending acknowledgement 
to the SC. An error message will be sent to the SC if this transmission is not 
possible.
Class 3: Indicates that this message will be forwarded from the receiving 
entity to an external device. The delivery acknowledgement will be sent to the 
SC regardless of whether or not the message was forwarded to the external 
device.

Flash SMS
On some phones (all Nokias, some Siemens, Ericsson, Motorola etc..) a class 0 
message will appear as a flash SMS message. These messages appear on the screen 
immediately upon arrival, without the need to press any buttons on the phone. 
If the data coding scheme is set to 16-bit unicode (ucs2), and the message 
starts with "0001", it will appear as a blinking flash message.

Octet   Value   Description
TP-DCS  18  16 bits (UCS2), message class 0
TP-VP   AA  Validity period
TP-UDL  0C  User Data Length, 12 octets
TP-UD   00 01 00 41 00 6C 00 65 00 72 00 74     User Data, message "Alert"
This table shows some relevant octets in a flash SMS message

The first unicode character ("00 01") enables the blinking. The maximum length 
of such a message will then be 69 unicode characters.

Original comment by wasimb...@gmail.com on 21 Jun 2012 at 9:14

GoogleCodeExporter commented 9 years ago
So, I needed to set UCS2, and now its got a better pcap, see attached

Original comment by wasimb...@gmail.com on 21 Jun 2012 at 9:29

Attachments:

GoogleCodeExporter commented 9 years ago
We're setting the message class to 0, but we're also saying that no message 
class is set ... see images of our pcap underneath a working one ...

Original comment by wasimb...@gmail.com on 21 Jun 2012 at 11:20

Attachments:

GoogleCodeExporter commented 9 years ago
Here is the DCS spec, see page 8

Original comment by wasimb...@gmail.com on 22 Jun 2012 at 10:59

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed
http://code.google.com/p/smscgateway/source/detail?r=c93df027894a

This also fixes unicode

Original comment by amit.bha...@gmail.com on 22 Jun 2012 at 1:25