You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my use case I want to get the current mode of a connection, to be able to display it (from the client side, but could also be from the server side). I also want to be able to change the mode after connection.
I've added functions to NimbleClient and NimbleServer to do that as follows (based on existing functions):
getLePhy - calls ble_gap_read_le_phy in ble_gap
setLePhy - calls ble_gap_set_prefered_le_phy in ble_gap
The functions work and I can get and set modes. Unfortunately when getting the modes for coded PHY, the BLE spec states to return just that it is coded, and not the actual mode (S2 or S8). The mode appears to be available in the low level connection data, but I can't work out how to get to that.
I can see HCI code that gets the PHY (ble_ll_conn_hci_le_rd_phy) and could cheat and return the mode in the top 4 bits alongside the phy, but my board (Adafruit Feather esp32-s3) provides precompiled bt libs so I would have to edit that source and recompile those libs.
Is there another way to get the actual mode?
Mark.
The text was updated successfully, but these errors were encountered:
I might actually set it to S2, it's a shame I can't prove that that's what it's set to at any point in the future (obviously I get a success code when I set it).
Hi,
For my use case I want to get the current mode of a connection, to be able to display it (from the client side, but could also be from the server side). I also want to be able to change the mode after connection.
I've added functions to NimbleClient and NimbleServer to do that as follows (based on existing functions):
The functions work and I can get and set modes. Unfortunately when getting the modes for coded PHY, the BLE spec states to return just that it is coded, and not the actual mode (S2 or S8). The mode appears to be available in the low level connection data, but I can't work out how to get to that.
I can see HCI code that gets the PHY (ble_ll_conn_hci_le_rd_phy) and could cheat and return the mode in the top 4 bits alongside the phy, but my board (Adafruit Feather esp32-s3) provides precompiled bt libs so I would have to edit that source and recompile those libs.
Is there another way to get the actual mode?
Mark.
The text was updated successfully, but these errors were encountered: