Bluetooth Connection to Fora D15B from Android -
i working on android app connects fora d15b (2-in-1 blood pressure/glucose monitor).
i have tried many combination purpose till none has worked.
here tried.
bluetoothdevice device = btadapter.getremotedevice(bhmacid); string devicename = device.getname(); log.v("bp", "device : " + devicename); try { method m = device.getclass().getmethod("createrfcommsocket", new class[] { int.class }); socket = (bluetoothsocket) m.invoke(device, integer.valueof(1)); // socket = device.createinsecurerfcommsockettoservicerecord(uuid.fromstring(hs_uuid)); // socket = device.createrfcommsockettoservicerecord(uuid.fromstring(hs_uuid)); socket.connect(); log.v("bp", "connected"); } catch (exception e) { e.printstacktrace(); }
i have created socket using 3 different ways both none works given below exception
java.io.ioexception: connection refused @ android.bluetooth.bluetoothsocket.connectnative(native method)
i have tried android app google play app myfitnesscompanion https://play.google.com/store/apps/details?id=com.myfitnesscompanion
works fine on phone.
please help, great if can how myfitnesscompanion connects fora d15b.
-pramod
Comments
Post a Comment