summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXudong Zheng <7pkvm5aw@slicealias.com>2020-11-10 23:02:31 -0500
committerPete Johanson <peter@peterjohanson.com>2020-11-11 13:16:31 -0500
commit51ca4fbc1842d8727db7074b465249ffdbfc4809 (patch)
treeb5f6ff5f2d3fd3283bdbc6fb79a3ca0b7db6f0ed
parent91e3a7d75a961db68aa8bbc7a8836695748b961e (diff)
Fix connection to incorrect peripheral
-rw-r--r--app/src/split/bluetooth/central.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c
index ed52ba0..2d4d1ed 100644
--- a/app/src/split/bluetooth/central.c
+++ b/app/src/split/bluetooth/central.c
@@ -187,19 +187,19 @@ static bool split_central_eir_found(struct bt_data *data, void *user_data) {
for (i = 0; i < data->data_len; i += 16) {
struct bt_le_conn_param *param;
- struct bt_uuid uuid;
+ struct bt_uuid_128 uuid;
int err;
- if (!bt_uuid_create(&uuid, &data->data[i], 16)) {
+ if (!bt_uuid_create(&uuid.uuid, &data->data[i], 16)) {
LOG_ERR("Unable to load UUID");
continue;
}
- if (!bt_uuid_cmp(&uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID))) {
+ if (bt_uuid_cmp(&uuid.uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID))) {
char uuid_str[BT_UUID_STR_LEN];
char service_uuid_str[BT_UUID_STR_LEN];
- bt_uuid_to_str(&uuid, uuid_str, sizeof(uuid_str));
+ bt_uuid_to_str(&uuid.uuid, uuid_str, sizeof(uuid_str));
bt_uuid_to_str(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID), service_uuid_str,
sizeof(service_uuid_str));
LOG_DBG("UUID %s does not match split UUID: %s", log_strdup(uuid_str),