23 May 2024 |
lulf | To notify the central, you can use fooservice_barfield.notify(conn_handle, data); | 09:38:34 |
lulf | however, you should only do that if the central has enabled notifications | 09:38:48 |
Benn | right, but that implies that i've globally stored the current Connection and also references to the Service s. Is that intended? that feels like way more global state hanging around than there needs to be. | 13:47:02 |
lulf | you need a global ref to the service, the connection you can clone and pass around | 15:21:08 |
lulf | I have a more complex example here showing how I structure things https://github.com/lulf/watchful/blob/main/firmware/app/src/ble.rs | 15:30:10 |
Benn | thanks | 15:33:02 |
Benn | I see you're using the proc macros on the services. Is there any documentation about those? | 15:46:22 |
lulf | Not other than the examples that I'm aware of :/ | 16:06:28 |
Benn | this might be a more generic bluetooth question, but how do you signal to a central device from a peripheral that you can send a disconnect? I assume that's how a "Disconnect" button shows up on, for instance, the iphone bluetooth settings page. I've already got pairing/bonding set up and working | 17:44:30 |
dirbaio | disconnect isn't optional | 17:53:39 |
dirbaio | if you're connected to a bluetooth device, you can always disconnect | 17:53:45 |
Benn | hmm, its not showing up for me. i can only forget it | 17:54:54 |
Benn | i assumed there was some attr you had to set | 17:55:05 |
dirbaio | that probably means you're not connected at this moment, just paired/bonded? | 17:57:29 |
dirbaio | or maybe for bonded devices the OS manages connect/disconnect for you automatically, not sure | 17:58:03 |
Benn | no its currently connected and receiving data | 17:59:18 |
Benn | Neither windows 11 or iPhone show a disconnect, only a “forget” option. That’s not really the end of the world though, my problem now is windows does something weird when reconnecting a saved bond, where the peripheral will fail to send key reports because of the gatt server not thinking it has the correct capabilities. It works on a fresh connection, and iOS has no issues on a fresh connection or a reconnect. Whee Bluetooth | 19:28:33 |
Benn | I’m guessing it’s some combo of SecurityHandler load_sys_attrs and save_sys_attrs not getting called appropriately but I can’t tell how they’re supposed to be called | 19:29:37 |
24 May 2024 |
Benn | whats the proper way to share a Softdevice ? I want to be able to call gatt_server::set_value/::get_value from elsewhere, but it needs a reference to a Softdevice | 19:12:03 |
dirbaio | It's a shared reference, you can just copy it | 19:46:48 |
Benn | hmm i was getting errors because other stuff wanted it mutably, so the borrow checker was getting mad. I'll see if i can restructure around it | 19:53:45 |
25 May 2024 |
Benn | Is the SecurityHandler flow documented anywhere? I’ve found it’s not just windows that is broken in certain reconnect circumstances, iOS is too. The code from the bond example doesn’t seem to properly save/restore sys attrs | 01:44:02 |
12 Jun 2024 |
Benn | Update on my stuff, I found the message sequence charts in the Nordic documentation, that helped me fix my windows issue and make sure i'm interacting with the SD (more) appropriately | 20:41:54 |
Benn | I still don't have a Disconnect button on iOS and i see weird behavior on first connect/pairing to iOS, but then it works fine after a reconnect (either a reset of the device or toggling bluetooth on the phone). Is there any documentation on how iOS expects bluetooth peripherals to act? | 20:44:23 |
Benn | i'm doing something wrong in the flow and i cant figure out what | 20:44:42 |
16 Jun 2024 |
| Farooq [MR. Potato] changed their display name from Farooq to Farooq [GMT+3:30]. | 19:33:19 |
17 Jun 2024 |
| Farooq [MR. Potato] changed their display name from Farooq [GMT+3:30] to Farooq [Potato]. | 12:46:07 |
diondokter | Hi all, would love it if anybody could review this: https://github.com/nrf-rs/nrfxlib/pull/29
It's quite an important fix. I've changed it in nrf-modem too.
So also heads-up for nrf-modem users, it's update time!
| 14:34:00 |
dirbaio | oops | 14:34:38 |
dirbaio |
Originally this seems to have not been required, but this changed +-4 years ago without documentation update from Nordic.
haha you can feel the saltyness in that changelog
| 14:35:27 |