From dba227022cc1055994550fe78dca2259bbc47440 Mon Sep 17 00:00:00 2001 From: Martin/Geno <geno+dev@fireorbit.de> Date: Thu, 15 Aug 2019 22:59:31 +0200 Subject: [PATCH] ble: fix card10 svc uuid --- Documentation/bluetooth/card10.rst | 8 ++++---- epicardium/ble/card10.c | 15 ++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Documentation/bluetooth/card10.rst b/Documentation/bluetooth/card10.rst index 7184db4e..7835048a 100644 --- a/Documentation/bluetooth/card10.rst +++ b/Documentation/bluetooth/card10.rst @@ -13,21 +13,21 @@ The current draft uses following service specification: - Service - UUID: ``0000f000-2342-2342-2342-234223422342`` + UUID: ``42230200-2342-2342-2342-234223422342`` - light sensor characteristic: - UUID: ``0000f0f0-2342-2342-2342-234223422342`` + UUID: ``422302f0-2342-2342-2342-234223422342`` read - Vibra characteristic: - UUID: ``0000f10f-2342-2342-2342-234223422342`` + UUID: ``4223020f-2342-2342-2342-234223422342`` write - Rockets characteristic: - UUID: ``0000f110-2342-2342-2342-234223422342`` + UUID: ``42230210-2342-2342-2342-234223422342`` write light sensor characteristic diff --git a/epicardium/ble/card10.c b/epicardium/ble/card10.c index 9adfd649..1a5dc065 100644 --- a/epicardium/ble/card10.c +++ b/epicardium/ble/card10.c @@ -24,6 +24,7 @@ #define CARD10_UUID_SUFFIX \ 0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23 +#define CARD10_UUID_PREFIX 0x02, 0x23, 0x42 /*!< \brief Service start handle. */ #define CARD10_START_HDL 0x920 @@ -53,38 +54,38 @@ enum { /* clang-format off */ /* BLE UUID for card10 service*/ -static const uint8_t UUID_svc[] = { CARD10_UUID_SUFFIX, 0x0, 0xf0, 0x0, 0x0 }; +static const uint8_t UUID_svc[] = { CARD10_UUID_SUFFIX, 0x0, CARD10_UUID_PREFIX }; /* BLE UUID for card10 char vibra */ static const uint8_t UUID_char_vibra[] = { ATT_PROP_WRITE_NO_RSP, UINT16_TO_BYTES(CARD10_VIBRA_VAL_HDL), - CARD10_UUID_SUFFIX, 0xf, 0xf1, 0x0, 0x0 + CARD10_UUID_SUFFIX, 0xf, CARD10_UUID_PREFIX }; static const uint8_t UUID_attChar_vibra[] = { - CARD10_UUID_SUFFIX, 0xf, 0xf1, 0x0, 0x0 + CARD10_UUID_SUFFIX, 0xf, CARD10_UUID_PREFIX }; /* BLE UUID for card10 char rockets */ static const uint8_t UUID_char_rockets[] = { ATT_PROP_WRITE_NO_RSP, UINT16_TO_BYTES(CARD10_ROCKETS_VAL_HDL), - CARD10_UUID_SUFFIX, 0x10, 0xf1, 0x0, 0x0 + CARD10_UUID_SUFFIX, 0x10, CARD10_UUID_PREFIX }; static const uint8_t UUID_attChar_rockets[] = { - CARD10_UUID_SUFFIX, 0x10, 0xf1, 0x0, 0x0 + CARD10_UUID_SUFFIX, 0x10, CARD10_UUID_PREFIX }; /* BLE UUID for card10 char light sensor */ static const uint8_t UUID_char_light_sensor[] = { ATT_PROP_READ, UINT16_TO_BYTES(CARD10_LIGHT_SENSOR_VAL_HDL), - CARD10_UUID_SUFFIX, 0xf0, 0xf0, 0x0, 0x0 + CARD10_UUID_SUFFIX, 0xf0, CARD10_UUID_PREFIX }; static const uint8_t UUID_attChar_light_sensor[] = { - CARD10_UUID_SUFFIX, 0xf0, 0xf0, 0x0, 0x0 + CARD10_UUID_SUFFIX, 0xf0, CARD10_UUID_PREFIX }; /* clang-format on */ -- GitLab