Comments (4)
You can directly connect on Coded PHY if you set the peripheral to advertise on Coded, and the central to scan on Coded. The established connection "inherits" the phy from the advertisement.
I'm not sure about 2M. If it's possible to advertise on 2M, you can probably do the same. If not, then I'd say the way to go is to change the PHY after connecting...?
from nrf-softdevice.
So according to ble_gap_scan_params_t::scan_phys
when you include the 2M PHY it will still use the 1M PHY for the primary advertisements and use the 2M PHY only if the primary advertisement packet indicates an extended advertisement using that PHY on one of the data channels. Also using 2M as primary_phy
is not allowed according to ble_gap_adv_params_t::primary_phy
.
I also realise now I got mixed up in the ble::peripheral::Config
and the ble::central::ScanConfig
. While the former has primary_phy: Phy
and secondary_phy: Phy
, the latter only has phys: PhySet
.
In that case it would probably be appropriate to just call sd_ble_gap_phy_update
after the connection is established, at least if phys
includes the 2M PHY. What do you think?
I will prepare a pull request!
from nrf-softdevice.
I had always thought that you can't advertise on the primary channel using 2M. But I'll concede that I have never looked this up in the spec.
From NovelBits: https://novelbits.io/bluetooth-5-speed-maximum-throughput/
Bluetooth 5 speed: 2x speed utilizing the new 2M PHY
It is useful to understand the limitations of using the new LE 2M PHY in Bluetooth 5:
Cannot be used to transmit the primary advertisements (on the primary channels).
Can be used for the secondary “auxiliary packets” sent on the same channels as the data packets (37 channels: 0-36).
To learn more about primary and secondary advertisements, refer to my previous blog post: [Bluetooth 5 Advertisements: Everything you need to know](http://www.novelbits.io/bluetooth-5-advertisements/).
LE 1M is mandatory, whereas LE 2M is optional. So, not all chipsets claiming Bluetooth 5 support can necessarily handle the higher throughput.
Advertisements and discovery can occur on the LE 1M PHY, and then connections occur on the secondary advertisement channel using the LE 2M PHY
from nrf-softdevice.
Implemented in #203.
from nrf-softdevice.
Related Issues (20)
- Use PHY Coded as Primary PHY for advertisement HOT 1
- Connecting to an incorrect Mac address causes a "hang" due to underlying NRF_ERROR_NOT_FOUND HOT 1
- L2CAP Channel API Design Flaws HOT 1
- Switch examples to use default `gatts_attr_tab_size` ? HOT 1
- Add descriptor to a characteristic HOT 2
- NRF52832/S132 Freezes Upon Connection HOT 3
- There is currently no way to disable the SoftDevice HOT 2
- Softdevice peripheral clash with RNG peripheral HOT 3
- Implement `NorFlash` for `Flash` HOT 2
- Debugging HOT 1
- Store and load bond info using `nrf_softdevice::Flash` HOT 13
- Softdevice.run_with_callback never calls the callback HOT 1
- Improve defmt trace HOT 1
- 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?
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.