This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

can not discovery by srv uuid

hi all:

Recently, I use nrf51822 as a central to connect some older sensor, but the ble chip of the older sensor did not use nordic, so I have this problem. I develop the project based on ....\Nordic\Nordic_Multilink\ble_central\ble_app_multilink_central. The background is below:

I want use nrf51822 to connect the older sensor, and discovery the service, and notify the character.The older sensors have one service, and this service contain two characters ,one is tx char, the other is rx char. Curiously, their UUIDs is not compatible with the nordic's UUID type, they are defined as below:

#define SVC_PRIVATE_UUID        {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0xE9, 0xFE, 0x00, 0x00}
#define RX_CHAR_UUID              {0x00, 0x96, 0x12, 0x16, 0x54, 0x92, 0x75, 0xB5, 0xA2, 0x45, 0xFD, 0xAB, 0x39, 0xC4, 0x4B, 0xD4}
#define FIRST_TX_CHAR_UUID     {0x01, 0x96, 0x12, 0x16, 0x54, 0x92, 0x75, 0xB5, 0xA2, 0x45, 0xFD, 0xAB, 0x39, 0xC4, 0x4B, 0xD4}

So there is no BASE_UUID in the older sensors.... In the nrf51822, in the client_handling.c, I define the uuid is as below:

 #define BASE_UUID    {0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}
			 
#define SERVICE_UUID 0xE9FE

The result is the central can not discover the older sensors.... So, how can I modify the pragram??? Thanks a lot!

best regards!

Parents
  • Not Nordic? :o

    sd_ble_uuid_vs_add() just enables the application to add a vendor specific UUID to the BLE stack's table, for later use all other modules and APIs. For more information, see @details in the above the function in ble.h. This is just our way of handling vendor specific UUIDs, the devices should still be able to communicate. It is just how the application gives the UUID to stack that is different.

  • hi Petter: Thanks a lot, you comments is very useful. but, I still have another question, when I use the uuid which the ble_app_multilink_central use to modify the peripheral's service uuid. the uuid is: {{0xB3, 0x58, 0x55, 0x40, 0x50, 0x60, 0x11, 0xe3,0x8f, 0x96, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x66}} then the central can discover the service, in the on_primary_srv_discovery_rsp() the p_ble_gattc_evt->gatt_status is BLE_GATT_STATUS_SUCCESS. But, when I modify the service uuid both in the central and peripheral, which is: {{0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} then, in the on_primary_srv_discovery_rsp() the p_ble_gattc_evt->gatt_status is BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND. So , is there any restrain for the customed service uuid??

    thanks a lot!

Reply
  • hi Petter: Thanks a lot, you comments is very useful. but, I still have another question, when I use the uuid which the ble_app_multilink_central use to modify the peripheral's service uuid. the uuid is: {{0xB3, 0x58, 0x55, 0x40, 0x50, 0x60, 0x11, 0xe3,0x8f, 0x96, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x66}} then the central can discover the service, in the on_primary_srv_discovery_rsp() the p_ble_gattc_evt->gatt_status is BLE_GATT_STATUS_SUCCESS. But, when I modify the service uuid both in the central and peripheral, which is: {{0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} then, in the on_primary_srv_discovery_rsp() the p_ble_gattc_evt->gatt_status is BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND. So , is there any restrain for the customed service uuid??

    thanks a lot!

Children
No Data
Related