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

Integrating two NRF Development kit blinky code with my android app at that time data is not received

While connecting with one NRF Development kit and Android NRF blink app mobile code, data is getting received properly.

But with some changes in development kit code ,We are trying to make a connection between 2 development kits in that one  DK act as a central and another DK as peripheral

Now mobile will connect with one central DK at that time data callback not getting received in the mobile side.

But checking with other BLE Scanner android apps , Data is received but in NRF Blinky android code data receive callback is not happening.

we are using same service UUID and button characteristics for both the development kit whether that is a issue.

Parents
  • I'm sorry, but can you clarify a few things:

    • Is your Android nRF blinky app acting as a peripheral or central in this case?
    • Are the two development kits (central and peripheral) able to connect and work as intended?
    • Are you trying to connect to the Android while the central DK is already connected to the peripheral DK? If so you might need to increase the number of links that the central can maintain at a time. Depending on what SDK and version you're using how to do this might vary.
    • What callback data exactly is it that you're expecting that you're not getting back?

    Best regards,

    Simon

  • Is your Android nRF blinky app acting as a peripheral or central in this case?

    Ans: Initially android app will be central with 1 DK(Development Kit) till connection establishment , afterwards that DK will act as central to one more DK .But app will have connection only with the first one DK. 

    Are the two development kits (central and peripheral) able to connect and work as intended?

    Ans: Yes ,Two DKs are able to connect and receive data between them and also able to throw data to other core BLE apps but for nordic blinky app it doesn't. In Blinky android application at the time of throwing data from DK getting these following things in logcat.

    2021-08-31 11:24:43.706 3390-3446/com.imu_for_tka D/BluetoothGatt: onConnectionUpdated() - Device=D5:E6:90:3C:A5:4F interval=36 latency=0 timeout=500 status=0
    2021-08-31 11:25:03.351 3390-3446/com.imu_for_tka D/BluetoothGatt: onConnectionUpdated() - Device=D5:E6:90:3C:A5:4F interval=156 latency=0 timeout=400 status=0

    Are you trying to connect to the Android while the central DK is already connected to the peripheral DK? If so you might need to increase the number of links that the central can maintain at a time. Depending on what SDK and version you're using how to do this might vary.

    Ans : Where to increase the number of links in app side or embedded side. Initially android app will be central with 1 DK till connection establishment , after that connection is successful and data transfer is also happening but once the peripheral DK becomes central for another DK app is unable to read the data.

    What callback data exactly is it that you're expecting that you're not getting back?

    Ans: I am expecting the button callback data in our case it will be a byte array of 20 bytes . May be increasing some delay will provide some solutions ah is it so means where in the app we need to change

Reply
  • Is your Android nRF blinky app acting as a peripheral or central in this case?

    Ans: Initially android app will be central with 1 DK(Development Kit) till connection establishment , afterwards that DK will act as central to one more DK .But app will have connection only with the first one DK. 

    Are the two development kits (central and peripheral) able to connect and work as intended?

    Ans: Yes ,Two DKs are able to connect and receive data between them and also able to throw data to other core BLE apps but for nordic blinky app it doesn't. In Blinky android application at the time of throwing data from DK getting these following things in logcat.

    2021-08-31 11:24:43.706 3390-3446/com.imu_for_tka D/BluetoothGatt: onConnectionUpdated() - Device=D5:E6:90:3C:A5:4F interval=36 latency=0 timeout=500 status=0
    2021-08-31 11:25:03.351 3390-3446/com.imu_for_tka D/BluetoothGatt: onConnectionUpdated() - Device=D5:E6:90:3C:A5:4F interval=156 latency=0 timeout=400 status=0

    Are you trying to connect to the Android while the central DK is already connected to the peripheral DK? If so you might need to increase the number of links that the central can maintain at a time. Depending on what SDK and version you're using how to do this might vary.

    Ans : Where to increase the number of links in app side or embedded side. Initially android app will be central with 1 DK till connection establishment , after that connection is successful and data transfer is also happening but once the peripheral DK becomes central for another DK app is unable to read the data.

    What callback data exactly is it that you're expecting that you're not getting back?

    Ans: I am expecting the button callback data in our case it will be a byte array of 20 bytes . May be increasing some delay will provide some solutions ah is it so means where in the app we need to change

Children
Related