!dASuPAbUCerhCYFqJs:matrix.org

nRF Rust

255 Members
Discussion medium for the nRF-rs organization on Github27 Servers

Load older messages


SenderMessageTime
23 May 2024
@lulf_:matrix.orglulfTo notify the central, you can use fooservice_barfield.notify(conn_handle, data);09:38:34
@lulf_:matrix.orglulfhowever, you should only do that if the central has enabled notifications09:38:48
@bsun:matrix.orgBenn right, but that implies that i've globally stored the current Connection and also references to the Services. Is that intended? that feels like way more global state hanging around than there needs to be. 13:47:02
@lulf_:matrix.orglulfyou need a global ref to the service, the connection you can clone and pass around15:21:08
@lulf_:matrix.orglulfI 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
@bsun:matrix.orgBennthanks15:33:02
@bsun:matrix.orgBennI see you're using the proc macros on the services. Is there any documentation about those?15:46:22
@lulf_:matrix.orglulfNot other than the examples that I'm aware of :/16:06:28
@bsun:matrix.orgBennthis 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 working17:44:30
@dirbaio:matrix.orgdirbaiodisconnect isn't optional17:53:39
@dirbaio:matrix.orgdirbaioif you're connected to a bluetooth device, you can always disconnect17:53:45
@bsun:matrix.orgBennhmm, its not showing up for me. i can only forget it17:54:54
@bsun:matrix.orgBenni assumed there was some attr you had to set17:55:05
@dirbaio:matrix.orgdirbaiothat probably means you're not connected at this moment, just paired/bonded?17:57:29
@dirbaio:matrix.orgdirbaioor maybe for bonded devices the OS manages connect/disconnect for you automatically, not sure17:58:03
@bsun:matrix.orgBennno its currently connected and receiving data17:59:18
@bsun:matrix.orgBenn 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
@bsun:matrix.orgBennI’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 called19:29:37
24 May 2024
@bsun:matrix.orgBenn 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:matrix.orgdirbaio It's a shared reference, you can just copy it  19:46:48
@bsun:matrix.orgBennhmm 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 it19:53:45
25 May 2024
@bsun:matrix.orgBennIs 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 attrs01:44:02
12 Jun 2024
@bsun:matrix.orgBennUpdate 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) appropriately20:41:54
@bsun:matrix.orgBennI 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
@bsun:matrix.orgBenni'm doing something wrong in the flow and i cant figure out what20:44:42
16 Jun 2024
@farooqkz:mozilla.orgFarooq [MR. Potato] changed their display name from Farooq to Farooq [GMT+3:30].19:33:19
17 Jun 2024
@farooqkz:mozilla.orgFarooq [MR. Potato] changed their display name from Farooq [GMT+3:30] to Farooq [Potato].12:46:07
@diondokter:matrix.orgdiondokter

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:matrix.orgdirbaiooops14:34:38
@dirbaio:matrix.orgdirbaio

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

Show newer messages


Back to Room ListRoom Version: 4