nRF 52840 express pairing
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- natebc
- Posts: 8
- Joined: Wed May 12, 2021 2:21 pm
nRF 52840 express pairing
Hi, I've been looking at the example sketches for paring using the express as a central to connect to a peripheral. In the example, it connects to a device that is advertising the BLEUart service. Can I only connect to devices that are advertising the BLEUart service? Would it be possible to pair to a tile like device similar to how my phone would pair to one?
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: nRF 52840 express pairing
The Arduino library comes with a folder of example sketches, one of which configures the nRF52840 as a central device:
https://github.com/adafruit/Adafruit_nR ... b/examples
https://github.com/adafruit/Adafruit_nR ... b/examples
No, there's no limit on peripherals it can see. Pairing is the same for all BLE peripherals.natebc wrote:Can I only connect to devices that are advertising the BLEUart service?
- natebc
- Posts: 8
- Joined: Wed May 12, 2021 2:21 pm
Re: nRF 52840 express pairing
Thank you, I just wanted to make sure there was no limitation. It appears my peripheral device is Bluetooth 4.2 and it seems like I can pair as long as I'm not using any of the Bluetooth 5 features (2x range, 4x speed, LE advertising extension). I can get the Itsy to connect to the peripheral but I can't get past the conn->requestPairing(); The peripheral ends up disconnecting from the Itsy after some time. I'm trying to see if I can change the settings of the central to make sure it's not using any of the Bluetooth 5 features but I'm not seeing anything in the library that indicates how to do that quite yet.
But maybe it is already set to the correct PHY "_phy = BLE_GAP_PHY_1MBPS; "
But maybe it is already set to the correct PHY "_phy = BLE_GAP_PHY_1MBPS; "
Code: Select all
BLEConnection::BLEConnection(uint16_t conn_hdl, ble_gap_evt_connected_t const* evt_connected, uint8_t hvn_qsize, uint8_t wrcmd_qsize)
{
_conn_hdl = conn_hdl;
_connected = true;
_mtu = BLE_GATT_ATT_MTU_DEFAULT;
_data_length = BLE_GATT_ATT_MTU_DEFAULT + 4; // 27
_phy = BLE_GAP_PHY_1MBPS;
_conn_interval = evt_connected->conn_params.max_conn_interval;
_slave_latency = evt_connected->conn_params.slave_latency;
_sup_timeout = evt_connected->conn_params.conn_sup_timeout;
_peer_addr = evt_connected->peer_addr;
_role = evt_connected->role;
_hvn_sem = xSemaphoreCreateCounting(hvn_qsize, hvn_qsize);
_wrcmd_sem = xSemaphoreCreateCounting(wrcmd_qsize, wrcmd_qsize);
_sec_mode.sm = _sec_mode.lv = 1; // default to open
_bonded = false;
_hvc_sem = NULL;
_hvc_received = false;
_ediv = 0xFFFF;
}
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: nRF 52840 express pairing
As far as I know, the nRF52840 predates BT-5.0, so there's nothing to disable. It doesn't know the additional features exist.
- natebc
- Posts: 8
- Joined: Wed May 12, 2021 2:21 pm
Re: nRF 52840 express pairing
https://www.nordicsemi.com/Products/Low ... s/nRF52840
Maybe i'm misunderstanding
"The nRF52840 is fully multiprotocol capable with full protocol concurrency. It has protocol support for Bluetooth 5, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks."
Maybe i'm misunderstanding
"The nRF52840 is fully multiprotocol capable with full protocol concurrency. It has protocol support for Bluetooth 5, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks."
- natebc
- Posts: 8
- Joined: Wed May 12, 2021 2:21 pm
Re: nRF 52840 express pairing
I should also say this is a non-Nordic device. https://www.amazon.com/dp/B07WWSZRVL?ps ... ct_details
from what I can tell, I'll need to use some sort of BLE sniffer to monitor how this makes a successful connection to my phone and try to emulate that.
from what I can tell, I'll need to use some sort of BLE sniffer to monitor how this makes a successful connection to my phone and try to emulate that.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: nRF 52840 express pairing
Hmm.. either they updated the description, or I’m getting my history wrong. IIRC, BT-5 was still a work in progress when we started carrying the nRF52840. I’ll have to read the current dox to see where things stand now.natebc wrote:The nRF52840 is fully multiprotocol capable with full protocol concurrency. It has protocol support for Bluetooth 5, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks."
A strong third option is marketing-speak. The BT Working Group is notoriously loose about its definitions.. ‘High Speed Bluetooth’ is really WiFi whose connection is negotiated with a BT transaction.
Yeah, that’s a good idea. There’s plenty of room for variation.natebc wrote:from what I can tell, I'll need to use some sort of BLE sniffer to monitor how this makes a successful connection to my phone and try to emulate that.
We do have a couple of BLE sniffers if you’re interested:
https://www.adafruit.com/?q=ble+sniffer&sort=BestMatch
and the tutorial explains the limits and capabilities:
https://learn.adafruit.com/introducing- ... le-sniffer
Please be positive and constructive with your questions and comments.