You Are Here:

Community: Developer Discussion Boards

#1 Old Java J2me Connectivity via blutooth - 2007-03-05, 13:53

Join Date: Mar 2007
Posts: 6
riyazalone
Offline
Registered User
Hello all,

My name is Riyaz , I am doing my masters at PSG tech Tamil Nadu,India.
As a part of my curriculum I have to do projects under J2ME, So i chose to do a project which involves PC - phone connectivity via blue tooth. I have had problems with basic connectivity and device discovery, I learn t from the forum that you have implemented it successfully, Can u help me out in tat , I am new to this blue tooth technology , Can some one tell me how to get started onthis particularly for my project...It would be more helpful if you give me those source codes

Thanks in advance

Regards
Edit/Delete Message

This is the first ever Thread to be posted in my life
Reply With Quote

#2 Old Re: Java J2me Connectivity via blutooth - 2007-03-05, 16:55

Join Date: Nov 2003
Posts: 3,641
Location: Bangalore , India
Send a message via Yahoo to balagopalks
balagopalks's Avatar
balagopalks
Offline
Forum Nokia Expert
May be these docs with examples are of some help to you.

PC Connectivity over Bluetooth in Java™ Applications (with Examples)
http://www.forum.nokia.com/info/sw.n..._0_en.zip.html

MIDP: Bluetooth RFCOMM and L2CAP Examples
http://www.forum.nokia.com/info/sw.n..._0_en.zip.html

MIDP: Bluetooth API Developer's Guide v2.0
http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html

MIDP: Bluetooth OBEX Example - Business Card Exchanger
http://www.forum.nokia.com/info/sw.n..._0_en.zip.html

Regards
Gopal

__________________
MobiQuil.com
An initiative by Developers for Developers.
http://www.mobiquil.com - Alpha - Launched.
Reply With Quote

#3 Old Post Re: Java J2me Connectivity via blutooth - 2007-03-05, 21:29

Join Date: Aug 2006
Posts: 8
vaids
Offline
Registered User
Hi!all..
I am doing the same thing...in my project actually i want to transfer data from pc to mbile back and forth..using bluetooth
I m using atinave aveLink BT library...

In that i am able to transfer data from mobile to pdesktop pc successfully..
in my application desktop pc is server and mobile j2me application is client....
Now i am able to connect both mobile and pc and as i have told u already i am to send data from mobile to pc and pc receives them and prints them but when i am trying reverse thing my mobile receives data randomly i.e. it may happen that mobile doesn't receive data at all or mobile receives all the data...and in that ratio of not receiving data in mobile at alll is more than receiving successfully....

I have also tried to communicate between two mobiles in which one is server and other mobile is client using same code to receive and send data....they both communicate well successfully back and forth...

but problem is only between pc and mobile....

Another thing i have also tried to make my mobile server and pc as client but in that case when in service search completed method when pc client tries to connect to mobile server which is already successfully in waiting mode the pc throws an exception "java.io.exception : Connection failed"

So i mnot getting the reason why it is happening....

pc server can receive data from mobile client successfully and can slao send data successfully but mobile client doesn't receives or some times receives....

mobile server and mobile client both successfully communicate with each other successfully.......

And mobile server and pc client case mobile server goes into waiting mode but client is not able to connect with server throws and io exception: "Connectionfailed"

So is there any one who has same problem as mine???????

or is there any one who can tell me the reason why it is not receiving data or why connection failed exception is coming?????????

Or is there any one who has done successful communication between pc server and mobile client???????????

if some one is there then plz help me because in my project to transfer data back and forth between mobile and pc is necessary....in any case...

Help from any one would be appreciated greatly..............
Reply With Quote

#4 Old Re: Java J2me Connectivity via blutooth - 2007-03-06, 15:36

Join Date: Mar 2007
Posts: 6
riyazalone
Offline
Registered User
Hi bala ...

Thank you for your reply
i will not repeat those errors again
Reply With Quote

#5 Old Re: Java J2me Connectivity via blutooth - 2007-03-06, 16:24

Join Date: Nov 2003
Posts: 3,641
Location: Bangalore , India
Send a message via Yahoo to balagopalks
balagopalks's Avatar
balagopalks
Offline
Forum Nokia Expert
Its okei!, Just my thoughts for a new commer, to keep the Discussion boards well organised and to avoid confusions in future reference.

Regards
Gopal

__________________
MobiQuil.com
An initiative by Developers for Developers.
http://www.mobiquil.com - Alpha - Launched.
Reply With Quote

#6 Old Re: Java J2me Connectivity via blutooth - 2007-03-06, 20:41

Join Date: Aug 2006
Posts: 8
vaids
Offline
Registered User
hi!
now i m stuck up with new problem...

Now i am able to receive data that's only string in mobile 5300 but there is problem in that...
It is like when it receives data the mobile client show that it is disconnected automatically from the connection..
So after that i am not able to send that data to pc server as before i do anything after service search it first promplt me that it is disconnected...
So i can read the data only once and it shows the exception that"java.io.exception:InputStream is closed"

And after that when try to send that data to pc it shows me exception "Symbian Os error -36" is. disconnected..
As it is obviouse that it is disconnected as it promplts me first...

But the odd behaviour is here that when i m trying to read int it show that available bytes are 4i.e.for integer data type but it reads 0 instead integer pc has send to monile...So in this case it won't automatically get disconnected...So if i send data to pc the application will lwt me to send as many time as i want...

So the observation of this behaviour is that when mobile receives string it reads it successfully and display it perfectly...and get automatically disconnected ...but when it read any data type except string it show the data in stream while checking with method is.available() according to data type but it doesn't read that data from stream so displaying nothing and in this case it won't get disconnected automatically...so i m able to send data to pc..

Is there any body who has same problem ????
Is there any body who can help me to sort out my this problem...????

Any help from any one will be appreciated..

Thanks....
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobile Java (MIDP 2.0) and Serial/USB Connectivity cjm28 Mobile Java General 2 2008-10-22 01:53
J2ME MIDlet is limited, why not Java applications on mobile? chen_lin99 Mobile Java General 11 2007-12-29 02:15
Java Instructor looking for J2ME help stanlick Mobile Java General 2 2005-11-27 02:39
Sun Java studio Mobility 6 2004Q3 and Nokia Developer's Suite 2.2 for J2me deployment bassman5 Mobile Java Tools & SDKs 0 2004-12-08 17:57
mms java library & j2me Lendlice Mobile Java General 1 2003-09-26 08:06

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia