Hi,
I've been developing software that uses pc-ble-driver and a PCA10040 devkit to act as a central. My software is based off the heart rate v5 example written in C, and the SD API v5 connectivity firmware is on the devkit. This software is working in our dev environment that uses the devkit. I'm attempting to port my C++ software to an embedded board running OpenWrt on a WiFi chip that communicates with a NRF52832 chip. I've cross-compiled my OpenWrt package, and my software is running on the OpenWrt device.
Oddly, we get an NRF_ERROR_INVALID_STATE on the OpenWrt device when running sd_ble_cfg_set. This function returns NRF_SUCCESS in our development environment. According to the documentation, this error returns when the BLE stack has already been initialized. In our case, what does this mean? Is it possible other software initialized the ble stack prior to our call? Note that this same error appears in the heartrate collector v5 example!
Further, we're unable to connect to devices on our production board. We receive error 3e: BLE_HC_CONN_FAILED_TO_BE_ESTABLISHED. I suspect its possible this is linked to the issue above. This also isn't an issue in our dev environment. We have successfully connected to peripherals and discovered services and characteristics. We are able to scan and handle adv reports on the production board.
Is it also possible the firmware on the NRF52832 chip on our production board (where we have issues) is a different and unexpected version (say, v3 instead of v5)? According to our production board vendor, the firmware on the chip comes "burned from the (Nordic's) factory."