Hello to all Geeks,
I am beginner to BLE technology since kindly help me out by clearing the issue i am trying to add a new GATT service to x-cube ble ("">http://www.st.com/web/en") ,but unfortunately the service is not shown in the ble debugger (play.google.com/.../details
the service which is already exits in that code is visible ,but a new one with new uuid is not forming
/************************************ Ref code *********************************************************/ (under main) ret = Add_UV_Sensor_Service();
if(ret == BLE_STATUS_SUCCESS)
PRINTF("Environmental Sensor service added successfully.\n");
else
PRINTF("Error while adding Environmental Sensor service.\n");
(under service .c) #define COPY_UUID_128(uuid_struct, uuid_15, uuid_14, uuid_13, uuid_12, uuid_11, uuid_10, uuid_9, uuid_8, uuid_7, uuid_6, uuid_5, uuid_4, uuid_3, uuid_2, uuid_1, uuid_0) \ do {\ uuid_struct[0] = uuid_0; uuid_struct[1] = uuid_1; uuid_struct[2] = uuid_2; uuid_struct[3] = uuid_3; \ uuid_struct[4] = uuid_4; uuid_struct[5] = uuid_5; uuid_struct[6] = uuid_6; uuid_struct[7] = uuid_7; \ uuid_struct[8] = uuid_8; uuid_struct[9] = uuid_9; uuid_struct[10] = uuid_10; uuid_struct[11] = uuid_11; \ uuid_struct[12] = uuid_12; uuid_struct[13] = uuid_13; uuid_struct[14] = uuid_14; uuid_struct[15] = uuid_15; \ }while(0)
#define COPY_UV_SENS_SERVICE_UUID(uuid_struct) COPY_UUID_128 (uuid_struct,0x0e,0xd4,0x4b,0x69, 0x20,0xd1, 0x4b,0xc4, 0x9f,0xb0, 0xcf,0xf6,0xf1,0xf1,0xd0,0x71) tBleStatus Add_UV_Sensor_Service(void) {
tBleStatus ret; uint8_t uuid[16]; uint16_t uuid16; charactFormat charFormat; uint16_t descHandle;
COPY_UV_SENS_SERVICE_UUID(uuid); ret = aci_gatt_add_serv(UUID_TYPE_128, uuid, PRIMARY_SERVICE , 5, &uvSerHandle);
if (ret != BLE_STATUS_SUCCESS) goto fail;
fail: PRINTF("Error while adding UV_SENS service.\n"); return BLE_STATUS_ERROR ;
}
sorry for the inconvenience...
please check the below link for full program
x-cube ble:
www.st.com/.../PF261442