Merging hids_keyboard with ble_uart examples

Hello DevZone, I am trying to combine the ble_app_uart with the ble_app_hids_keyboard example.

I have added the necessary libraries from the the uart code into the HIDS code, added include directories in the linker under "common" and the projects builds no issue. When I run it I get:

<error> app: ERROR 7 [NRF_ERROR_INVALID_PARAM]

which directs me to:  advertising_init(), more specifically:

err_code = ble_advertising_init(&m_advertising, &init);

I am snagged here.

I have defined my UUIDs at the top as such:

static ble_uuid_t m_adv_uuids[] = {{BLE_UUID_HUMAN_INTERFACE_DEVICE_SERVICE, BLE_UUID_TYPE_BLE},
                                                        {BLE_UUID_NUS_SERVICE, NUS_SERVICE_UUID_TYPE}};

and I have adjusted the number of vendor specific UUIDs in the sdk_config.h

#define NRF_SDH_BLE_VS_UUID_COUNT 1

I have also made adjustments to the RAM start and RAM size in the linker:

<warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
<warning> nrf_sdh_ble: Change the RAM start location from 0x20002220 to 0x20002230.
<warning> nrf_sdh_ble: Maximum RAM size for application is 0xDDD0.
<error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
<error> app: ERROR 4 [NRF_ERROR_NO_MEM] at

Any suggestions as to where to go from here?

Thank you in advance.

Parents
  • Hi Nathan

    Can you check the sdk_config.h file in your project to see that all UART/NUS defines are set to the same value as in the ble_app_uart examples config file? Do you get any errors when the central and peripheral is connected or does the UART service just not "show up"?

    Best regards,

    Simon

Reply Children
No Data