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

nus_data_handler from android app -> nrf52840

Hi all,

I am using my android ble application , but I don't manage to receive data sent from the application to the device ( nrf52840 )

I am using the ble_app_uart example from nRF5_SDK_15.2.0 with the latest softdevice 6.1.1

when i am using my app the nus_data_handler not called with BLE_NUS_EVT_RX_DATA as it should (not called at all).

but the ble_evt_handler is called , can't find the data sent in the ble event struct ( ble_evt_t const * p_ble_evt)

when I am using NRF_connect application , the nus_data is called with BLE_NUS_EVT_RX_DATA  ... 

and I can find the data also in the ble event struct when the ble_evt_handler is called.

can you advice why my application can't trigger the nus_data_handler  on the nrf52840 !?

or the opposite why my device nrf52840  can't manage to detect and call the  nus_data_handler  with BLE_NUS_EVT_RX_DATA ?

Parents
  • I am not too familiar with android app development, but I have a recommendation for an easier approach: 

    • Visit Nordic Semiconductor's github, and use some of the examples there as a starting point
      • The Android-nRF-Toolbox app is a smart choice, as it supports connection to the NUS service
    • Use time to understand the code, including how the application sends data to the device (nRF52840)
    • Copy the application and strip it down to form your own solution, while continuously testing it and making sure it works as intended

    Best regards,

    Simon

  • Hi Simon,

    If i had a BLE application that worked perfectly with another company SOC ( not nordic)

    And now I am trying to use it with nrf52850 SOC, do I have to do some changes to the application ? If yes what should be changed ?

    I am asking cause my application worked with another ble device and now with nordic module it’s not working

    again do the application not managed to trigger a ble_nus_evt_rx_data ?

    or my nrf52840 can’t detect it ?

    note : my device managed to communicate perfectly with nrf-connect app, nrfuart app and other applications, besides my app can communicate with another advertizing application on another mobile device and i can see the data sent from my app.

Reply
  • Hi Simon,

    If i had a BLE application that worked perfectly with another company SOC ( not nordic)

    And now I am trying to use it with nrf52850 SOC, do I have to do some changes to the application ? If yes what should be changed ?

    I am asking cause my application worked with another ble device and now with nordic module it’s not working

    again do the application not managed to trigger a ble_nus_evt_rx_data ?

    or my nrf52840 can’t detect it ?

    note : my device managed to communicate perfectly with nrf-connect app, nrfuart app and other applications, besides my app can communicate with another advertizing application on another mobile device and i can see the data sent from my app.

Children
Related