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

nrf51 Multilink Central and Periph Connection Issue

Hello,

I have made simple modifications to the multilink central and peripheral examples, adding an additional button and notification characteristic. Things have been working great, until... I tried flashing the same central and periph firmware on two brand new nrf51 Dongles. The peripheral connects immediately, but then disconnects, and continues this pattern. The notify enables never take place on the central. I am certain its is the same firmware.

I decided to also try reading the firmware from both the working central and periph and write it to the new Dongles. This did not work when using the new dongle for the central and peripheral, but it did work when I used the old peripheral device and the new central?????

Where should I be looking to while debugging to find the reason why the connection is being lost? Is something being saved to non volatile memory?

On the central side, I can't seem to find any errors, it just disconnects.

On the peripheral its the same situation. on_ble_evt() get called, its case BLE_GAP_EVT_DISCONNECTED, and it starts advertising again only to start the connect / disconnect over again.

I am using s110(7.1.0) and s120(1.0.1). I was using SDK version 7.1.0 and just tried upgrading to 7.2.0, still doing the same thing.

I have attached both the central and periph projects. df_ble_central.zip df_ble_handle_peripheral.zip (Note: I have modified the boards.h header to include two custom board headers. Both the modified boards.h and custom board file are in the top dir.)

Any suggestions or help would be greatly appreciated!!

Thanks

Update: I believe I just narrowed down the issue a lot. I did a test with two nrf51 Dongles. I first put S110(7.1.0) on one and S120(1.0.1) on the other. Next I put the untouched multilink central and peripheral demo one each respectively. They connected and enabled notifications successfully. Next, this time I didn't erase the soft device on either dongle and flashed my modified firmware on both They connected and enabled notifications successfully. Last, I erased both devices entirely and then put the soft devices on and then my modified firmware. They connected but then disconnected.

I believe the issue is that the central is not responding that it received a write request. as seen in the wireshark logs below. So the question is, what remains on the soft device that is allowing it to work and what is missing when I start with a fresh flash of the soft device?

This is the handler and the case that should be responding.

    switch (p_ble_evt->header.evt_id)
{
    case BLE_GATTC_EVT_WRITE_RSP:
        if ((p_ble_evt->evt.gattc_evt.gatt_status == BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION) ||
            (p_ble_evt->evt.gattc_evt.gatt_status == BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION))
        {
            uint32_t err_code = dm_security_setup_req(&p_client->handle);
            APP_ERROR_CHECK(err_code);

        }
					on_evt_write_rsp(p_ble_evt, p_client);
        break;

Working - wireshark image description Not Working - wireshark image description

Parents Reply Children
Related