This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

S120 softdevice, ble_app_hrs_c how to exit from scan_start() to main

main.cI'm using S120 softdevice with nrf51822, I want to use S120 as central and peripheral devices. When I received my beacon data then switch to peripheral for advertise. When I got received beacon data from on_ble_evt then want to exit to main then run advertise. How to exit from scan_start() to main? I suceed to run central and peripheral device using S120 separately.

Parents
  • What do you mean how to exit scan_start() function? Where is it hanging? What example and SDK you use? And most importantly why you don't switch to S130 which is supported in all examples in nRF5 SDK v12.3.0 including such GAP Peripheral + Central? Your question about some jumping indicates that you don't follow basic BLE FW structure for nRF5x platform with Nordic BLE stacks (Soft Device of any flavor) which is pretty much event driven and you shouldn't have anything to do in main function beside some init functions and then waiting for events and interrupts which should be handled in specific handler functions...

Reply
  • What do you mean how to exit scan_start() function? Where is it hanging? What example and SDK you use? And most importantly why you don't switch to S130 which is supported in all examples in nRF5 SDK v12.3.0 including such GAP Peripheral + Central? Your question about some jumping indicates that you don't follow basic BLE FW structure for nRF5x platform with Nordic BLE stacks (Soft Device of any flavor) which is pretty much event driven and you shouldn't have anything to do in main function beside some init functions and then waiting for events and interrupts which should be handled in specific handler functions...

Children
No Data
Related