×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    8

    bluetooth chat application problems..need help

    hey guys....i m working on a similar project...i.e developing a chat application using bluetooth. The problem is i m unable to get the connection between my laptop emulated mobile device and my nokia bluetooth enabled device 5130 (S 40 series).
    problems:
    1.when i hv multiple midlets in the same suite, it works on my laptop with the emulated device, but when i deploy it on my mobile it shows me some invalid application.
    2.no matter what i do, i cant get to the physical address of my laptop bluetooth adapter.....it always shows a virtual device address...0123456789AF.
    3.i can't run two emulated devices on my laptop simultaneously....i tried doing it using by netbeans 6.8 and the sun WTK SDK......running simultaneously each the server and client versions of may app....but nothing happened. The second emulated device never shows up. So i cant test my apps on my laptop as well.
    Guys, please help me.

  2. #2
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    88

    Re: bluetooth chat application problems..need help

    Hello,
    first of all, you are not able to connect your mobile device with your emulated device (running in your laptop) through bluetooth. If you wish such a thing, you should use the BlueCove API, a JSR82 implementation for JavaSE applications.

    Second, the problem of deploying your midlet can be many things, send us the message error. Which version of CLDC and MIDP are set in your JAD file? Maybe your device does not support one of them (try CLDC 1.1 and MIDP 2.0) and try to deploy again.

    Third, you will not get your bluetooth address using device emulator. Try BlueCove API to such a thing.

    Fourth, any exception is thrown when running two simultaneously application?

    []'s

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    8

    Re: bluetooth chat application problems..need help

    Can u give me a link to download BlueCove API.....and i m using CLDC 1.1 and MIDP 2.0.
    i was wondering if you could guide me through this connection phase....i m kind of a newbie and i don't have much time left for the project submission.....project is to develop a bluetoothc chat app with only 1 client at a time and no chat rooms etc.
    I have tried it many times but each time i face a different problem with the connection.
    rightnow, i have 2 nokia cell phones with me (both with JSR 82) and the SUN WTK for making the jad and jar file....version used are CLDC 1.1 and MIDP 2.0.
    Can u provide some sample code which i can use
    Quote Originally Posted by thiagobrunoms View Post
    Hello,
    first of all, you are not able to connect your mobile device with your emulated device (running in your laptop) through bluetooth. If you wish such a thing, you should use the BlueCove API, a JSR82 implementation for JavaSE applications.

    Second, the problem of deploying your midlet can be many things, send us the message error. Which version of CLDC and MIDP are set in your JAD file? Maybe your device does not support one of them (try CLDC 1.1 and MIDP 2.0) and try to deploy again.

    Third, you will not get your bluetooth address using device emulator. Try BlueCove API to such a thing.

    Fourth, any exception is thrown when running two simultaneously application?

    []'s

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Ahmedabad
    Posts
    254

    Re: bluetooth chat application problems..need help

    Hi,

    Bluecove API is used for developing bluetooth application for desktop, so even you develop with it your purpose of bluetooth chat application won't be served.

    Sun wireless toolkit supports two emulators. I have tested my bluetooth application with that and it worked perfectly. Did you change the bluetooth name and address of the next emulator instance from the settings? If not then please do that.

    In which device are you testing the application? You will to have two mobile device for testing.

    Hope this helps you out.
    Sunil
    Mobile Application Developer

  5. #5
    Registered User
    Join Date
    Jan 2010
    Posts
    8

    Re: bluetooth chat application problems..need help

    hello sunil...thannks very much for the help...but i dnt knw how to simulate two devices from the same SUN WTK....i mean i dont knwo how to change the name and address....can u please guide me in this direction.
    I m currently using two phones, both have JSR 82 specification and the version i m using is CLDC 1.1 and MIDP 2.0.
    and u r suggesting that bluecove API would be of no help me to me...which mean that i should not go for it...but then i dont even know how to simulate two devices simultaneously from the same SUN WTK...please help me in this.
    I have one more question in mind....i m kind of a newbie to this....and the problem is that as i m developing a bluetooth chat application....soo there won't be a server or a client .....i mean both the devices will act as server and client inter-changeably.....the device sending the message will be the server and the one receiving the message will act as a client....and then when the other device sends the messages, the server and client will change....soo when the message transfer will go on,,,for each message it will make a new connection which doesn't sound a good idea and an elegant solution too.
    Can u suggest a better way for the above procedure...and let me know if i am wrong somewhere with the basics.
    Can i get ur email id and contact no if u dont mind....bcoz i dont have much time left for the above project(merely 3 days)...soo direct contact would serve a better communication.
    please help me.
    Quote Originally Posted by sunil_bhambani123 View Post
    Hi,

    Bluecove API is used for developing bluetooth application for desktop, so even you develop with it your purpose of bluetooth chat application won't be served.

    Sun wireless toolkit supports two emulators. I have tested my bluetooth application with that and it worked perfectly. Did you change the bluetooth name and address of the next emulator instance from the settings? If not then please do that.

    In which device are you testing the application? You will to have two mobile device for testing.

    Hope this helps you out.

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: bluetooth chat application problems..need help

    Did you think about, maybe, searching for some examples?

    If you're using the Java ME SDK 3, the technique for running two emulator sessions for bluetooth testing is described in the helpset, in the section on JSR-82, under "running the bluetooth demo".

    Google for something like "midp bluetooth chat".

    Graham.

  7. #7
    Registered User
    Join Date
    Jan 2010
    Posts
    8

    Re: bluetooth chat application problems..need help

    rightnow,that problem is solved bcoz now i have two cellphones both JSR82 to test my application.
    I have one more question in mind....i m kind of a newbie to this....and the problem is that as i m developing a bluetooth chat application....soo there won't be a server or a client .....i mean both the devices will act as server and client inter-changeably.....the device sending the message will be the server and the one receiving the message will act as a client....and then when the other device sends the messages, the server and client will change....soo when the message transfer will go on,,,for each message it will make a new connection which doesn't sound a good idea and an elegant solution too.
    Can any1 suggest a better way for the above procedure.
    Quote Originally Posted by grahamhughes View Post
    Did you think about, maybe, searching for some examples?

    If you're using the Java ME SDK 3, the technique for running two emulator sessions for bluetooth testing is described in the helpset, in the section on JSR-82, under "running the bluetooth demo".

    Google for something like "midp bluetooth chat".

    Graham.

  8. #8
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Ahmedabad
    Posts
    254

    Re: bluetooth chat application problems..need help

    Hi,

    Please go through this article, it will give you the understanding of bluetooth. In bluetooth communication the one that initiates the connection is the master and the other one slave. And the master and slave use point-to-point communication. so, may I know what is the need of establishing the connection again and again. Once the connection is opened the master and slave should be able to communicate on the same connection.

    Moreover, in any chatting application we never open the TCP connection again and again. It is opened once and the communication takes place on that connection itself so the same logic applies to bluetooth as well.

    Go through http://www.jsr82.com. It has lots of sample source code available, but for desktop. You can use the bluetooth part of that code without any modification.
    Sunil
    Mobile Application Developer

Similar Threads

  1. J2ME Bluetooth Application doesn't work on N95
    By Sword_xx in forum Bluetooth Technology
    Replies: 1
    Last Post: 2009-09-24, 10:53
  2. Bluetooth application crash in emulator
    By cosminr in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2009-05-19, 10:14
  3. Bluetooth Application Identifier Tool before Application is Installed on Series 60
    By asabagh in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-10-31, 13:12
  4. 6310i using Application Installer via Bluetooth
    By strangdlr in forum Bluetooth Technology
    Replies: 0
    Last Post: 2002-09-24, 07:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×