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

reading RSSI and MAC address

Hello there,

I am using multilink_central example on nrf51822 Soc, and I charged S120 in the memory. I am trying to get the RSSI and the MAC address without getting connected to the peripheral. So I modified the on_ble_evt() function like in the attachement , and I modified in some other places where I made the //******* mark. There is a nrf Beacon that is advertising. I am not getting any MAC address, nor RSSI. I would like to know if I programmed right or not. I am using SDK v6.1, and S120 v2.0. When running the original multilink_central example, I can't get BLE_GAP_EVT_ADV_REPORT.

ble_app_multilink_central.rar

  • What is happening? How are you testing this? Have you used the debugger? If not use it, and put a breakpoint in BLE_GAP_EVT_ADV_REPORT. You might have to turn off optimizations in Target for Options->C/C++ tab.

  • Hi Petter,

    In fact I am following the rssi value and the address variable in the memory through the debugger. But till now I cannot get the value of rssi, and neither the MAC address. When I put a breakpoint in BLE_GAP_EVT_ADV_REPORT and run, the program never stop.

  • If you load ble_app_multilink_central unmodified, do you get to BLE_GAP_EVT_ADV_REPORT? What version of the SDK and what version of the SoftDevice are you using? Please upload your complete project (not just main.c) so I can test it here.

  • In the scan_start() function, the count variable is always 1, so I can't launch the sd_ble_gap_scann_start().

  • S120 2.0.0 is not compatible with SDK 6.1.0, S120 2.0.0 is not even compatible with the latest SDK 7.2.0, it is too fresh. But SDK 7.2.0 will be more adapted to the SoftDevice API, it can be downloaded here. To see what is compatible with what, please see Page 6 in nRF51_Series_compatibility_Matrix, found here.

    I suggest you start out with a ble_app_multilink_central application that triggers BLE_GAP_EVT_ADV_REPORT before you do anything else. Please use S120 1.0.0 and SDK7.2.0, Then you can update your application to S120 2.0.0 when it has a compatible SDK release.

Related