By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,248 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,248 IT Pros & Developers. It's quick & easy.

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

P: 4
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
UCS2","GSM","PCCP437","PCDN","IRA","HEX","8859-1

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



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

At+CSCS?
+CSCS:"PCCP347"
OK

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)
like
[[[[ port.Encoding = Encoding.GetEncoding("utf-8"); ]]]]]

but useless

also
i tried to use this code in hyper terminal and in c# code(with the past character sets like:
AT+cscs="ucs2"
AT+CMGS="phoneNO"
>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
Share this Question
Share on Google+
4 Replies


P: 1
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:
AT+CSCS="HEX"
then execute this command :
AT+CSMP=17,167,0,8

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

Saeed
Yemen
Dec 7 '09 #2

markmcgookin
Expert 100+
P: 648
Saeed welcome to Bytes, thanks for this great reply! Hope to see more useful posts from you!
Dec 14 '09 #3

P: 1
thanks Saeed,
but when I write this command

AT+CSMP=17,167,0,8

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

P: 1
Sending SMS messages with a mobile phone or GSM / GPRS modem has a disadvantage - the SMS transmission speed is low. As your SMS messaging application becomes more popular, it needs to handle a larger number of SMS messages and ultimately the mobile phone or GSM / GPRS modem cannot take the load. To achieve a high SMS transmission speed, a direct connection to an SMSC or SMS gateway from a wireless provider or an SMS service provider is required. However, AT commands are not used for communication with an SMS center or SMS gateway. This means that you need to significantly change your text messaging application to switch from a wireless modem-based solution to an SMSC-based solution.
3 Weeks Ago #5

Post your reply

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