Could not discover Unkonwn Service of uuid

Hello,

Does anybody know why I can not discover the service uuid as shown in the picture below?

I want to connect a sensor with this chip nRF52832, it's service UUID is 0000fff0-0000-1000-8000-00805f9b34fb. I can scan into sensor and connect with it. But I can not discover this service.

The protocol stack version I use is nRF5_SDK_17.0.2_d674dde,the program I use is nRF5_SDK_17.0.2_d674dde\examples\ble_central. I changed the service UUID to discover-> NUS_BASE_UUID to 0000fff0-0000-1000-8000-00805f9b34fb.  I can't discover it.

Thank you,

  • I tested a central by changing only these lines

    #define NUS_BASE_UUID                   {0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /**< Used vendor-specific UUID. */
    #define BLE_UUID_NUS_SERVICE            0xfff0                      /**< The UUID of the Nordic UART Service. */
    #define BLE_UUID_NUS_RX_CHARACTERISTIC  0xfff2                      /**< The UUID of the RX Characteristic. */
    #define BLE_UUID_NUS_TX_CHARACTERISTIC  0xfff3                      /**< The UUID of the TX Characteristic. */
    //#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. */
    

    And the central can discover the services just file as seen from the peripheral with your custom UUID

    <info> app_timer: RTC: initialized.
    <debug> ble_scan: Adding filter on QianShan01 name
    <info> app: BLE UART central example started.
    <debug> ble_scan: Scanning
    <debug> ble_scan: Connecting
    <debug> ble_scan: Connection status: 0
    <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
    <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
    <info> app: Connecting to target C2C3600473F0
    <debug> nrf_ble_gq: Registering connection handle: 0x0000
    <debug> ble_db_disc: Starting discovery of service with UUID 0xFFF0 on connection handle 0x0.
    <debug> nrf_ble_gq: Adding item to the request queue
    <debug> nrf_ble_gq: GATTC Primary Services Discovery Request
    dure will be attempted                       again later.
    <debug> nrf_ble_gq: Processing the request queue...
    <debug> nrf_ble_gq: GATTC Primary Service Discovery Request
    U of 247 bytes.
    <debug> nrf_ble_gatt: Updating ATT MTU to 247 bytes (desired: 247) on connection 0x0.
    <debug> nrf_ble_gq: Processing the request queue...
    <debug> nrf_ble_gq: GATTC Primary Service Discovery Request
    <debug> nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted                           again later.
    <debug> nrf_ble_gatt: ATT MTU updated to 247 bytes on connection 0x0 (response).
    <info> app: ATT MTU exchange completed.
    <info> app: Ble NUS max data length set to 0xF4(244)
    <debug> nrf_ble_gq: Processing the request queue...
    <debug> nrf_ble_gq: GATTC Primary Service Discovery Request
    <debug> nrf_ble_gq: SD GATT procedure (2) succeeded on connection handle: 0.
    <debug> nrf_ble_gatt: Data length updated to 251 on connection 0x0.
    <debug> nrf_ble_gatt: max_rx_octets: 251
    <debug> nrf_ble_gatt: max_tx_octets: 251
    <debug> nrf_ble_gatt: max_rx_time: 2120
    <debug> nrf_ble_gatt: max_tx_time: 2120
    <debug> ble_db_disc: Found service UUID 0xFFF0.
    <debug> nrf_ble_gq: Adding item to the request queue
    <debug> nrf_ble_gq: GATTC Characteristic Discovery Request
    <debug> nrf_ble_gq: SD GATT procedure (3) succeeded on connection handle: 0.
    <debug> nrf_ble_gq: Processing the request queue...
    <debug> nrf_ble_gq: Adding item to the request queue
    <debug> nrf_ble_gq: GATTC Characteristic Discovery Request
    <debug> nrf_ble_gq: SD GATT procedure (3) succeeded on connection handle: 0.
    <debug> nrf_ble_gq: Processing the request queue...
    <debug> nrf_ble_gq: Adding item to the request queue
    <debug> nrf_ble_gq: GATTC Characteristic Descriptor Request
    <debug> nrf_ble_gq: SD GATT procedure (4) succeeded on connection handle: 0.
    <debug> nrf_ble_gq: Processing the request queue...
    <debug> ble_db_disc: Discovery of service with UUID 0xFFF0 completed with success on connection handle 0x0.
    <info> app: Discovery complete.
    <debug> nrf_ble_gq: Adding item to the request queue
    <debug> nrf_ble_gq: GATTC Write Request
    <debug> nrf_ble_gq: SD GATT procedure (1) succeeded on connection handle: 0.
    <info> app: Connected to device with Nordic UART Service.
    <debug> nrf_ble_gq: Processing the request queue...
    <debug> nrf_ble_gq: Processing the request queue...
    

  • But I still can't make it, could you send me that central project you tested. Thank you so much.

  • For your convenience I will add the hex files that I tested with

    Peripheral:on nRF52840DK_S140v7.2.0

     8883.ble_app_uart_pca10056_s140.hex


    Central  on nRF52832DK_S132v7.2.0

    6740.ble_app_uart_c_pca10040_s132.hex

  • Sorry, I tested the file you sent me, but it doesn't work, the reason is shown below. So I think if you send me the whole project of the central, I can test it on my board.

  • Sure, here you go
    4578.ble_app_uart_c.zip

    replace ble_nus_c.h with the file below.

    8814.ble_nus_c.h

    Like I showed you in the log file, everything seems to work properly at my end.

Related