PDA

Click to See Complete Forum and Search --> : ANyone with experience in sending sms through app?


MrNorth
Jul 5th, 2007, 04:19 AM
Hi!

Im wondering if anyone has tried the following:

* create an application that send an sms through a gsm modem connected to the serial port?

I have managed to do this using text mode and sending AT commands, but for some reason swedish and german characters do not show up properly in the phone (ericsson k610i).

Anyone that have clues? Right nnow im getting a little desperate...

/Henrik

BillGeek
Jul 5th, 2007, 06:01 AM
No idea... perhaps your PDU contains the incorrect ASCII characters? I remember that you can only use a certain list of characters... will quickly try to find them...

wossname
Jul 5th, 2007, 06:21 AM
AT commands are 7-bit (ascii). If you want any fancy chars you'll have to do some research on the SMS protocol.

BillGeek
Jul 5th, 2007, 06:23 AM
Woss is right... though you convert your 8-Bit octets to 7-Bit septets, which will be sent through to the SMS. I'm taking you know this, as you've done some things with AT already?

Look, the ASCII value for the character "ü" is 252.
Normal 8-Bit Binary = 1111 1100
Which is EB in hex...

Now if we were to convert this to 7-Bit ASCII, (111 1100) I THINK you will get:
7B in hex... What happens when you send this through as a septet in the PDU? What does it return?

I can't really remember how to construct the PDU (will have to scratch out the old projects...) so I'm not quite sure if my calculations are correct...

MrNorth
Jul 5th, 2007, 06:24 AM
Thanks for your reply!

Hmm are you sure? Because the swedish and german characters are available in the ascii table "ISO 8859-1" which is also called "latin-1".

So text mode by default doesnt support these characters? Then how should I do to send them??? I really want to use "text mode" instead of PDU mode.

/Henrik

BillGeek
Jul 5th, 2007, 06:31 AM
I can't tell you why it won't work, but I can tell you: If you plan to distribute this application, it's best working in PDU mode. Reason being: My SEw800i does not support text mode, nor do the rest of the SE walkman range... Though, to get back to the original question:

Have a look at this (http://www.gsmfavorites.com/documents/sms/pdutext/) link. They explicitly say there:

There are two ways of sending and receiving SMS messages: by text mode and by PDU (protocol description unit) mode. The text mode (unavailable on some phones) is just an encoding of the bit stream represented by the PDU mode. Alphabets may differ and there are several encoding alternatives when displaying an SMS message. The most common options are "PCCP437", "PCDN", "8859-1", "IRA" and "GSM". These are all set by the at-command AT+CSCS, when you read the message in a computer application. If you read the message on your phone, the phone will choose a proper encoding. An application capable of reading incoming SMS messages, can thus use text mode or PDU mode. If text mode is used, the application is bound to (or limited by) the set of preset encoding options. In some cases, that's just not good enough. If PDU mode is used, any encoding can be implemented.

Don't know if this will help?

MrNorth
Jul 6th, 2007, 04:30 AM
Hi!

This application will only be used by a single type of modem that is distributed along with it.

I will investivate the possibility to send the message using PDU more instead of text mode. I have some clues on how it can be done...


thanks!

Henrik

Valleysboy1978
Jul 6th, 2007, 05:53 AM
We just use a third party company called 2SMS which the client pays about 2p per text. Makes it much easier from our point of view

MrNorth
Jul 6th, 2007, 07:53 AM
Hi!

We have found a class in this link...
http://dev.mobiled.org/trac/browser/MMSProxyServer/src/org/smslib/CGSMAlphabet.java?rev=100&format=txt

But we are not entirely sure what this class does, and if it helps solve our problems? Anyone with more experience in 7bit and 8 bit gsm standards?

Perhaps yoou want to check it out?

kind regards
Henrik

BillGeek
Jul 6th, 2007, 07:56 AM
Unfortunately I'm no java programmer, but it seems like they've given you (from what I can deduce) the hexidecimal values for the specific letters?

MrNorth
Jul 6th, 2007, 08:15 AM
Hi!

yeah as far as I understand it, this translation-class check each character in the ascii string and translates it to 7bit gsm ascii? Then my question is if I can simply use this string and send it in text mode? Or if I have to convert it to hex and send it using pdu mode?

Lol feel like a dumbass but I have never worked with cellphones before....

/Henrik

nemaroller
Jul 6th, 2007, 08:25 AM
The answer to your question lies along the same lines as 'How many non-Buddhists own a miniature Buddha statue'?

BillGeek
Jul 9th, 2007, 01:04 AM
I think it relies solely on you whether or not you want to use PDU or normal text mode.

If it was up to me, I would suggest PDU, as that's the only one I've ever worked with... :)