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

How do I make receiver application which scans the beacons in the vicinity ?

I have developed a beacon application which transmits the required data from an analog device. I want one more application which scans the transmitted information from the transmitter beacon . So basically we can call it as multiple beacon scanner or receiver . Is there any document related to this task ? 

  • Thanks . Can you please let me know the examples which use Scan Report Events.

  • Go on.

    You said you've used the ble_app_multilink_central - it has to use the events to know when it's seen an Advertisement!

    Hint: look for functions with names suggesting  "event handler" ...

    Use RTT or UART to put out log messages so that you can see what's happening.

  • So u mean I need to add ble_advertising.c , ble_conn_state.c , ble_db_discovery.c from ble_app_multilink central in my receiver project ? I see that the Multilink_central scans for the device name . Such as Nordic_Blinky . I need to change it as per my beacon name. 

    My beacon name shows N/A(Nordic) . What do I give as input for scanning device name ?

  • Hi,

    Jaydev Borkar said:
    So u mean I need to add ble_advertising.c , ble_conn_state.c , ble_db_discovery.c from ble_app_multilink central in my receiver project ?

    I do not see why you would need to add these files for a simple scanner. I am not 100% sure what you are asking for. If you want a very simple BLE scanner example, you can refer to for instance this post. This does not use the SDK can module, so you have to do filtering yourself (which may be simpler).

    Jaydev Borkar said:
    My beacon name shows N/A(Nordic) . What do I give as input for scanning device name ?

    You can filter on any information that is in the advertising packet. If you put the name (which you have not done in this case), then you can filter on that. Or you can filter on some UUID. Or you can filter on MAC address. Or just some other part of the advertising data that makes sense in your case. It is application dependent and up to you.

  • So u mean I need to add ble_advertising.c , ble_conn_state.c , ble_db_discovery.c from ble_app_multilink central in my receiver project ?

    Not necessarily.

    I mean that you need to spend time studying the code in the Multilink example (or any other example) to see how it handles the advertising events, and how to access the data in them.

    From there, you can work out what you need to do in your own application.

    If you're just doing a beacon scanner, you won't be connecting - so highly unlikely that you'll need anything from ble_conn_state.c or ble_db_discovery.c !

Related