Ranging CS data from multiple connections

Hi,

I succeeded in implementing Channel sounding for multiple devices (based on previous samples). But now there is a little difference in how the data gets collected (buffer) and how the range estimation gets computed (somewhere outside the files).

As you can see, the connections and scanning works already fine when i re-implement my code for reconnecting sequentially with the devices. But the data doesn't get updated correctly:

I think i should change some things in data collected / range data collect (the first 6 functions, which are new from the new sample)

Kind regards,

Nick De Leenheer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
/** @file
* @brief Channel Sounding Initiator with Ranging Requestor sample
*/
#include <math.h>
#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <zephyr/sys/reboot.h>
#include <zephyr/bluetooth/cs.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/conn.h>
#include <bluetooth/scan.h>
#include <bluetooth/services/ras.h>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX