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

Device discovery fails on Android 4.3 with nrf8001

I have been trying to connect a nrf8001 device to a Android 4.3 device and it is discovered ok but fails when it tries to do a service discovery. After some deep digging I have found the reason. It seems that the nrf8001 responds to the first Read By Group Type Request:

07 00 04 00 10 01 00 FF FF 00 28

with the response:

0E 00 04 00 11 06 01 00 07 00 00 08 00 00 08 00 01 18

Now there are some problems with this response:

First the handle 00 00 is reserved according to the ble spec and this is what makes android puke. Android considers this an invalid handle and cancels the discovery process.

Second even if you use 00 00 as a handle it should not be returned since it is outside the search range 0x0001 to 0xffff

So my question is: is there a way to control the handle numbering via the setup commands? Do you have any other suggestions for workarounds for this issue?

Regards Erik Rosen

Btw. On iOS it works fine.

Parents
  • Hi,

    The handle organization for the Setup used and the GATT table is seen in the ublue_setup.gen.out.txt.

    You can also modify the setup , and example to do so is available with the "ble_uart_project_modify_setup" project. This project is part of the BLE SDK for Arduino. You can manually modify the setup created in "services.h" and then regenerate the CRC using the project. Then put the CRC back to the header file so it the Setup completes correctly. You should be able to modify the handles and other data in the Setup.

    You can also move the Services in the XML file for your GATT Setup by moving the XML representation for the specific Service. The XML representation for the Service is from the <Service ....> to the tag. This will change the handles for those Services and will be reflected in the ublue_setup.gen.out.txt

    Requested actions:

    1. Can you give the chip markings on the nRF8001 that you have , the chip markings are on the top of the chip and looks like. This is to ensure that you have the latest version of the nRF8001.

    nRF C 8001 wwyyLL

    2, The results of the ACI Get Device Version command ?

Reply
  • Hi,

    The handle organization for the Setup used and the GATT table is seen in the ublue_setup.gen.out.txt.

    You can also modify the setup , and example to do so is available with the "ble_uart_project_modify_setup" project. This project is part of the BLE SDK for Arduino. You can manually modify the setup created in "services.h" and then regenerate the CRC using the project. Then put the CRC back to the header file so it the Setup completes correctly. You should be able to modify the handles and other data in the Setup.

    You can also move the Services in the XML file for your GATT Setup by moving the XML representation for the specific Service. The XML representation for the Service is from the <Service ....> to the tag. This will change the handles for those Services and will be reflected in the ublue_setup.gen.out.txt

    Requested actions:

    1. Can you give the chip markings on the nRF8001 that you have , the chip markings are on the top of the chip and looks like. This is to ensure that you have the latest version of the nRF8001.

    nRF C 8001 wwyyLL

    2, The results of the ACI Get Device Version command ?

Children
No Data
Related