Unicode sample

9 posts / 0 new
Last post
dweebz
Unicode sample

Hi, I am trying to send unicode SMS, can you guide me through? I already tested a couple of times more but i cannot see the arabic messages. How will be the encoding for this?

Gurux Ltd
Nice to hear from You again! To determine the code type for SMS data, use the enumeration SMSCodeType (GX_SMS_MSG_CODE_TYPE). SMSMessage1.CodeType = SMSCodeType.MsgUnicode; If not using .NET Framework, use constant GX_SMS_MSG_CODE_TYPE_UNICODE. _____________________________ We are still having some trouble with new, improved versions, but hopefully get them released this week. This should, however, work with the older version, too.
dweebz
Hello! i am here again. First of all, thank you for the quick responses. I followed your reply and had used the code type but I get this error in return. Message did not go and a msgbox popped with this message. any idea where i went wrong? any special thing to do with language settings? More power to you guys!

Jade Ryan

dweebz

I still do get this kind of error when sending Unicode SMS to my test number. Any advise on this how to proceed correctly?

Jade Ryan

Kurumi
Kurumi's picture
Hi, What modem you are using? All modems can not send unicode messages.

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

dweebz
Hello, I have been using Lightwave GPRS/GSM Modem (LW-UGPRS) since I first used GXSMS late last year. I never thought of that, all modems don't support unicode messages?

Jade Ryan

GlenOrd
Hey dweebz, I personally do not know enough to say if Your modem supports unicode, or not, but maybe You can test it? You might find this helpful: Quoted from SMSSolutions.net (http://www.smssolutions.net/tutorials/gsm/sendsmsat/) Quote start:

Sending an Unicode SMS message

Some modems also have the capability to send Unicode or UCS2 messages without encoding a PDU. You can send Unicode messages by only converting the Unicode data to a HEX string and send this string to the modem. To check whether your modem supports this mode, just type the following command: AT+CSCS=? This commands displays the codepages supported by the modem. The modem will respond like this: +CSCS: ("GSM","PCCP437","CUSTOM","HEX") If this string contains "HEX" or "UCS2", Unicode seems to be supported. To specify that you will use an HEX string to send the message, set the codepage to "HEX" or "UCS2" depending on the modem response. In our example we will set the modem to "HEX" : AT+CSCS="HEX" Next, we have to specify the correct DCS (Data Coding Scheme) for Unicode messages, which is 0x08. We can set this value by changing the fourth parameter of the AT+CSMP command to '8': AT+CSMP=1,167,0,8 The modem is now ready to send messages as Unicode. Now is the time to send the actual message: AT+CMGS="+31638740161" Replace the above phone number with your own cell phone number. The modem will respond with: > The only thing you have to program by yourself, is a simple routine which converts the Unicode string to an hexidecimal string like this: مرحبا Which is 'Hello' in arabic will be converted like this: "06450631062D06280627" You can send this hexidecimal string to the modem: 06450631062D06280627 After some seconds the modem will respond with the message ID of the message, indicating that the message was sent correctly: +CMGS: 63 The message will arrive on the mobile phone shortly. End of quote Regards, Glen :)
dweebz
Hi Glen, thanks for the awesome link, i will be using it. Found the same link last thursday night and guess what - when I tried it on my modem, I was able to receive an Arabic message perfectly! My modem showed "HEX" on the +CSCS at command. Now I will try to use GXSMS's SendAtCommand to use these AT commands. I shall be posting my result too. Once again, thank you for your help!

Jade Ryan

Gurux Ltd
Thanks, Glen, for helping out. And thanks, dweebz, for Your intention to share the results. This is a great example of how the community should work. Well done, guys! ________________ Gurux Web Team