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
nRF5x: add BluetoothRemoteGATTCharacteristic.startNotifications #959
Comments
Would really like this feature and thought about trying to contribute myself. PS: Already found my way to libs/bluetooth/jswrap_bluetooth.c for starters... ;-) |
Thanks! The gotcha is that I believe you need to know the handle of the Characteristic's descriptor ( Hope that's some help! To be honest once there some code to add a |
Saw your code from commit f7d4946 and spent some time to dig deeper. For a) the OT: Oh my, this is really complex stuff. Never would have thought that. Chapeau for doing all this with that much speed, precision and enthusiasm. |
Thanks - actually that's a really good point - there's not much reason to do it during discovery since it won't get used most of the time and it'll slow down characteristic discovery for everything. Best to do it when We could have a task I'll have a look at doing that - it should make it lot easier as the discovery would be a bit of a nightmare to add it to. And thanks! I guess it's shows it's working if most people aren't aware how much work has to go on underneath to make it 'just work' :) |
Sorry for the delay. I have spent a hour here and there to look into this and may be somewhere at 80% of a possible solution. Have my NRF52 DK up and running also to have faster test cycles. One issue still: In That's where I am stuck currently. Maybe you could give me a hint to the right direction? |
I have managed to put something together, but it does not seem to work yet: Some things may be hacky:
This is the code I use for testing:
It runs on a Puck as a test probe. When running the new code on a NRF52-DK board it finds the Puck and everything including the cccd-handle but there is no notification:
|
Thanks! I'm a bit busy catching up for the start of this week, but I'll try and look into this properly later on. It looks good though - only thing is instead of |
Thanks for the feedback. It works as before: Could someone give me a brief hint how to get into debugging with the NRF52-DK board? |
Hi, Sorry it's taken a while to look into this... I tried the following, but got
I'm looking into this now though - it's looking really promising. wrt debugging: I can't be much help - you can use GDB directly and there's a JLink GDB server. It's not 'fun' though :) |
Thanks for checking. Have a look at
I was not sure about that. Maybe we'd have to scan the whole handle range but you would need the service (not characteristic) to get that... Sorry I did not spend more time - have some home improvement project going on currently also (bathroom renovations). About debugging: What about simple outputs to the console? |
Wow, don't apologise - what you've done has been a huge help. I didn't even reply to you for a week :) And I know about how much time home improvement stuff can take... I think the handle should be However then there were other bugs in my code ;) I just got it working - I'll post up in a few minutes and you can see what I've done :)
Ahh, yes - I add I also tend to use the JS a lot - using |
Great. Just compiled + tested and it works! One thing: But actually great that it's working now. I can't believe it... :) |
Well, as usual with these things it was a few problems all at once. For debugging BLE stuff I also uncomment a Good point about readValue - I'm trying to implement it to be like the Web Bluetooth spec, so I've just filed a bug for this: #1091 edit: I should probably just add a DataView. It doesn't look that hard and it'd be a bit more spec compliant. |
Hi @gfwilliams, I'm starting out to implement a relay -- connect to a peripheral, receive notifications and data and act as a peripheral (simultaneously) to relay that data. I'll be testing the whole thing on an nRF52832 dev board (PCA10040). Thanks! |
Hi. You should be able to flash the nrf52832 hex files from here: http://www.espruino.com/binaries/travis/master/ The usage is just as it is with Web Bluetooth. However obviously I can't afford to actively support you if you hit problems on the nrf52832dk |
Thanks Gordon! Support issues totally understood; I have already downloaded that and installed it and it works just fine. Since it is designed to run on the puck-js, I would expect that.
I’m also running it on the u-blox NINA-B1 module (another 52832-based product). Just lacking the documentation to give it a try, so I’ll take a look. Do you have a good reference for Web Bluetooth?
Bill
…--
Bill Saltzstein
Code Blue Communications, Inc.
billsalt@consultcodeblue.com
www.consultcodeblue.com
http://www.linkedin.com/in/billsaltzstein (LinkedIn)
+1 425-442-5854
Skype: billsaltz
On Mar 22, 2017, at 1:30 AM, Gordon Williams ***@***.***> wrote:
Hi. You should be able to flash the nrf52832 hex files from here: http://www.espruino.com/binaries/travis/master/ <http://www.espruino.com/binaries/travis/master/>
The usage is just as it is with Web Bluetooth.
However obviously I can't afford to actively support you if you hit problems on the nrf52832dk
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#959 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABXIyQAHj6Ivm3vrnBZ2ZRd3MvRCpcbhks5roNwegaJpZM4KgPm_>.
|
Realistically this is it: https://webbluetoothcg.github.io/web-bluetooth/ Or use |
Currently we can only read and write, but notifications are needed to handle stuff like the Nordic UART nicely
The text was updated successfully, but these errors were encountered: