Skip to content

Commit

Permalink
correct examples, address API's removed, call start after bind
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepmistry committed Aug 7, 2015
1 parent 4ad60a1 commit 74d2c1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 2 additions & 4 deletions examples/le-advertisement-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,10 @@ function setAdvertiseEnable(enabled) {
bluetoothHciSocket.write(cmd);
}

bluetoothHciSocket.start();
setFilter();
bluetoothHciSocket.bindRaw();
setFilter();
bluetoothHciSocket.start();

console.log('address = ' + bluetoothHciSocket.getAddress());
console.log('address type = ' + bluetoothHciSocket.getAddressType());
console.log('isDevUp = ' + bluetoothHciSocket.isDevUp());

setAdvertiseEnable(false);
Expand Down
5 changes: 2 additions & 3 deletions examples/le-connection-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ function setFilter() {
bluetoothHciSocket.setFilter(filter);
}


bluetoothHciSocket.start();
setFilter();
bluetoothHciSocket.bindRaw();
setFilter();
bluetoothHciSocket.start();

function createConnection(address, addressType) {
var cmd = new Buffer(29);
Expand Down
4 changes: 2 additions & 2 deletions examples/le-scan-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ function setScanEnable(enabled, duplicates) {
bluetoothHciSocket.write(cmd);
}

bluetoothHciSocket.start();
setFilter();
bluetoothHciSocket.bindRaw();
setFilter();
bluetoothHciSocket.start();

setScanEnable(false, true);

Expand Down

0 comments on commit 74d2c1c

Please sign in to comment.