• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bluetooth programming using J2SE

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are there any J2SE API's that let you communicate directly with Bluetooth devices connected to your PC's USB port? Is there any guide/tutorial/book out there that deals with this subject?

Any sort of help would be greatly appreciated.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This might be a good place to start.
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joanne Neal:
This might be a good place to start.



Thanks for your quick response. I'll look into it and see how far I can go. But I'm still open to suggestions.
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I downloaded BlueCove from here but I'm completely lost. They haven't provided any sort of documention or code samples in their home page. Can someone help me out here??
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I successfully implemented what you are talking about some time back, but not without immense frustration. Here are the things you need...

1. Look at the Rococo , Avetana and Atinav stacks.

2. Get yourself a high quality dongle. May be a Compaq, HP, IBM dongle or some other branded dongle that these stacks are bound to recognize.

3. Make sure your target device can detect your dongle.

4. Make sure your target device can communicate with the protocol of you choice. Example... some phones dont support OBEX transfers.
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Meyers:
I successfully implemented what you are talking about some time back, but not without immense frustration. Here are the things you need...

1. Look at the Rococo , Avetana and Atinav stacks.

2. Get yourself a high quality dongle. May be a Compaq, HP, IBM dongle or some other branded dongle that these stacks are bound to recognize.

3. Make sure your target device can detect your dongle.

4. Make sure your target device can communicate with the protocol of you choice. Example... some phones dont support OBEX transfers.



The problem with the Rococo, Avetana and Atinav stacks is that they're not free But I'll give'em a shot and if everything works may be I'll consider buying them.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep ! But you can use the evaluation version to see if it will work out for you.
 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@see http://wiki.java.net/bin/view/Javapedia/Bluetooth
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok has anyone tested the Atinav API with a Gigabyte Bluetooth dongle; the only brands that are available in my country are: Gigabyte, Winstar & Billionton. So which one should I buy??
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gigabyte, Winstar & Billionton



Ahhhh sadly these are not available in my country ( as far as i know ). Have a look at the ini files to see which dongle is supported. Atinav or Avetana has an ini file that defines the supported branded dongles. There is a default support if it detects none. I had to experiment with 3 dongles. I bought one, my friend bought the other and the third one came in a lap top. Fortunately two out of three worked. They were COMPAQ and blue soleil dongles.

Here is what i suggest:

1. Buy the one you think will do best first. Make sure that it can communicate with your phone. Then write the code that hosts the transfer protocol of your choice.

2. Dont stop if one of your protocols fail. I think the L2CAP and RFCOMM protocols failed in my case. Keep trying until you can successfully host.

3. Test successfull bluetooth hosts on your computer, by scanning for bluetooth devices and services from your phone.

4. Dont ever give up. Keep trying. Its a good experience. You end up with a fractured skull but the bright side is that your brain can now expand
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Meyers:

They were COMPAQ and blue soleil dongles.



Winstar & Billionton use drivers & softwares made by IVT Blue Soleil. Will that do?
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I found the following lines in the ini file found under \Atinav\J2SE USB\aveLinkBT\USB DRIVER:


So doz dat mean Atinav will support Billionton!!!
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I've installed the Atinav AveLink Bluetooth driver for my bluetooth device and everything is ok.. When I run the client.jar sample app, my cell phone is able to detect my bluetooth device as 'AveLink_Bluetooth_Device' when I scan for devices. So that means everything is ok right? So now how do I trnasfer files, send messages etc?
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cool ! now that your cell phone can detect your USB dongle... write code that will host a service on that dongle. This is a bit tricky. You will have to utilize the L2CAP or RFCOMM or OBEX protocols to communicate via the bluetooth channel. If your phone supports OBEX i would suggest you use this protocol to transfer files. Have a look at this book...

http://www.amazon.com/Bluetooth-Java-Bruce-Hopkins/dp/1590590783

Chapter seven talks about Java and OBEX.
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Meyers:
Cool ! now that your cell phone can detect your USB dongle... write code that will host a service on that dongle. This is a bit tricky. You will have to utilize the L2CAP or RFCOMM or OBEX protocols to communicate via the bluetooth channel. If your phone supports OBEX i would suggest you use this protocol to transfer files. Have a look at this book...

http://www.amazon.com/Bluetooth-Java-Bruce-Hopkins/dp/1590590783

Chapter seven talks about Java and OBEX.



I want to be able to send files/messages using the Atinav API but where is there API?? Also, before I buy their API I want to test it out. So how can I do that using their demo application?
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is what i can remember...

Atinav makes you install the USB dongle with its own driver. That means the USB dongle will be controlled by the atinav dll. The product can be downloaded from this page...

http://www.avelink.com/asp/indexB.asp?suite=B

Use the avelink sdk for J2SE. It can be evaluated for 15 days

The Avetana guys make you register the API with a specific bluetooth address. So the stack will work only on a particular dongle. Find the bluetooth address of your dongle by looking up on its hardware properties.
Get Avetana here...

http://www.avetana-gmbh.de/avetana-gmbh/produkte/jsr82.eng.xml

All stack implementations use the JSR82 spec and make them J2SE compliant. Look up bluetooth code here...

http://www.java-tips.org/java-me-tips/midp/
 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A curiosity: since USB is a standard, I wonder why the Java team did not come up with a javax.usb API.

Has there been any discussion of any such thing that someone here knows of?

Cheers.
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stuart Ash:
A curiosity: since USB is a standard, I wonder why the Java team did not come up with a javax.usb API.

Has there been any discussion of any such thing that someone here knows of?

Cheers.



Yes there are documentations out there for JSR80 which is the Java Specification Request concerned with communication with Universal Serial Bus(USB)devices.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the avetana website for bluetooth API is not accepting my bluetooth device address i need it what should i do please help me
 
evil genius
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please if any one can help me out i would be thankfull please i need it
 
evil genius
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if any one has any idea please let me know please i am working on pc and mobile communication via bluetooth i need it its urgent please
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Please read your private messages regarding an important announcement.
2) Use the Edit button to modify your post if you need to add anything.
3) http://faq.javaranch.com/java/PatienceIsAVirtue - 2 hours without a reply does not warrant a kick
4) http://faq.javaranch.com/java/EaseUp - no need to inform us it's urgent. We're not going to find a solution any faster, as we are all volunteers
5) http://faq.javaranch.com/java/DontWakeTheZombies - this thread was over 2.5 years old
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

evil genius wrote:if any one has any idea please let me know please i am working on pc and mobile communication via bluetooth i need it its urgent please



Did you find the reason why they were not accepting your Bluetooth address. I am also getting same problem
 
Rob Spoor
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Our "evil genius" hasn't been active on the Ranch since these three posts, so I wouldn't expect an answer from him/her.
reply
    Bookmark Topic Watch Topic
  • New Topic