How to connect using RemoteDevice

86 views
Skip to first unread message

Bevis

unread,
Feb 1, 2016, 11:19:10 AM2/1/16
to bluecove-developers
I need to connect to a device with a known MAC address, however I need to authenticate with it first.

I believe that I can do the pairing and authentication with:

RemoteDevice rd = new RemoteDevice("<mac>");
RemoteDeviceHelper.authenticate(rd, "<pin>");


But then how do I use that "rd" object to open a (serial) connection to my bluetooth device?


Doing this afterwards:

StreamConnection conn = (StreamConnection) Connector.open("btspp://<mac>:1;authenticate=true;encrypt=true;master=false;"

returns a "connection refused" message, which is why I think I need to use the RemoteDevice object somehow.

Freddy Roberge

unread,
Mar 9, 2016, 11:45:54 PM3/9/16
to bluecove-developers
Hello !
I have exactly the same problem.
I have succeeded in scanning bluetooth peripherals. I have retrieved also the service url like you did : btspp://<mac>:1;authenticate=true;encrypt=false;master=false

I Finally have a "connection refused" message (111).

If anyone has an idea... because I have no idea anymore.

Freddy
Reply all
Reply to author
Forward
0 new messages