Bluetooth Mobile App - Pair with Digital Pen
Hi!
First a short Introduction:
For a project I have to stream data from Maxell Penit DP201(4.1) to a mobile device (over a midlet). Data Connection is built up over Bluetooth.
My Questions are: Is btl2cap the right method for connecting digital pen and mobile phone?
If yes, is the btl2cap string correct?
The pens device adress is 00-07-CF-56-05-5D
Does anyone know a sample application like this I want to program?
Structure;
package /
Midlet
Class extending thread
Here's the code:
publicvoid run(){
[...]
//Bluetooth
//String connString = "btspp://0007808303AA:1;master=false";
String connString ="btl2cap://localhost:0007cf56055d;ReceiveMTU=512;TransmitMTU=512";
System.out.println(connString);
try{
LocalDevice local = LocalDevice.getLocalDevice( ) ;
// build ServiceRecord
local.setDiscoverable(DiscoveryAgent.GIAC);
L2CAPConnectionNotifier service = (L2CAPConnectionNotifier)
Connector.open(connString);
ServiceRecord sr = local.getRecord(service);
// accept Connection
L2CAPConnection connection = (L2CAPConnection ) service.acceptAndOpen( );
}catch (Exception e){
e.printStackTrace();
}
Thanks to all who can help me to reach the next step in my project.
Best regards

