Closed jlpettersson closed 9 months ago
coded must use extended advertising. this works for me:
let config = peripheral::Config {
primary_phy: Phy::Coded,
secondary_phy: Phy::Coded,
tx_power: TxPower::Plus8dBm,
interval: 1600, // 1s
timeout: None,
max_events: Some(1),
filter_policy: peripheral::FilterPolicy::Any,
};
let data = peripheral::ConnectableAdvertisement::ExtendedNonscannableUndirected {
adv_data: &adv_data,
set_id: 0,
};
match peripheral::advertise_connectable(sd, data, config).await { ... }
I use softdevice 140 on nrf52840. I want to use Coded PHY as Primary PHY during Advertisement.
I configured it and used it like this:
but I get this error when flushing to the device:
According to the documentation Coded PHY should be supported as Primary PHY for advertisement.
I tried to dig into the code at https://github.com/embassy-rs/nrf-softdevice/blob/master/nrf-softdevice-s140/src/bindings.rs#L6073 but it just seem to be some wrapped assembly? I don't understand how this error is thrown or how it can be fixed.
Is there some knowledge around this?