Repository: incubator-mynewt-core Updated Branches: refs/heads/master f04e1d0fe -> 3531ce6d6
MYNEWT-759 Change BLE-over-CoAP UUID 128 --> 16 The plan is to reserve a 16-bit UUID with the Bluetooth SIG. In the meantime, we will use the (arbitrarilly chosen) UUID 0x9923. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/3531ce6d Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/3531ce6d Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/3531ce6d Branch: refs/heads/master Commit: 3531ce6d6282ebc6587d9641f651f54f7420f1e4 Parents: f04e1d0 Author: Christopher Collins <[email protected]> Authored: Thu May 18 17:06:03 2017 -0700 Committer: Christopher Collins <[email protected]> Committed: Tue May 23 13:07:29 2017 -0700 ---------------------------------------------------------------------- apps/bleprph_oic/src/main.c | 8 ++++---- apps/sensors_test/src/main.c | 8 ++++---- net/oic/include/oic/oc_gatt.h | 4 +--- net/oic/src/port/mynewt/ble_adaptor.c | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3531ce6d/apps/bleprph_oic/src/main.c ---------------------------------------------------------------------- diff --git a/apps/bleprph_oic/src/main.c b/apps/bleprph_oic/src/main.c index 0418ba7..f0234b4 100755 --- a/apps/bleprph_oic/src/main.c +++ b/apps/bleprph_oic/src/main.c @@ -117,11 +117,11 @@ bleprph_advertise(void) fields.name_len = strlen(name); fields.name_is_complete = 1; - fields.uuids128 = (ble_uuid128_t []) { - BLE_UUID128_INIT(OC_GATT_SERVICE_UUID) + fields.uuids16 = (ble_uuid16_t[]) { + BLE_UUID16_INIT(OC_GATT_SERVICE_UUID) }; - fields.num_uuids128 = 1; - fields.uuids128_is_complete = 1; + fields.num_uuids16 = 1; + fields.uuids16_is_complete = 1; rc = ble_gap_adv_set_fields(&fields); if (rc != 0) { http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3531ce6d/apps/sensors_test/src/main.c ---------------------------------------------------------------------- diff --git a/apps/sensors_test/src/main.c b/apps/sensors_test/src/main.c index 585a230..1684e10 100755 --- a/apps/sensors_test/src/main.c +++ b/apps/sensors_test/src/main.c @@ -170,11 +170,11 @@ sensor_oic_advertise(void) fields.name_len = strlen(name); fields.name_is_complete = 1; - fields.uuids128 = (ble_uuid128_t []) { - BLE_UUID128_INIT(OC_GATT_SERVICE_UUID) + fields.uuids16 = (ble_uuid16_t[]) { + BLE_UUID16_INIT(OC_GATT_SERVICE_UUID) }; - fields.num_uuids128 = 1; - fields.uuids128_is_complete = 1; + fields.num_uuids16 = 1; + fields.uuids16_is_complete = 1; rc = ble_gap_adv_set_fields(&fields); if (rc != 0) { http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3531ce6d/net/oic/include/oic/oc_gatt.h ---------------------------------------------------------------------- diff --git a/net/oic/include/oic/oc_gatt.h b/net/oic/include/oic/oc_gatt.h index 99c7924..3dae835 100644 --- a/net/oic/include/oic/oc_gatt.h +++ b/net/oic/include/oic/oc_gatt.h @@ -26,9 +26,7 @@ extern "C" { #endif -/* ADE3D529-C784-4F63-A987-EB69F70EE816 */ -#define OC_GATT_SERVICE_UUID 0x16, 0xe8, 0x0e, 0xf7, 0x69, 0xeb, 0x87, 0xa9, \ - 0x63, 0x4f, 0x84, 0xc7, 0x29, 0xd5, 0xe3, 0xad +#define OC_GATT_SERVICE_UUID 0x9923 int oc_ble_coap_gatt_srv_init(void); void oc_ble_coap_conn_new(uint16_t conn_handle); http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3531ce6d/net/oic/src/port/mynewt/ble_adaptor.c ---------------------------------------------------------------------- diff --git a/net/oic/src/port/mynewt/ble_adaptor.c b/net/oic/src/port/mynewt/ble_adaptor.c index 056b11c..eff2db8 100644 --- a/net/oic/src/port/mynewt/ble_adaptor.c +++ b/net/oic/src/port/mynewt/ble_adaptor.c @@ -37,9 +37,9 @@ /* OIC Transport Profile GATT */ /* service UUID */ -/* ADE3D529-C784-4F63-A987-EB69F70EE816 */ -static const ble_uuid128_t oc_gatt_svc_uuid = - BLE_UUID128_INIT(OC_GATT_SERVICE_UUID); +/* 0x9923 */ +static const ble_uuid16_t oc_gatt_svc_uuid = + BLE_UUID16_INIT(OC_GATT_SERVICE_UUID); /* request characteristic UUID */ /* AD7B334F-4637-4B86-90B6-9D787F03D218 */
