Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions nrf-softdevice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ ble-l2cap-credit-workaround = []
evt-max-size-256 = []
evt-max-size-512 = []

# Support more discovery characteristics in GATT clients,
# may be needed with higher ATT_MTU and peripherals with
# many service characteristics
discovery-chars-12 = []

[dependencies]
defmt = { version = "0.3", optional = true }
log = { version = "0.4.11", optional = true }
Expand Down
4 changes: 4 additions & 0 deletions nrf-softdevice/src/ble/gatt_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ impl From<RawError> for DiscoverError {
}
}

#[cfg(not(feature = "discovery-chars-12"))]
const DISC_CHARS_MAX: usize = 6;
#[cfg(feature = "discovery-chars-12")]
const DISC_CHARS_MAX: usize = 12;

const DISC_DESCS_MAX: usize = 6;

pub(crate) async fn discover_service(conn: &Connection, uuid: Uuid) -> Result<raw::ble_gattc_service_t, DiscoverError> {
Expand Down