 |
JSR 82 is not only for mobiles!
Posted by brunogh on September 04, 2007 at 04:59 AM | Comments (13)
How could you create Java SE Bluetooth applications, since JSR 82 (Java Apis for Bluetooth) was made thinking in Java ME? In this entry, I am going to explain some aspects around it and also give some tips in order to you start doing Bluetooth desktop applications. In addition, we are going to talk a little about the GCF (Generic Connection Framework).
JSR 82 (Java Apis for Bluetooth) uses GCF, which is an extensible framework intended to support all kind of connections. GCF was defined in CLDC (Connected Limited Device Configuration) 1.0 and CLDC is a usual Java ME configuration for mobile phones. CLDC does not specify the actual supported network protocols or mandate implementations of any specific networking protocols, they are made at the profile level, such as, for example, MIDP (Mobile Information Device Profile). Read this C. Enrique Ortiz's article in order to get more information about GCF.
GCF does not only works in CLDC, it can run in CDC (Connected Device Configuration) - differing from CLDC, CDC requires two protocols to be implemented: File access and Datagram capability, and profiles will extend others - and it is also provided to the Java SE platform as an optional package with JSR 197 (Generic Connection Framework Optional Package for the J2SETM Platform), which is derivated from CLDC 1.1 and mandates a minimum of protocols: Socket, HTTP, File and Datagram. Having GCF in Java SE means that you can use JSR 82 to make compliant desktop applications, you will just need a JSR 82 implementation for that in your classpath. There is a lot of them for different OS (operating system) that runs in different Bluetooth stacks, but I recommend you to try some open source ones:
- Bluecove, which runs over Windows (WIDCOMM, BlueSoleil and Microsoft Bluetooth stack found in Windows XP SP2 and newer) and [updated] at the moment it is not JSR-82 certified implementation (has not passed in all the TCK tests, take a look in Vlad's comment in this entry for more explanation) [updated], but they also have plans to extend it to Linux. Take a look in a cool interview about this project here.
- Avetana, which has a open source version that runs over Linux (BlueZ stack). Lucas Torri used Avetana on the experiments that he have posted.
So, after you got a JSR 82 implementation, you will need a USB Bluetooth dongle - if your desktop does not have a Bluetooth hardware support, because a lot of notebooks are coming with it - and then you can start coding and creating applications that use your desktop, such as, for example, something to communicate with your mobile, remote controllers and so on. Also, Project Marge has a framework on the top of JSR 82 that facilitates a lot of Bluetooth stuff and it is compatible with Java SE. My final advice is that Rococo has a 100% Java free simulator (for non commercial use), called Impronto Simulator. You can use it to test your Java SE Bluetooth code in a simulated environment, it is quite cool before deploying. Take a try doing something and sent me your feedback! ;)
Have a great week!
Bruno Ghisi
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first)
-
Hey! What about Wiimote? I wanna use it in my computer! :-)
Posted by: douglasmendes on September 05, 2007 at 10:03 AM
-
Hey Douglas, it would be pretty interesting! I am sorry I can't try it, because I don't have a Wii. If anybody want to send me one, feel free! :)
Cheers,
Bruno
Posted by: brunogh on September 05, 2007 at 01:29 PM
-
For what it is worth...there's an interesting YouTube Video of a member of the Dutch JUG (nljug) turning one of the SunSpots into a Wii controller -- Eriks SunSPOT Adventures -- VideoGame Controller (Wii-bit of Spots)
Posted by: sunahouston on September 05, 2007 at 05:20 PM
-
Bruno, you used Bluecove?? Works?
I remember too, that uses Avetana is to complicated. They improve something or still complicated??
Posted by: pedrobachiega on September 05, 2007 at 08:52 PM
-
Hi sunahouston, I've seen this video before, it is pretty good!! Actually there are some other good SunSpot videos, Terrence Bar has posted a cool list some time ago. :)
Posted by: brunogh on September 05, 2007 at 09:41 PM
-
Hi Pedro, I've tested Avetana in Ubuntu (BlueZ) and Bluecove in Windows XP (Microsoft Bluetooth Stack) and both are working fine. They have updated both projects some time ago, but I do not know exactly what were the diffs, anyway, take a try! ;)
Posted by: brunogh on September 05, 2007 at 09:44 PM
-
Where can I get a jsr-197 implementation?
Posted by: brantboehmann on September 07, 2007 at 07:55 AM
-
Hi Brant,
both Avetana and Bluecove contains a parcial JSR 197 implementation that works only with Bluetooth protocols (obex, l2cap, rfcomm). I haven't used GCF in Java SE for other things, but I've checked about the JSR 197 RI (reference implementation) and they say that is available trough the Java Partner Engineering. Also, I've quickly searched at google.com and found this site. What are you trying to do? Please let me know if you test and discover more about it.
Thanks,
Bruno
Posted by: brunogh on September 07, 2007 at 08:25 AM
-
I am working on a sensor integration project. Currently it's all JavaSE based. We integration with many serial & ethernet based sensors. We have written a small layer to abstract the actual type(serial/ethernet) and provide InputStreams based on configuration. I was just thinking that a JSR-197 implementation could help us reduce our own maintenance efforts on our proprietary layer and allow for more connection types in a standardized way.
Posted by: brantboehmann on September 12, 2007 at 05:32 AM
-
Hi Brant, looks a very interesting project!
Posted by: brunogh on September 12, 2007 at 06:34 AM
-
Bruno
can you update information about Bluecove!
You say "at the moment it is not a JSR 82 compliant yet "
This is not true. It is more compliant with JSR-82 than any other implementation I have seen!
What I want to say on main page of the project is that it is not JSR-82 certified implementation! And I explain why. Mainly there are some missing API in native stacks to implement full TCK compatibility.
So can you say something like "at the moment it is not JSR-82 certified implementation"
No other JSR-82 implementation in J2SE projects I have tested are passing TCK tests. BUT nobody tells this to users and are not publishing tests results.
Since Bluecove open source the JSR-82 TCK compatibility status are published on the website so users will know what to expect.
Posted by: vlads on November 15, 2007 at 10:53 AM
-
Hi Vlad, thanks for your explanation, Bluecove is such a nice project! Quite a long time I have written this, but I will update this entry, so people will not misunderstood (I think they have made the same thing in Bluecove interview in Rococo's Weblog).
Posted by: brunogh on November 15, 2007 at 11:26 AM
-
I'm so grateful for all that you've done. Thanks again for that nice essay and I would be most grateful if you would send me the latter ones....
mirc
mırc
mirç
mırç
mirc indir
chat yap
islami sohbet
dini sohbet
kelebek
kelebek sohbet
kelebek mirc
kameralı mirc
kameralı sohbet
chat yap
çet
çet odaları
sohbet kanalları
sohbet odaları
yarışma
sevgili
arkadaş
arkadaş ara
arkadaşlık
Posted by: mhsin on June 20, 2008 at 09:53 AM
|