Comments (6)
For peripheral role (advertising): set primary_phy
and secondary_phy
to Phy::Coded in peripheral::Config
.
For central role (connecting) it's currently hardcoded. Sorry about that! :( A PR would be very welcome!
If you want maximum range, also set tx_power: TxPower::Plus8dBm
(for nrf52840 +8dbm, I think the other chips support only up to +4dbm?)
from nrf-softdevice.
WARN [nrf_softdevice::ble::peripheral] sd_ble_gap_adv_set_configure err NotSupported
WARN [nrf_softdevice::ble::peripheral] sd_ble_gap_adv_stop: BleInvalidAdvHandle
ERROR [btn::common::logger] panicked at 'fault_handler 1 92876 0', C:\Users\admin\.cargo\git\checkouts\nrf-softdevice-9b99539d60cc72a7\f4b2e62\nrf-softdevice\src\softdevice.rs:13:5
panic when i set peripheral::Config.primary_phy = Phy::Coded
peripheral::Config {
primary_phy: Phy::Coded,
secondary_phy: Phy::_1M,
}
from nrf-softdevice.
Coded PHY only supports extended advertisements, so you have to use ConnectableAdvertisement::ExtendedNonscannableUndirected
Aditionally I think you have to set both primary and secondary phy to Coded. The secondary phy is what the final connection will use, you probably want Coded for it. Softdevice docs say this about it:
If @ref ble_gap_adv_properties_t::type is an extended advertising type
and connectable, this is the PHY that will be used to establish a
connection and send AUX_ADV_IND packets on.
from nrf-softdevice.
The question remains, when use ConnectableAdvertisement::ExtendedNonscannableUndirected
let config = peripheral::Config {
primary_phy: Phy::Coded,
secondary_phy: Phy::Coded,
tx_power: TxPower::Minus4dBm,
timeout: None,
max_events: None,
interval: 3200, //2s
};
let adv = peripheral::ConnectableAdvertisement::ExtendedNonscannableUndirected { adv_data: data };
let conn = (peripheral::advertise(sd, adv, &config).await).unwrap();
maybe, Softdevice don't support Coded PHY?
from nrf-softdevice.
Coded phy is only supported on nrf52811, nrf52820, nrf52833, nrf52840, and only on softdevice S140. Are you using one of these?
from nrf-softdevice.
oh,i am using 52832.
from nrf-softdevice.
Related Issues (20)
- Could not execute process probe-run --chip nRF52840_xxAA HOT 3
- Security connection HOT 1
- Allow to open/close a BLE pairing&bonding window HOT 4
- Flash Capacity Definition Discrepancy for nRF52832 and nRF52833 Chips HOT 3
- Custom GATT service with u64 characteristic causes the application to stuck/crash in build-release mode HOT 6
- Bindgen dependency requirement?
- `InvalidState` after re-connecting HOT 8
- S340 SoftDevice support (for ANT) HOT 1
- nRF52805 example HOT 2
- Switch to nrfxlib HOT 1
- Help with compiling - missing crates HOT 10
- Error: The core is in locked up status as a result of an unrecoverable exception HOT 5
- Bonding examples not working. Device does not pair. HOT 1
- How to do fixed pin security?
- How to use channels with ble server & connection? HOT 3
- set_value & notify_value with i16 and other values? HOT 1
- Configure nrf UART with ble HOT 2
- Disable Softdevice for sleep HOT 2
- Examples for BBC micro:bit v2
- Writing 'notify_value' fast causes values to not send HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nrf-softdevice.