diff --git a/Documentation/bluetooth/card10.rst b/Documentation/bluetooth/card10.rst index 7184db4e62b2c0fd77b4c69f8755bc1b7097fab2..7835048aca8190213614e52155518b8d18e7f3c3 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 9adfd649af549a740333694bbaad5e657a0e4353..1a5dc0655d17550ece37ca29a18a71ded972a9ed 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 */