Skip to content
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

@ionic-native/ble 5.28.0 breaks BLE notifications w/ cordova-ble-central #3511

Closed
markamccorkle opened this issue Aug 15, 2020 · 2 comments
Closed

Comments

@markamccorkle
Copy link

I'm submitting a ... (check one with "x")
[ ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/

Current behavior:

As soon as you upgrade to 5.28.0 you will only see 2 values in your BLE notification response.
Works as expected on 5.27.0

Expected behavior:

A full notification containing all expected data

Steps to reproduce:

Related code:
npm I @ionic-native/ble@5.28.0
Setup cordova-ble-central

insert any relevant code here

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here

Ionic:

Ionic CLI : 6.11.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.3.1
@angular-devkit/build-angular : 0.900.7
@angular-devkit/schematics : 9.1.12
@angular/cli : 9.1.12
@ionic/angular-toolkit : 2.3.0

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0, ios 6.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 25 other plugins)

Utility:

cordova-res : 0.15.1
native-run : 1.0.0

System:

ios-deploy : 1.11.0
ios-sim : 8.0.2
NodeJS : v14.7.0 (/usr/local/Cellar/node/14.7.0/bin/node)
npm : 6.14.7
OS : macOS Big Sur
Xcode : Xcode 12.0 Build version 12A8179i

@CodeTroopers
Copy link
Contributor

You should read this. There is a breaking change. Now data are at index 0 of returned array.

@markamccorkle
Copy link
Author

You should read this. There is a breaking change. Now data are at index 0 of returned array.

Thank you for pointing that out. I can confirm that does indeed work.
Can you point me to where the docs reflect the breaking change? I don't see any references to that change anywhere.
https://ionicframework.com/docs/native/ble

Also, the Readme for this project mentions nothing about index 0 containing all data now. The data being passed back is indeed, not raw ArrayBuffer data as the docs state.

Function startNotification registers a callback that is called every time the value of a characteristic changes. This method handles both notifications and indications. The success callback is called multiple times.

Raw data is passed from native code to the success callback as an ArrayBuffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants