Dear all,
I'm trying to develop Apple Nearby Interaction with nRF52840-DK using a DWM3000EVB. I'm using the software provided by Qorvo which is compatible and tested on nRFSDK 16.
Using SEGGER Embedded Studio 6.30 I managed to build the code (despite the well known SEGGER_RTT_Syscalls_SES.c bug ) and the code seems to build.
When I run the code, I get to to
int main(void) { // Initialize modules. log_init(); clock_init(); // Activate deep sleep mode. SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; ble_init((char*)BoardName);
and the code stops at log_init(). Subsequently when I click Continue I get the error.
app: ERROR 7 [NRF_ERROR_INVALID_PARAM] at /Users/uwb.positioning/Downloads/Qorvo_Apple_Nearby_Interaction_Beta_release_1.0-2.0-1/Sources/Accessory/Qorvo_Apple_Nearby_Interaction_1.0.0/Sources/Qorvo/Qorvo_Apple_Nearby_Interaction_beta/Src/Comm/ble/ble.c:187 PC at: 0x00030739
app: End of error report
I managed to trace back the error to ble.c, specifically the function:
/**@brief Function for the GAP initialization. * * @details This function sets up all the necessary GAP (Generic Access Profile) parameters of the * device including the device name, appearance, and the preferred connection parameters. */ static void gap_params_init(char *gap_name) { static ret_code_t err_code; ble_gap_conn_params_t gap_conn_params; ble_gap_conn_sec_mode_t sec_mode; BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode); err_code = sd_ble_gap_device_name_set(&sec_mode, (const uint8_t *)gap_name, strlen(gap_name)); APP_ERROR_CHECK(err_code); err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT); APP_ERROR_CHECK(err_code); memset(&gap_conn_params, 0, sizeof(gap_conn_params)); gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL; gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL; gap_conn_params.slave_latency = SLAVE_LATENCY; gap_conn_params.conn_sup_timeout = CONN_SUP_TIMEOUT; err_code = sd_ble_gap_ppcp_set(&gap_conn_params); APP_ERROR_CHECK(err_code); }
How come the BLE gets the wrong gap parameters? Can someone help me through it.
The NearbyInteraction precompiled .hex file for nRF52840 works well, but I would like to implement my own logic on board.
Thank you in advance for your help