Skip to main content

sms with Russian symbols

5 replies [Last post]
konusua
Offline
Joined: 2009-09-15
Points: 0

My task to send sms messages in a cyrillic alphabet.
javax.comm.SerialPort allows to work only with databits_8.
Give me, please, advice.
How can I send sms with russian symbols .

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jaywayjohan
Offline
Joined: 2008-06-18
Points: 0

Hi,

why do you have to use the serial port? The WMA API is designed for sending SMS from a Java ME phone.

Regards
Johan

konusua
Offline
Joined: 2009-09-15
Points: 0

My task is to send sms messages from java application.
I connect gsm modem or phone to usb port, create messages from
database and send it to sms list. I can send translit messages ..,
but could not understand, how can I switch to national locking shift table.
Do you know ?

jaywayjohan
Offline
Joined: 2008-06-18
Points: 0

Send the text as UTF-16 via the serial communications protocol to the phone. This send russian characters as two 8 bytes. When you have received the data on the phone, you should use the JSR-120/JSR-205 API to send the message.

Regards
Johan

konusua
Offline
Joined: 2009-09-15
Points: 0

Johan,
I downloaded WTK25, installed it and run the sample code
...
String addr = "sms://+381234567";
MessageConnection conn = (MessageConnection) Connector.open (addr) ;
TextMessage msg = (TextMessage)conn.newMessage (MessageConnection.TEXT_MESSAGE) ;
msg.setPayloadText ("Hello World!") ;
conn.send (msg) ;
and received an error
after MessageConnection conn = (MessageConnection) Connector.open (addr) ;

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.midp.Configuration.getProperty0(Ljava/lang/String;)Ljava/lang/String;
at com.sun.midp.Configuration.getProperty0(Native Method)
at com.sun.midp.Configuration.getProperty(Configuration.java:34)
at com.sun.midp.io.InternalConnector.(InternalConnector.java:91)
at javax.microedition.io.Connector.open(Connector.java:158)
at javax.microedition.io.Connector.open(Connector.java:138)
at javax.microedition.io.Connector.open(Connector.java:120)
at sendsms.main(sendsms.java:16)

What is wrong ?

PS: ( Johan. I installed SonyEricsson mobile into usb port. )

jaywayjohan
Offline
Joined: 2008-06-18
Points: 0

Hi,

it seems that the emulator fails to load some native dll. Probably an internal error in the WTK emulator.

To test a MIDlet that sends SMS, you need to start two emulator instances. You also need to set the telephone number on both emulators. The default numbers are: +5550000 and +5550001 respectively.

If you need to send from a device, you need to use on-device-debug found in Sony Ericsson development kit. This way you could start the phone via the USB cable and send an actual SMS from the phone.

Regards
Johan