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

Service discovery, attribute not found 0x0001

Dear all,

I am having issues with service discovery of two primary services ( Battery and one propriotary based on NUS) I am currently using SDK 14.2 on NRF52832 chip running as central device application trying to discover these services on off-the shelf peripheral devices (thermal printers to be more specific).

I have tried with different devices (different brands with same UUID) and with some of them the service discovery works and I am able to send data to the printer. It also works when I connect using nRF Connect on my Android device.

I have logged the communication with Wireshark however don't understand why I get the "Attribute Not Found, Handle: 0x0001 (Unknown)

Sorry for being somewhat brief in my description. The thing is that I am not sure I am actually looking at this problem from the right angle. I am not certain the service discovery is wrong. It may be that I missed something in the configuration. If so, how do I find out what?

Thanks for any help getting on track with this.

Parents Reply
  • I am sorry, I was unclear. nrf Connect is able to do the service discovery on all the printers. My implementation on the nrf52 chip works on some of them. I still expect something is wrong with my code.

    When looking at package 520 one can see the the 128 bit service is broadcasted by the printer. Then in package #526 the primary service declaration request is hapening, asking for the same 128 bit value, right? then in #527 the "not found" response happen. Starting at package 35052 one can see how the connection and service discovery between the printer and nrf connect my android device.  I interpret it as the printer uses a CSR chip.

    I attach a Wireshark log with a device that work. the service discovery starts at package #224

    PTP-II.pcapng

Children
  • Sorry for the delayed response. I have taken a closer look at the uart central example & I believe this example only searches for the uart service. I think it would be better if you tested with the multilink central example, as that example does not limit itself to the uart service.

  • Just for a quick test I used the  multilink central example you suggested. Since it already has the battery service it was perfect for testing this. However, it does not connect here either. I'll uplode a Wireshark log later today.

  • That's weird. Do you also have any logging information from the multilink example that you could upload? Might be helpful in debugging this further.

  • Just a heads up that I have a similar issue in another post. Also getting Attribute Not Found for three of my characteristics on discovery. So I'm interested in the response here.

  • I have had major issues with Wireshark. I can't get it to capture anything else then advertisement packages. Occasionally I get a scan request from some Apple device in the area. therefore my logs are useless at the moment. I have tried to recreate the loggs I made earlier without luck.

    The best I can do for now is the debug output from the debug output.

    <debug> nrf_sdh: State request: 0x00000000
    <debug> nrf_sdh: Notify observer 0x00027D78 => ready
    <debug> nrf_sdh: State change: 0x00000000
    <debug> nrf_sdh: State change: 0x00000001
    <debug> nrf_sdh_ble: RAM starts at 0x20004190
    <info> app: Multilink example started.
    <info> app: Start scanning for device 46 2C 90 17 02 0F
    <debug> nrf_sdh_ble: BLE event: 0x1D.
    <debug> app: Adv report.
    <info> app: Connecting to target 62 CE BB 51 F9 F4
    <debug> nrf_sdh_ble: BLE event: 0x1D.
    <debug> app: Adv report.
    <info> app: Connecting to target 90 63 86 95 13 15
    <debug> nrf_sdh_ble: BLE event: 0x1D.
    <debug> app: Adv report.
    <info> app: Connecting to target 46 2C 90 17 02 0F
    <debug> nrf_sdh_ble: BLE event: 0x10.
    <info> app: Connection 0x0 established, starting DB discovery.
    <debug> ble_db_disc: Starting discovery of service with UUID 0x180F on connection handle 0x0.
    <debug> nrf_sdh_ble: BLE event: 0x30.
    <debug> ble_db_disc: Service UUID 0x180F not found.
    <debug> app: call to ble_lbs_on_db_disc_evt for instance 0 and link 0x0!
    <debug> ble_bas_c: Battery Service discovery failure at peer.  
    <debug> ble_db_disc: Service UUID 0x0 not found.
    <debug> ble_db_disc: Service UUID 0x0 not found.
    <debug> ble_db_disc: Service UUID 0x0 not found.
    <debug> ble_db_disc: Service UUID 0x0 not found.
    <debug> ble_db_disc: Service UUID 0x0 not found.
    <debug> ble_db_disc: Service UUID 0x0 not found.
    <debug> ble_db_disc: Service UUID 0x0 not found.
    <debug> nrf_sdh_ble: BLE event: 0x11.
    <info> app: LBS central link 0x0 disconnected (reason: 0x8)
    <info> app: Start scanning for device 46 2C 90 17 02 0F
    <debug> nrf_sdh_ble: BLE event: 0x1D.
    <debug> app: Adv report.
    <info> app: Connecting to target 59 E1 D5 4E 74 C0
    <debug> nrf_sdh_ble: BLE event: 0x1D.
    <debug> app: Adv report.
    <info> app: Connecting to target 46 2C 90 17 02 0F
    <debug> nrf_sdh_ble: BLE event: 0x10.
    <info> app: Connection 0x0 established, starting DB discovery.
    <debug> ble_db_disc: Starting discovery of service with UUID 0x180F on connection handle 0x0.
    <debug> nrf_sdh_ble: BLE event: 0x30.
    <debug> ble_db_disc: Service UUID 0x180F not found.
    <debug> app: call to ble_lbs_on_db_disc_evt for instance 0 and link 0x0!
    <debug> ble_bas_c: Battery Service discovery failure at peer.  

Related