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

Merging Central and Peripheral functionality into file

Hi,

I am using an NRF 51422 DK, SDK 12.3, and Soft Device S130. I am also a beginner to development with Nordic Products, and RSSI collection in general. I am using the ble_peripheral -> ble_app_uart example as a foundation to slowly build upon more and more. Initially, I was trying to calculate RSSI values and have them print to a Terminal. Once I found success with that, I wanted to try and combine central and peripheral roles into one main file.

Eventually I want to try and attempt to have the board alternate between roles at specific given times. For now however, my goal is to implement all functionality from the ble_app_uart_c example into the peripheral example and use a pre defined variable and conditionals to set which role the board takes. I feel like I have looked over both projects and made sure everything is implemented appropriately.

None of the code from the central example should be interfering with the peripheral functionality, given how I set it up. While that should be the case, nothing seems to be printing to the terminal at all. The code builds with no errors or warnings, so I am stumped on how to trouble shoot this further.

I have uploaded my project below, if anyone can give some insight into why nothing is printing at all, that would be much appreciated.

Thanks!

Things of note:

I have both BLE_NUS_ENABLED and BLE_NUS_C_ENABLED set to 1

I have also added BLE_DB_DISCOVERY_ENABLED and set that to 1

Related