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

Data is not getting received in nus_data_handler


Hi,

I have created an eclipse based makefile project for nrf51802 module.

The sdk version that i am using is 12.3.0, and softdevice S130 .

Taking reference of ble_app_uart example i have advertised my device and i have connected with nrf android application and sent data.

It is expected that data should come into nus_data_handler. I have not enabled any other services except the default nus service which is initialized in services_init();

I kept a breakpoint in nus_data_handler() but it never reaches that breakpoint.

I also see that, it comes to BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST case in on_ble_evt() and then gets disconnected after that.

I am attaching my project for reference.

Please help me resolve this issue. I'm blocked on it since 3 days.0486.Keybox.zip

3225.My_project.zip

  • swetha Paladugu said:
    Have you tried flashing the pre-compiled code on your nrf51802 device?

     I tried flashing it on the nRF51 DK, and it works without modifications there (both the precompiled ble_app_hrs_freertos_pca10028_s130.hex and the armgcc generated application together with the softdevice). 

    Note that the nrf51802 only has 16KB RAM. Make sure that your memory settings are correct. In the ble_app_hrs_freertos project, that would be the ble_app_freertos_gcc_nrf51.ld file. By default, it says:

    FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
    RAM (rwx) : ORIGIN = 0x20001fe8, LENGTH = 0x6018

    But the length of the RAM is only 0x4000, so try setting:

    FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
    RAM (rwx) : ORIGIN = 0x20001fe8, LENGTH = 0x2018

    I don't know how that translates to Eclipse, unfortunately.

  • FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
    RAM (rwx) : ORIGIN = 0x20001fe8, LENGTH = 0x2018

    using these only Edvan.

Related