Archive for March, 2009

Bluetooth Profile Tutorial - SPP

Sunday, March 29th, 2009

Just in case you didn’t notice, the Bluetooth specification is a huge spec. It’s over 1000 pages and covers alot of topics including advanced frequency hopping, low power states, communication parameters, and a whole bunch of other stuff. So, as I work on “Bluetooth for Java, 2ed”, I thought that it would be a good idea to create a tutorial on what all the profiles are, and what do they do. So let’s get started!

Profile Name: Serial Port Profile

Abbreviation: SPP

UUID: 0×1101

Description: The Serial Port Profile (SPP) is a profile that interacts directly with the RFCOMM layer in the Bluetooth protocol stack, and it’s one of the most commonly used profiles since the inception of Bluetooth. If you have an electronic device has has a serial port, or is capable of processing raw byte streams, then SPP would be a good choice if you wanted to wirelessly-enable that device. On a Bluetooth-enabled computer, this profile is used to create a virtual serial port, so that applications on the PC can communicate to wireless Bluetooth devices as if they were directly connected over an actual serial port. From an application developer’s perspective, using the SPP is very easy to do since there’s no protocol overhead that you have to follow - just send and receive byte streams.

Common Implementations: RS232 to Bluetooth converters, Bluetooth GPS devices, mobile phones, desktop computers

PlaySIM and JavaCard 3

Sunday, March 15th, 2009

First of all, has anyone heard of JavaCard 3 technology, and why it is awesome? Not just, awesome, but earth-shattering-awesome? If your mobile application needs to handle any form of personal identification or security, then you should obviously know why smart cards are mentioned over and over. Billions of cellphones use smart cards to identify the owner (not the user) of the phone, and smart card technology is also used in dozens other use cases world wide.

So, as a mobile developer, you should have some fleeting interest in smart cards, SIM cards, etc. Now, for most developers, smart cards are NOT easy to program, and you have to communicate with the card with lots of byte streams (real fun stuff). Well, when Sun released the JavaCard 3 specification a few years ago, things changed dramatically since now you can write server applications that reside on the card. Let me repeat that…

SERVER APPLICATIONS THAT RESIDE ON THE CARD

This, of course, is a huge development that will leapfrog mobile identity services. Now, the purpose of this post is not to talk about the supreme awesomeness of JavaCard 3. The “Security Gets Personal” Blog by has an excellent post on that. The purpose of this post is to lament the sad fact that although the JavaCard 3 spec has been out since 2007, developers still don’t have the tools to create and test JavaCard 3 applications.

However, if you attended the M3DD conference this year like I did, then you know why I’m a happy person right now. Take a look at the confusing slide below, and I’ll explain afterward.

playsim.gif

PlaySIM technology will allow you to use the Squawk JVM on your SunSpot device to emulate the JavaCard 3.0 JVM. This is monumentally-huge-and-exciting-information since smart card development has traditionally been a tedious and expensive process. By allowing developers to use SunSpot devices to program JavaCard 3 server applications, then Sun has signifcantly lowered the barrier to entry to get stared with this exciting technology. You should expect this technology to be released before the JavaOne conference this year.

How to use Bluetooth-enabled GPS device

Sunday, March 8th, 2009

For those of you who don’t know, I work as an Architect at Accenture. Well, it turns out that some of my coworkers who read my blog, had no idea that there’s a whole section on my main website (JavaBluetooth.com) that is dedicated  to Java Bluetooth articles that I wrote after I finished the first edition of my book. So, if you’re in that case as well, be sure to check out those articles since they have great example code that you can copy, paste, pillage, and steal for your own nefarious purposes.

Now, two of the articles on the site provide detailed instructions on how to use a Bluetooth-enabled GPS device to get your location, and plot it on a map using one of the free web-based mapping services. So, be sure to check it out if you haven’t already done so.

Thanks!