Skip to content

Commit

Permalink
Use correct UUIDs when connecting
Browse files Browse the repository at this point in the history
  • Loading branch information
luccasr73 committed Apr 20, 2018
1 parent 0170dfa commit 0210bcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/android/com/megster/cordova/BluetoothSerialService.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,11 @@ public ConnectThread(BluetoothDevice device, boolean secure) {
// Get a BluetoothSocket for a connection with the given BluetoothDevice
try {
if (secure) {
// tmp = device.createRfcommSocketToServiceRecord(MY_UUID_SECURE);
tmp = device.createRfcommSocketToServiceRecord(UUID_SPP);
tmp = device.createRfcommSocketToServiceRecord(MY_UUID_SECURE);
//tmp = device.createRfcommSocketToServiceRecord(UUID_SPP);
} else {
//tmp = device.createInsecureRfcommSocketToServiceRecord(MY_UUID_INSECURE);
tmp = device.createInsecureRfcommSocketToServiceRecord(UUID_SPP);
tmp = device.createInsecureRfcommSocketToServiceRecord(MY_UUID_INSECURE);
//tmp = device.createInsecureRfcommSocketToServiceRecord(UUID_SPP);
}
} catch (IOException e) {
Log.e(TAG, "Socket Type: " + mSocketType + "create() failed", e);
Expand Down

0 comments on commit 0210bcb

Please sign in to comment.