Hang up at await BleManager.retrieveServices()
See original GitHub issueVersion
react-native-ble-manager v ^6.4.0 react-native v 0.55.4 iOS/Android v 10.3/8.0
Actual behaviour
Hang up at ### await BleManager.retrieveServices() after connected successful.
async function connectAndPrepare(peripheral, data_wr)
{
// Before startNotification you need to call retrieveServices
await BleManager.retrieveServices(peripheral.id).then((peripheralInfo) => {
console.log("retrieveServices",peripheralInfo);
});
// To enable BleManagerDidUpdateValueForCharacteristic listener
await BleManager.startNotification(peripheral.id, service, characteristic).then(() => {
console.log('Started notification on ' + peripheral.id);
});
await BleManager.write(peripheral.id, service, characteristic, data_wr).then(() => {
console.log('Write to peripheral');
});
}
Stop without any error log… Any idea?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
JavaScript react-native-ble-manager retrieveServices Examples
These are the top rated real world JavaScript examples of react-native-ble-manager.retrieveServices extracted from open source projects.
Read more >How to use the react-native-ble-manager ... - Snyk
To help you get started, we've selected a few react-native-ble-manager examples, based on popular ways it is used in public projects.
Read more >React Native BLE Manager (Android) status code 14 on write ...
I'm using the react native ble manager package to build a react ... retrieveServices(peripheralID) } catch (error) { reject() } if (this.
Read more >react-native-ble-manager - npm
Start the notification on the specified characteristic, you need to call retrieveServices method before. Returns a Promise object. Arguments.
Read more >React-native-ble-manager - npm.io
Start the notification on the specified characteristic, you need to call retrieveServices method before. Returns a Promise object. Arguments. peripheralId - ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t know if you can use ‘await’ and ‘then’ in an async function.
rewrite that as
so then at least you get errors when something goes wrong