Skip to content
This repository was archived by the owner on Mar 3, 2024. It is now read-only.

Commit 15e5065

Browse files
committed
Requiring faster scans on the example.
1 parent 16d11db commit 15e5065

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

example/app/Entry.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,20 @@ class Entry extends Component {
139139

140140
start() {
141141
console.log(this.state.uuid, "Starting Advertising");
142-
// Manuf Data [1,0,0,0] picks up iPhones
142+
// Manuf Data [1,0] picks up iPhones
143143
BLEAdvertiser.broadcast(this.state.uuid, [1,0], {
144-
advertiseMode: BLEAdvertiser.ADVERTISE_MODE_LOW_POWER,
145-
txPowerLevel: BLEAdvertiser.ADVERTISE_TX_POWER_ULTRA_LOW,
144+
advertiseMode: BLEAdvertiser.ADVERTISE_MODE_BALANCED,
145+
txPowerLevel: BLEAdvertiser.ADVERTISE_TX_POWER_MEDIUM,
146146
connectable: false,
147147
includeDeviceName: false, includeTxPowerLevel: false })
148148
.then(sucess => console.log(this.state.uuid, "Adv Successful", sucess))
149149
.catch(error => console.log(this.state.uuid, "Adv Error", error));
150150

151151
console.log(this.state.uuid, "Starting Scanner");
152-
// Manuf Data [1,0,0,0] picks up iPhones
153-
BLEAdvertiser.scan([1,0], {scanMode: BLEAdvertiser.SCAN_MODE_LOW_POWER})
154-
.then((sucess) => {
155-
console.log(this.state.uuid, "Scan Successful", sucess);
156-
}).catch(error => {
157-
console.log(this.state.uuid, "Scan Error", error);
158-
});
152+
// Manuf Data [1,0] picks up iPhones
153+
BLEAdvertiser.scan([1,0], {scanMode: BLEAdvertiser.SCAN_MODE_LOW_LATENCY})
154+
.then(sucess => console.log(this.state.uuid, "Scan Successful", sucess))
155+
.catch(error => console.log(this.state.uuid, "Scan Error", error));
159156

160157
this.setState({
161158
isLogging: true,

0 commit comments

Comments
 (0)