This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[Android] not be able to connect through standard ble api connectGatt

Hi all,

  We are trying to develop ble application on iOS and Android platforms, however we encounter some compatibility issues through development on Android.

A very serious issue is that we couldn't connect to the device through standard Android ble api "connectGatt". We have tried to use reflection workaround to call the api with transport BluetoothDevice.TRANSPORT_LE and worked for nexus devices but still not worked for a lot of devices ex: Samsung Galaxy S5, Samsung Galaxy Note 4.

Since we couldn't connect to the device though ble, we couldn't continue developing and need your helps.

Is there any solution for the issue? Thanks a lot.

Here are the items we are using:

Hardware:

CC2564 + STM32F429 + Authentication coprocessor

Software:

TI Dual-mode Bluetooth® stack on STM32F4 MCUs v4.0.2.2

 

  • hi, your query has been assigned to BT expert. We will get back to you shortly
    Saurabh
  • Hi Emily,

    This issue with Android compatibility has not been reported before.
    - Are you using a standard BLE profile (HRP, PXP etc.) or a custom gatt based profile like the SPPLE?
    - If using a custom profile, are you experiencing the same issue with SPPLE? This profile is working with LighBlue app on iOS and apps like BLE Scanner on Android.

    Best regards,
    Vihang
  • Hi Vihang,

      1. I am using custom gatt based profile and I have also tried for the sample code SPPLE.

      2. I encounter the same issue with SPPLE. Besides, I couldn't connect the device on any Android phones with BLE Scanner on Android ( by Bluepixel Technology LLP). I always get disconnected status and the screen shot is attached.

  • Hello Emily,


    what BT UPS are you using? BlueDroid on Android device?

    Please share some more information about the exact setup you are using.
    So we can help pin point what is the issue.

    BR,

    Chen Loewy
  • Hi all,

      What is the definition of UPS? Sorry I don't know what it is.

      We are developing our own device which is not running Android so we didn't use bluedroid.

      The  HW of our device is CC2564 + STM32F429 + Authentication coprocessor and SW is running TI Dual-mode Bluetooth® stack on STM32F4 MCUs v4.0.2.2.

      We implement an Android app which using standard Android ble api "connectGatt" with transport “BluetoothDevice.TRANSPORT_LE" can successfully connect our device through nexus 5 and nexus 6 but fail to connect through Samsung Galaxy S5, Samsung Galaxy Note 4.

      Moreover, if we use market app "BLE Scanner" ( by Bluepixel Technology LLP), we couldn't connect the device through nexus 5, nexus 6 also.

      If there are any missing detail please tell me and please help to figure out what is the issue.

    Thanks a lot.

    Emily

  • Hello Emily.

    First thanks for sharing all the details.
    UPS - upper protocol stack.

    And now i understand you are not using BlueDroid - so i assume you are using TI Bluetooth stack.
    Now i also understand that it works well on a couple of devices and doesn't work well with some others.

    The next step for me in order to understand what could be the issue would be to get FW logs.
    Can you please capture FW logs of a good case (connection with a Nexus5 device) and a problematic log (with Samsung Galaxy S5)

    So i can see what exactly is the difference in order to help solve this issue.

    BR,
    Chen Loewy
  • closing the thread since there has been no reply for almost 2 weeks
    Saurabh