Hi there,
So I loaded up both codes with two devices , appears to work.
When I use Nrf-Connect for DT and the Dongle, I’m able to connect to it and turn on notify
and switch the conn params to 2M_PHY and it echo’s that to serial port… MAN the DATA comes FLYING in… Have a LOOK then at the counter and serial output, it almost chokes the Windows side with dongle but it does keep up.
I changed the params for connection and looked at the serial output on the xiao.
Testing R G B LED - RED, GREEN, BLUE...
Testing R G B LED - RED, End of BLUETOOTH initialization
Connecting to Central ................
.................................................................[BLE ] BLE_GAP_EVT_CONNECTED : Conn Handle = 0
[GAP ] MAC = C8:65:29:7E:60:0C, Type = 1, Resolved = 0
[GAP ] Conn Interval = 7.50 ms, Latency = 0, Supervisor Timeout = 4000 ms
【connect_callback】 conn_Handle : 0
Connected to Central
[BLE ] BLE_GATTC_EVT_EXCHANGE_MTU_RSP : Conn Handle = 0
[GAP ] ATT MTU is changed to 247
PHY ----------> 1
Data length --> 27
MTU ----------> 247
Interval -----> 6
[BLE ] BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP : Conn Handle = 0
【connect_callback】 Connected to nRF5x
[BLE ] BLE_GATTS_EVT_SYS_ATTR_MISSING : Conn Handle = 0
Sensor Setup Started.
Pressure Sensor...
Pressure setup okay.
PPG...
Could not communicate with the sensor!
Configuring Sensor....
Error configuring sensor.
Error: 255
Accelerometer...
Accelerometer okay!
Sensor Setup Ended
BSP Library : 1.1.8
Bootloader : s140 7.3.0
Serial No : B3F98A0809BF2DCA
--------- SoftDevice Config ---------
Max UUID128 : 15
ATTR Table Size : 4096
Service Changed : 1
Peripheral Connect Setting
- Max MTU : 247
- Event Length : 100
- HVN Queue Size : 3
- WrCmd Queue Size: 1
--------- BLE Settings ---------
Name : XIAO nRF52840 Sense
Max Connections : Peripheral = 1, Central = 0
Address : C0:E3:88:19:09:4E (Static)
TX Power : 0 dBm
Conn Intervals : min = 20.00 ms, max = 30.00 ms
Conn Timeout : 2000 ms
Peripheral Paired Devices:
Failed to send notification
Failed to send notification
Failed to send notification
[BLE ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's cccd = 0x0001
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
[BLE ] BLE_GATTS_EVT_HVN_TX_COMPLETE : Conn Handle = 0
[CHR ] Notify 2 bytes
Sensors Values Sent
I would adjust the params on the Desktop setup change them on the fly, You should see the difference. The Supervisory time out also once the 2PHY is connected should be lowered and you may need to also adjust on the Central as well Once you shift to FAST mode.
HTH
GL PJ
Great example of why having the $9 dongle to test with and NRF_connect for Desktops.