Hey all,
I want to be able to create a little device discovery program using the onboard bluetooth on my xp laptop to find my bluetooth mobile phone. I have downloaded the J2ME Wireless Toolkit and added jsr082.jar and midpapi10.jar to my project.
My question is how do you do the stack initialization for this SDK? I have found the following code for Atinav Java Bluetooth SDK (taken from http://today.java.net/lpt/a/112):
import javax.bluetooth.*;
import javax.microedition.io.*;
import com.atinav.BCC;
public class WirelessDevice implements DiscoveryListener {
LocalDevice localDevice = null;
public WirelessDevice (){
//setting the port number using Atinav's BCC
BCC.setPortName("COM1");
//setting the baud rate using Atinav's BCC
BCC.setBaudRate(57600);
//connectable mode using Atinav's BCC
BCC.setConnectable(true);
//Set discoverable mode using Atinav's BCC
BCC.setDiscoverable(DiscoveryAgent.GIAC);
try{
localDevice = LocalDevice.getLoaclDevice();
}
catch (BluetoothStateException exp) {
}
// implementation of methods in DiscoveryListener class
// of javax.bluetooth goes here
// now do some work
}
}
I can't find the quivalent of what the code does for my SDK. Does anyone know where I can find it or any more relevant tutorials?
Thanks in advance.