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

question about nrf51-ble-app-lbs with Softdevice 7.0?

I try to use nrf51-ble-app-lbs with softdevice 7.0

I download ble-app-lbs at github.com/.../nrf51-ble-app-lbs

And change IROM1 start at 0x16000 lenth 0x29000.

static void advertising_init(void)
{
    uint32_t      err_code;
    ble_advdata_t advdata;
    ble_advdata_t scanrsp;
    uint8_t       flags = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
    ble_uuid_t adv_uuids[] = {{LBS_UUID_SERVICE, m_lbs.uuid_type}};
    err_code = sd_ble_gap_address_get(&m_ble_addr);
    APP_ERROR_CHECK(err_code);
    err_code = sd_ble_gap_address_set(BLE_GAP_ADDR_CYCLE_MODE_NONE, &m_ble_addr);
    APP_ERROR_CHECK(err_code);
    // Build and set advertising data
    memset(&advdata, 0, sizeof(advdata));
    advdata.name_type               = BLE_ADVDATA_FULL_NAME;
    advdata.include_appearance      = true;
    advdata.flags.size              = sizeof(flags);
    advdata.flags.p_data            = &flags;
    
    memset(&scanrsp, 0, sizeof(scanrsp));
    scanrsp.uuids_complete.uuid_cnt = sizeof(adv_uuids) / sizeof(adv_uuids[0]);
    scanrsp.uuids_complete.p_uuids  = adv_uuids;
    
    err_code = ble_advdata_set(&advdata, &scanrsp);
    APP_ERROR_CHECK(err_code);
}

and will cause error 7 at

err_code = ble_advdata_set(&advdata, &scanrsp);
APP_ERROR_CHECK(err_code);

My EK is ok when I burn ble_app_hids_keyboard software.

So can you tell, where I miss?

nrf51822 EK Softdevice 7.0 SDK6.0

Parents
  • Hi GooTooMoon, The nrf51-ble-app-lbs example was made for SDK v5.2 and softdevice S110 v6.0 as mentioned in the description. Modification needed to port the example to the SDK v6.0 and softdevice S110 v7.0.

    Unfortunately, we haven't got time to do that. I hope we will have the new example updated soon when we have full staff come back from vacation.

    [UPDATE] I have update the example and commit the change here (notice the branch) https://github.com/NordicSemiconductor/nrf51-ble-app-lbs/tree/SDK6.0 What I did was: Update the project setting to match with S110 v7.0 softdevice memory layout. Update main.c following the migration guide (in ble_stack_init() )

  • Hi Hung Bui, In the meantime, could you recommend a stable combination SoftDevice/SDK that we can use with the published code? Or, if you can explain the changes that need to be made to the example so that it will work with SoftDevice v7.0.0/SDK6.0, maybe one of us can update and publish the new code.

    I seem to having a similar problem, with the only difference that "sd_ble_gap_device_name_set" returns error code 0x3001 instead of NRF_SUCCESS.

Reply
  • Hi Hung Bui, In the meantime, could you recommend a stable combination SoftDevice/SDK that we can use with the published code? Or, if you can explain the changes that need to be made to the example so that it will work with SoftDevice v7.0.0/SDK6.0, maybe one of us can update and publish the new code.

    I seem to having a similar problem, with the only difference that "sd_ble_gap_device_name_set" returns error code 0x3001 instead of NRF_SUCCESS.

Children
No Data
Related