Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Only variables should be assigned by reference</em> in <em>/home/mwkoh/twit88.com/home/modules/links/links_related.module</em> on line <em>204</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Only variables should be assigned by reference</em> in <em>/home/mwkoh/twit88.com/home/modules/links/links_related.module</em> on line <em>426</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Only variables should be assigned by reference</em> in <em>/home/mwkoh/twit88.com/home/modules/links/links.inc</em> on line <em>1121</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Only variables should be assigned by reference</em> in <em>/home/mwkoh/twit88.com/home/modules/links/links.inc</em> on line <em>1121</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
Warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Function ereg() is deprecated</em> in <em>/home/mwkoh/twit88.com/home/includes/file.inc</em> on line <em>647</em>.', 2, '', 'https://twit88.com/home/utility/sms-pdu-encode-decode?adid=75178', '', '207.241.229.243', 1457141446) in /home/mwkoh/twit88.com/home/includes/database.mysql.inc on line 172
SMS (Short Message Service) is specified by the ETSI (standards GSM 03.401 and 03.382 ). It can contain up to 160 characters, where each character is written according to the 7-bits GSM default alphabet.[ 7 bits default table ]
SMS also contains some meta-data, e.g.
Info about the senders ( Service center number, sender number)
Protocol information (Protocol identifier, Data coding scheme)
Timestamp
There are 2 ways to receive and send SMS messages a, PDU (protocol discription unit) and Text mode. In this document we focus on PDU mode.
PDU format can be used on any encoding.
As an example: 07911326040000F0040B911346610089F600002080629 17314080CC8F71D14969741F977FD07
The above PDU string contains the message "How are you?" and was read from a Siemens C35i mobile phone.The string is built from hexadecimal-octets and semi decimal-octets. As mentioned, SMS contains metadata about itself.
We explain it using the example above:
Octet(s)
Description
format
In this example
07
Length of the SMSC information
hex-octet
7 octets
91
Type of address of SMSC
hex-octet
internation format
13 26 04 00 00 F0
SMSC number
decimal semi-octets b
31624000000
04
First octet of this SMS-DELIVER message.
hex-octet
TP-MMS
0B
Length of the sender address
hex-octet
11 (decimal)
91
Type of address of the sender number
hex-octet
...
13 46 61 00 89 F6
Sender number
decimal semi-octets
31641600986
00
Protocol identifier
hex-octets
...
00
Data encoding scheme
hex-octets
...
20 80 62 91 73 14 08
Time stamp c
decimal semi-octets
06-08-02 29:17:31
0C
Length of User data (SMS message)
hex-octets
12 (decimal)
C8 F7 1D 14 96 97 41 F9 77 FD 07
User data
8-bit octets respresenting 7-bit data
How are you?
PDU Encoder and Decoder
Notes
a.
To see which modes your mobile supports, you can use the "AT+CMGF=?" command.
You will get a response with the supported SMS formats
0: PDU mode, 1: Text mode
b.
To obtain data from a string that is written as a semi-octet, you have to swap the semi-octet string. If the length of a semi-octet string is odd, you have to add an extra "F" to make it even, so that you get a proper octet string. Example:
"13 46 61 00 89 F6" becomes "31 64 16 00 98 6F"
c.
Time stamp is represented in semi-octets (See note b). So "20 80 62 91 73 14 08" becomes "02 08 26 02 29 17 31 80". The first 6 characters represent the date, the next 6 characters represent the time, the last 2 characters represent the time-zone related to the GMT.