Skip to main content

Bluetooth Connection - Marge

No replies
Joined: 2010-02-03

Hello friends,
I'm working in my thesis,i want to talk two mobile phones with each other with bluetooth and i have no enough time. So i looked for easy way to do this and found a framework called "marge". And there is a video about marge which teachs you how to a simple bluetooth chat project.
Here is links.
direct link:*checkout*/marge/trunk/docs/mar...

I don't know much about JAVA ME, NETBeans and Wireless Toolkit but i watched this video. Then i a done what the video says and run the aplication. But there is some problem and i can't solve it. I have wathed that video 4 times and i have done same as it tells.I'm sure about that. But it doesn't works.And i think it will be good for me use this Marge framework beaceuse it is easy to understand and implement so i could tell my teacher what the code does.

Here is my project same as video says.

And here is Marge jar file that you must add to libraries & resources

and you should use Wireless Toolkit 2.5.2 that video says.

Then my friends i want your help what is the problem. Here is problem.
I run two times the project samet time and first i choose server , it seems works, then in the second one i choose client but it gives a error if i click once more it goes to message form but gives some eroors too and does't send messages.

Here is my code also.

ERROR when i clicked to "client" in the second run.

Starting emulator in execution mode
Running with storage root C:\Documents and Settings\Mesut\j2mewtk\2.5.2\appdb\temp.DefaultColorPhone1
Running with locale: Turkish_Turkey.1254
Running in the identified_third_party security domain
javax.bluetooth.BluetoothStateException: The previous device discovery is running...
at com.sun.kvem.jsr082.bluetooth.SelectServiceHandler.selectService(
at com.sun.kvem.jsr082.bluetooth.DiscoveryAgentImpl.selectService(
at javax.bluetooth.DiscoveryAgent.selectService(
at BluetoothChatlMIDlet$
Uncaught exception java/lang/IllegalArgumentException: Null URL.

//i think here is error.
BluetoothChatlMIDlet.this.device = AutoConnect.connectToServer(SERVER_NAME,BluetoothChatlMIDlet.this);

Please my friends help me Sad((

And i'm sorry about my terrible English..
Thank you..