-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get characteristics list of a service #54
Comments
It is solved by setting minSdkVersion to 21 for Android. |
Cool that you found a solution! Here the solution was to search for specific characteristics by supplying the uuid. |
@nielsswinkels I'm having the same issue even though the minSdkVersion is set to 21. I have it like this: ....
this._rfduinoService.once("characteristicsDiscover", (characteristics) => {
console.log("here: ", characteristics);
if (this.options.verbose) console.log('Discovered ' + characteristics.length + ' service characteristics');
for (let i = 0; i < characteristics.length; i++) {
// console.log(characteristics[i].uuid);
if (characteristics[i].uuid === k.RFduinoUuidReceive || characteristics[i].uuid === rfduinoUuidReceiveLong) {
if (this.options.verbose) console.log("Found receiveCharacteristicUUID");
this._receiveCharacteristic = characteristics[i];
}
if (characteristics[i].uuid === k.RFduinoUuidSend || characteristics[i].uuid === rfduinoUuidSendLong) {
if (this.options.verbose) console.log("Found sendCharacteristicUUID");
this._sendCharacteristic = characteristics[i];
}
}
.... Where @jacobrosenthal any ideas? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to get all characteristics list of a service. Every time I get empty characteristics array. I have used following ways to get characteristics list:
`service.discoverCharacteristics(null, function(error, characteristics) {
service.once('characteristicsDiscover', (characteristics)=>{ }); service.discoverCharacteristics();
Both of these approaches do not work.
The text was updated successfully, but these errors were encountered: