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. Thu Mar 28, 2024 22:00
SMSTools3 Community » Help and support Bottom

Issue with different encoding from incoming from iOS / Android

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Feb 2020
Location: Heredia, Costa Rica
Hello there,

I'm having some issues with codification but that different point depending if i reply from my iphone or if i do from android,

For example:

IPHONE:

root@oem-desktop:/var/spool/sms/incoming# cat *
From: 50688xx
From_TOA: 91 international, ISDN/telephone
From_SMSC: 5058500111
Sent: 20-02-12 09:43:59
Received: 20-02-12 09:44:10
Subject: GSM2
Modem: GSM2
IMSI: 71203xx
IMEI: 3557xx
Report: no
Alphabet: ISO
Length: 61

Ma▒ana es mi▒rcoles y El Ni▒o quiere jugar con el murci▒lago

ANDROID: (WORKS FINE)

From: 506501xxx
From_TOA: 91 international, ISDN/telephone
From_SMSC: 5058500111
Sent: 20-02-12 09:45:49
Received: 20-02-12 09:46:02
Subject: GSM2
Modem: GSM2
IMSI: 71203xxx
IMEI: 355xx
Report: no
Alphabet: UCS2
Length: 32

Ma▒ana es mi▒rcoles en el ▒rbol root@oem-desktop:/var/spool/sms/incoming#

I can decode incoming messages from android with:

root@oem-desktop:/var/spool/sms/incoming# tail -n1 GSM2.Tk0yvj | iconv -f ISO-8859-1
Mañana es miércoles en el árbol

But i cannot decode messages sent from my iphone:

root@oem-desktop:/var/spool/sms/incoming# tail -n1 GSM2.khhzPU | iconv -f ISO-8859-1
Ma¤ana es mi�rcoles y El Ni¤o quiere jugar con el murci�lago

I already try mixing incoming_utf8, decode_unicode_text and cs_convert_optical but nothing looks to work...

I have also try to identify the encoding of messages sent by iphone which say on file are:

root@oem-desktop:/var/spool/sms/incoming# chardetect GSM2.Tk0yvj (ANDROID)
GSM2.Tk0yvj: ISO-8859-1 with confidence 0.73
root@oem-desktop:/var/spool/sms/incoming# chardetect GSM2.khhzPU (iPhone)
GSM2.khhzPU: Windows-1252 with confidence 0.73
root@oem-desktop:/var/spool/sms/incoming#

But no matter what I tried i cannot decode the iPhone messages...

root@oem-desktop:/var/spool/sms/incoming# tail -n1 GSM2.khhzPU | iconv -f ISO-8859-1
Ma¤ana es mi�rcoles y El Ni¤o quiere jugar con el murci�lago root@oem-desktop:/var/spool/sms/incoming#
root@oem-desktop:/var/spool/sms/incoming# tail -n1 GSM2.khhzPU | iconv -f Windows-1252
Ma¤ana es mi‚rcoles y El Ni¤o quiere jugar con el murci‚lago

My current settings are:

root@oem-desktop:/var/spool/sms/incoming# cat /etc/smsd.conf | grep -v '^#'

devices = GSM1,GSM2
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
logfile = /var/log/smstools/smsd.log
infofile = /var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
report = /var/spool/sms/reports
sent = /var/spool/sms/sent
stats = /var/log/smstools/smsd_stats
loglevel = 5
incoming_utf8 = no
receive_before_send = yes
autosplit = 3
eventhandler = /etc/tunnel/eventhandler.php



[queues]
ALL = /var/spool/sms/checked
GSM1 = /var/spool/sms/GSM1
GSM2 = /var/spool/sms/GSM2

[GSM1]
device = /dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.0-port0
queues = GSM1, ALL
incoming = yes
baudrate = 115200
report = yes
report_device_details = yes
decode_unicode_text = no
cs_convert_optical = no

[GSM2]
device = /dev/serial/by-path/pci-0000:00:14.0-usb-0:2:1.0-port0
queues = GSM2, ALL
incoming = yes
baudrate = 115200
report = yes
report_device_details = yes
decode_unicode_text = no
cs_convert_optical = no
root@oem-desktop:/var/spool/sms/incoming#

Any clue about it?

Thank you in advanced.

Member
Registered:
Feb 2020
Location: Heredia, Costa Rica
Topic owner
How to keep all incoming sms in UCS2? Looks like when it automatically changes to ISO it is impossible to get it decoded.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Can you please use the global setting store_received_pdu = 3, restart the smsd and send a message to the smstools from your iphone. Then show the received PDU in here, you can use the Private tag to protect it. I can then check what is going on, but I'll be back in one or two days.

Member
Registered:
Feb 2020
Location: Heredia, Costa Rica
Topic owner
Thank you for your help and your time.

Here it is:

Hidden private text.



Member
Registered:
Feb 2020
Location: Heredia, Costa Rica
Topic owner
Same msg from android that works fine, just in case of comparation

Hidden private text.



Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Thanks for the PDU's and sorry for the late response.

The message from Android looks good, as you told. Similar message from iPhone looks strange when it is translated. It looks like that iPhone did not send the letter é, which is hex 5 in the GSM 03.38 character set. It sent the hex 12, which is Φ and not very often used.

I also tested this issue with my very old testing device, iPhone 4S, and the word murciélago was fine. The message was using default 7bit GSM alphabet, as your PDU's too.

So I do not know what is going on, but if you have any additional information about strange issues, please let me know.

Member
Registered:
Feb 2020
Location: Heredia, Costa Rica
Topic owner
Hello sir,

What I finally did what replace Φ with é, but certanly I don't know why this happens. I test it with iphone 5 and iphone 6 with same PDU result :shock:

I guess i will have to keep an eye on sms and add more ocurrences to our replace portion of code just in case.

Thank you any way for your help.

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.