Things You'll Need:
- a mobile phone that support JSR82 bluetooth API
- a bluetooth GPS receiver
- J2ME development flatform - Wireless Tool Kit download from Sun website.
- willing to learn J2ME language. J2ME is java programing language special designed for mobile phone. It is a bit different with java for PC.
- a sample source code. You can download from website in resources box
-
Step 1
Inquiry bluetooth device in range. each time when a bluetooth device is discovered, DiscoveryListener will trigger procedure deviceDiscovered. When inquiry completed, DiscoveryListener will trigger procedure inquiryCompleted
-
Step 2
Get bluetooth friendly name. We need a ChoiceGroup to store a list of bluetooth friendly name of detected devices. We also need a vector to store detected devices.
-
Step 3
Select bluetooth GPS receiver from the list of detected devices.
-
Step 4
Search for service provided by GPS device. Bluetooth GPS receiver provides L2CAP service, so your program needs to search for this service in order to get GPS's connection string url.
-
Step 5
Get connection string from GPS device. The Connection string URL will have this format Url = "btspp://bluetoothAddress:" + L2CAP_UUID + ";authorize=false;encrypt=false";
-
Step 6
Connect to and receive sentences from GPS device. After you get the url connection from step 5, you can open connection and retrieve NMEA sentences from that connection string.










