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

nRF52840 Dongle with Raspberry Pi B+ for Beacon scanning

Team,

For asset tracking I am using nRF52840 Beacons as tags in asserts and Raspberry Pi B+ for scanning Beacon's MAC, UID, Major, Minor, Tx,  and RSSI values.

To calculate Beacon distance with more accuracy I am planning to use 'Channel Diversity' approach, so I want to scan nRF52840 Beacons for any one of specific channel (from 37, 38, 39).  How I can use nRF52840 Dongle along with Raspberry Pi B+ to filter specific channel of nRF52840 Beacon advertisement data.

Ashiq Mohammed

Parents Reply Children
  • Your question is rather confused - you seem to be asking about three different things all at once!

  • Hi.

    I was abit confused about your question, if you want to only scan on one channel:

    Then you have to do the same using the ble_gap_cam_params_t structure. For example:

    Create a structure:

    static ble_gap_scan_params_t m_scan_param; 

    In your static void scan_start(void) function, add:

    m_scan_param.channel_mask[4] = 0x60; //The code i added to mask channel 37 and 38

    Like this:

    /**@brief Function for starting scanning. */
    static void scan_start(void)
    {
        ret_code_t ret;
    
        m_scan_param.channel_mask[4] = 0x60; //The code i added to mask channel 37 and 38
    
        ret = sd_ble_gap_scan_start(&m_scan_param, &m_scan_buffer);
        APP_ERROR_CHECK(ret);
    
        ret = bsp_indication_set(BSP_INDICATE_SCANNING);
        APP_ERROR_CHECK(ret);
    }

    I did this in the example found in nRF5_SDK_15.2.0_9412b96\examples\ble_central\ble_app_uart_c.

    - Andreas

Related