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
  • Using the S130 and S120 should be very similar. The main difference is that the S120 can't be peripheral and central at the same time. So where you get beacon's RSSI, peer address and UUID should be implemented very similarly, if not equal to the way you have done with S120.

    With S130 you don't need to switch, just start advertising after you have started scanning, if you only want to advertise stop scanning first.

    I will not make sample code for this. It doesn't seem to me that you have actually tried yourself. If you have, please include what exactly isn't working, where you are stuck, and I will try to help you.

    You don't need to "switch", just do them both at the same time.

Reply
  • Using the S130 and S120 should be very similar. The main difference is that the S120 can't be peripheral and central at the same time. So where you get beacon's RSSI, peer address and UUID should be implemented very similarly, if not equal to the way you have done with S120.

    With S130 you don't need to switch, just start advertising after you have started scanning, if you only want to advertise stop scanning first.

    I will not make sample code for this. It doesn't seem to me that you have actually tried yourself. If you have, please include what exactly isn't working, where you are stuck, and I will try to help you.

    You don't need to "switch", just do them both at the same time.

Children
No Data
Related