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

Custom service not found, multilink central

Hey! 

I have some trouble service UUID then i try to use the multilink central example project on a nRF51 dongle. I want it to have contact with a peripheral with sends a custom service. In the peripheral i have defined this: CUSTOM_SERVICE_UUID 0x1400 and CUSTOM_VALUE_CHAR_UUID 0x1401.

I changed the project from using ble_lbe to ble_nus. I have included the ble_nus_c.c file. In the ble_nus_c_h file i added #define BLE_CUSTOM_SERVICE_UUID 0x1400 and  #define BLE_CUSTOM_VALUE_CHAR_UUID 0x1401. At the same time I changed all BLE_UUID_NUS_SERVICE with BLE_CUSTOM_SERVICE_UUID in ble_nus_c.c. 

When i try to run the project the central manage to connect to the peripheral but i can not find the service. I added a picture from j-link viewer bellow. I also checked what the BLE_GATT_STATUS is and it ses 0x10a which i found to be BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND.

So I now wonder how to continue so I can find the service? 

Thank you in advance!

 

Parents
  • Hi,

    • What services and characteristics does the peripheral device have?
    • Is it ble_app_uart peripheral you are trying to connect to? If yes, did you make any changes to that peripheral example, e.g. the UUID values?
    • Your goal is to implement multilink central for NUS? 
    • Does it work if you try the default UUID’s for NUS ?

      #define NUS_BASE_UUID                   {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**< Used vendor specific UUID. */
      
      #define BLE_UUID_NUS_SERVICE            0x0001                      /**< The UUID of the Nordic UART Service. */
      #define BLE_UUID_NUS_RX_CHARACTERISTIC  0x0002                      /**< The UUID of the RX Characteristic. */
      #define BLE_UUID_NUS_TX_CHARACTERISTIC  0x0003                      /**< The UUID of the TX Characteristic. */
  • Hey Sigurd,

    The service that the peripheral device have is 0x1400 and the characteristic is 0x1401. 

    I followed this tutorial to make a custom service, https://github.com/bjornspockeli/custom_ble_service_example. So the peripheral device is made from the ble_app_template and modified as in the tutorial. 

    Yes, that was the thought. Or is I maybe better to use something else when i want a custom service? 

    I tried that fist before I remembered that the service and character on the peripheral side was different. I have not tried it with the ble_app_uart on the peripheral side. 

  • Hi,

    If you need multilink central support, then the multilink central example is a good starting point.

    Regarding the error "Service UUID 0x1400 Not found", please make sure that you also use the same UUID BASE on both central and peripheral. I.e. the CUSTOM_SERVICE_UUID_BASE that is used on the peripheral, is also the same as the UUID base used on the central side(originally named LBS_UUID_BASE on the multilink central example).

  • Yes, of course! My UUID was wrong.. 

    Thank you :) 

Reply Children
No Data
Related