0
votes

I want to create a real custom Gatt service, this means not using any of the Bluetooth SIG specs: https://www.bluetooth.com/specifications/gatt/services/

I want to create a custom service that can send accelerometer and gyroscope data in a single characteristic. This will mean creating a custom message.

I understand I should create a 128 bits UUID for a gatt service like this one used for Heart rate: 0000180D-0000-1000-8000-00805F9B34FB but without using this BASE uuid. I don't know how to adapt this to the MOVESENSE sample code that uses the 16bits format: 0x180D

Has anyone done a custom GATT service to send accelerometer and gyroscope data who can give me a little guidance in this?

I am newly working with Gatt services.

1

1 Answers

0
votes

The current movesense-device-lib (<=1.9.x) supports 16- or 128-bit UUID's for service UUID, but only 16-bit UUID's for the characteristics (the coming movesense-device-lib 2.0 release will remove that restriction).

For setting 128 bit UUID to service definition, just make a byte-array of 16 bytes instead of 2:

constexpr uint8_t SENSOR_DATASERVICE_UUID[] = { 0xAA, 0xBB, ... , 0x33, 0x44 };
customGattSvc.uuid = wb::MakeArray<uint8_t>( SENSOR_DATASERVICE_UUID, sizeof(SENSOR_DATASERVICE_UUID));

Full Disclosure: I work for the Movesense team