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

Trouble porting CLI over BLE example

Hi,

I have an existing application built on top of the ble_att_mtu_throughput example. I want to send log data over a BLE connection, and I am trying to use the CLI over BLE module to do this.

However, I'm having trouble porting the example to my project. Specifically, using the task manager module immediately triggers a hard fault (BusError or UsageFault_StateError). It fails at the line (inside task_switch)

VLDMIANE    SP!, {S0-S31}  /* If FPCA set, restore FPU registers. */

When not using the task manager module (never call nrf_cli_task_create), the code crashes upon connecting to the server. The CLI over BLE example has no trouble connecting and sending data to this webpage.

The error appears in the sd_ble_gap_phy_update function inside PHY_UPDATE case under ble_evt_handler. Error code returned is 4 (NRF_ERROR_INVALID_STATE). So I'm essentially stuck being unable to send log data over a BLE connection. Any advice would be much appreciated!

case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
        {
            ble_gap_phys_t const phys =
            {
                .rx_phys = BLE_GAP_PHY_AUTO,
                .tx_phys = BLE_GAP_PHY_AUTO,
            };
            err_code = sd_ble_gap_phy_update(p_gap_evt->conn_handle, &phys);
            APP_ERROR_CHECK(err_code);
        } break;


  • Ok thanks Edvin, I’ll take a look and let you know what I find, but it probably won’t be till later today (in the US). Thanks for your help!

    EDIT:

    I'm having trouble figuring out how the address being pointed to in flash relates to the .map file. The exact address being pointed to is 0x000000A60 and the  line in flash reads "4B01        ldr r3, [pc, #4]". When I search "a60" in flash, should I be looking for the line that corresponds to 0xa60?

Related