|
|
| Bluetooth Development |
|
 |
Welcome to Benhui.net Bluetooth development section. This section focus on application development resources for Bluetooth technology. Our current mission is to help J2ME Bluetooth developers get started with writing bluetooth applications. The tools and resources provided here selected with this mission in mind. We welcome your feedback on this site. You can email us by clicking here. |
How to Develop Bluetooth App using SUN WTK 2.1
I am getting a lot of emails asking me how to develop Bluetooth applications using SUN J2ME Wireless Toolkit 2.1. So I repackage BlueChat example code to compile under WTK 2.1 and run under Nokia Series60 MIDP SDK 0.3. Both tools are freely available and I think this tutorial will answer a lot of questions. Happy Blue-coding... [read the tutorial...]
Bluetooth BlueChat example code
UPDATE: Now run on Nokia Series60 SDK Emulator and Sony Ericsson P900 phone
BlueChat is an example application that I developred for my JDJ article (published Feb 2004). Complete source code and documentation can be found here. This code base is fully tested on Nokia 6600 and able to run on real phone. I also include some of my Bluetooth experience that I encounter during the development of this application. [click to download...]
Bluetooth (JABWT) Browser
 |
JABWT Browser is a simple MIDlet that can sniff and explore surrounding bluetooth devices information. It is the explorer for bluetooth network! [click to download...]
Currently supported features
- Device discovery
- Device Bluetooth information (address, device class, service class)
- Service discovery
- Service record browsing (all known attributes)
|

Bluetooth Code Gallery
Our bluetooth code gallery has everything, every code, every example that can get you started with bluetooth development in Java. (Using JSR-82)
| Device Discovery (DiscoveryMain.java) [view code] [download] [feedback] |
| This code demostrates device discovery process and display found devices on a list. Bluetooth related implementation are placed in DiscoveryMain.java. Pay attention to doDiscoverDevices() and Listener inner class. Listener inner class is an implementation of DiscoveryListener, which handles all the inquiry results. In this example, inquiry results are listed on the MIDlet screen. |
|
| Service Discovery (DiscoveryMain.java) [view code] [download] [feedback] |
| This code demostrates service discovery process and display found services on a list. Bluetooth related implementation are placed in DiscoveryMain.java. Pay attention to doDiscoverServices() and Listener inner class. Listener inner class is an implementation of DiscoveryListener, which handles all the inquiry results. In this example, inquiry results are listed on the MIDlet screen. |
|
| Serial Port Profile Client (SPPClientMain.java) [view code] [download] [feedback] |
| This code demostrates a simple Bluetooth client that connects to a server using Serial Port Profile. Bluetooth related implementation are placed in SPPClientMain.java. Pay attention to doSSPSentMessage() which does the actually connection and data transmission. |
|
| Serial Port Profile Server (SPPSimpleServerUI.java) [view code] [download] [feedback] |
| This code demostrates a simple Bluetooth Serial Port Profile server. Bluetooth related implementation are placed in SPPSimpleServerUI.java. Pay attention to the run() method which create and register a SPP service record and listener for client connection. When a client connection is accepted, this server read in a string from the data stream and display it on the screen. This server is designed to work with the Serial Port Profile Client example above. |
|
(more to come...)

Bluetooth FAQ

Other Bluetooth Development Resources

Bluetooth Books

Coming soon (work under development)
- Getting started guide for Bluetooth development
- More links, more resources. Plus links description
- More bluetooth code from gallery (L2CAP, OBEX, Security, ServiceRecord operation...)
- Improve robustness and error handling in code gallery
- Is there something you want to see here? Tell us! (email us here)

|
|
|
|
|
Benhui.net news
|
| Feb 14, 2004 - New downloads from our Bluetooth section. BlueChat example application with full source code. Learn more! Bluetooth more! [more] |
| Feb 14, 2004 - Found out what SonyEricsson P900 has to offer for J2ME developers. Review our P900 developer review. [more] |
| Feb 14, 2004 - Check out Ben's latest Java Bluetooth development article at JDJ Feb issue. Get it off the shelf while it last. [more] |
| Dec 15, 2003 - Our Bluetooth section open! Check out our Bluetooth Browser, Code gallery, and tons of links. [more] |
| Nov 08, 2003 - Join us to chat with Michael Yuan. Learn more about Enterprise J2ME. [more] |
| Nov 08, 2003 - 35 more links added to our popular J2ME Master Links [more] |
| Nov 08, 2003 - MIDP 2.0 phone list is updated to include the latest and greatest phones. And with links, too! Check it out. [more] |
| Sept 21, 2003 - Add MIDP 2.0 phone list section. [more] |
| Aug 28, 2003 - Spy your mobile device even more with our Mobile Speed tool. [more] |
| Aug 22, 2003 - Spy your mobile device with our new Mobile Echo tool. [more] |
| Aug 22, 2003 - A new forum section is added to our links database. Questions? Dunno where to start? Start from here! |
| Aug 22, 2003 - Another 20 links added to our database. You have links to suggest? email us! |
|
Aug 01, 2003 - the new benhui.net goes live! Fully updated with lots of J2ME links, UML diagrams, and special features.
|
| Aug 01, 2003 - check out our latest featured phone - Nokia 3650 [more] |
|