471,571 Members | 1,291 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,571 software developers and data experts.

how to send unicoded sms through pc and gsm(urgent)

i'm working on a project to send sms through pc and gsm modem(mobile)
and every thing is ok, i succeded to send but english sms only,
when i tried to send arabic the message sent with errors in encoding the arabic characters.
my mobile is nokia n73, it supports these character sets ofencoding

this is sample code i entered in the hyper terminal,
and surely i tested in c# but also failed

+CSCS:("UCS2","GSM","PCCP437","PCDN","IRA","HEX"," 8859-1")


AND I knew that only(ucs-2, gsm, pccp437) support arabic language
but c# doesn't support anyone of them
i tried in c# getEncoding to use(utf-8 or ("utf-16 as it is similar somehow to the ucs2")
also, iso-8859-9 and 8859-6 and windows-1256)
[[[[ port.Encoding = Encoding.GetEncoding("utf-8"); ]]]]]

but useless

i tried to use this code in hyper terminal and in c# code(with the past character sets like:
>message الرساله+ctrlZ

also the message recieve with encoding errors

i don't know what i should do, but now i'm searching to add ucs-2 character set page to visual c#, however it failed even to send from the hyper terminal.

hint:: i tried to send from demo program called (headwind sms)and it sent succefully the arabic message that means no problems in my mobile.

could anyone help me,please??, or tell me about adding encoding face.

and sorry for writing so much..
Aug 30 '09 #1
3 14521
Same problem face me too today
and I solved it like this :
first if your mobile support Hex mode
(you can know by writting : AT+CSCS=? )

then make the mode Hex as follows:
then execute this command :

now you are ready to send the arabic message but after u make some encoding
for example "مرحبا" will become "06450631062D06280627"

try this code to convert text to unicode:

UnicodeEncoding uni = new UnicodeEncoding();
byte[] encodedBytes = uni.GetBytes(txtMessage.Text);
string text = "";
for (int i = 0; i < encodedBytes.Length; i += 2)
text += string.Format("{0:X2}", encodedBytes[i + 1]) + string.Format("{0:X2}", encodedBytes[i]);
now text contain the message which is ready to send

I hope it will solve ur problem

Dec 7 '09 #2
648 Expert 512MB
Saeed welcome to Bytes, thanks for this great reply! Hope to see more useful posts from you!
Dec 14 '09 #3
thanks Saeed,
but when I write this command


get ERROR?
Attached Images
File Type: jpg unti88tled.jpg (23.1 KB, 1217 views)
Oct 1 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Ray Paseur | last post: by
16 posts views Thread by | last post: by
3 posts views Thread by N. Spiker | last post: by
2 posts views Thread by pradeepm | last post: by
23 posts views Thread by jagmonni | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.