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

Gazell MAC Address

Is there a similar way tot get the radio's MAC address when using Gazell only (no BLE)?

In SoftDevice there is a "sd_ble_gap_address_get()" function call.

Parents
  • Hi,

    The RF address in bluetooth (MAC) is different from the RF address in gazell, in terms of the length and build-up.

    To get/set the RF address in gazell, you need to use the functions given by the gazell API: developer.nordicsemi.com/.../a00955.html

    Here are the functions you're looking for (snippet from nrf_gzll.h):

    /**
     * @brief Set the base address for pipe 0.
     *
     * The full on-air address for each pipe is composed of a multi-byte base address
     * prepended to a prefix byte.
     *
     * For packets to be received correctly, the most significant byte of 
     * the base address should not be an alternating sequence of 0s and 1s i.e. 
     * it should not be 0x55 or 0xAA. 
     *
     * @param base_address The 4 byte base address. All bytes are used.
     *
     * @retval true  If the parameter was set.
     * @return false If Gazell was enabled.
     */
    bool nrf_gzll_set_base_address_0(uint32_t base_address);
    
    
    /**
     * @brief Get function counterpart to nrf_gzll_set_base_address_0().
     *
     * @return Base address 0.
     */
    uint32_t nrf_gzll_get_base_address_0(void);
    
    
    /**
     * @brief Set the base address for pipes 1-7.
     *
     * Pipes 1 through 7 share base_address_1. @sa nrf_gzll_set_base_address_0.
     *
     * @param base_address The 4 byte base address.
     *
     * @retval true  If the parameter was set.
     * @retval false If Gazell was enabled.
     */
    bool nrf_gzll_set_base_address_1(uint32_t base_address);
    
    
    /**
     * @brief Get function counterpart to nrf_gzll_set_base_address_1().
     *
     * @return Base address 1.
     */
    uint32_t nrf_gzll_get_base_address_1(void);
    
    
    /**
     * @brief Set the address prefix byte for a specific pipe.
     *
     * Each pipe should have its own unique prefix byte. 
     *
     * @param pipe                The pipe that the address should apply to.
     *                            This value must be < NRF_GZLL_CONST_PIPE_COUNT. 
     * @param address_prefix_byte The address prefix byte.
     *
     * @retval true  If the parameter was set.
     * @retval false If Gazell was enabled, or if the pipe was invalid.
     */
    bool nrf_gzll_set_address_prefix_byte(uint32_t pipe, uint8_t address_prefix_byte);
    
    
    /**
     * @brief Get function counterpart to nrf_gzll_set_address_prefix_byte().
     *
     * @param pipe                    The pipe for which to get the address.
     *                                This value must be < NRF_GZLL_CONST_PIPE_COUNT.
     * @param out_address_prefix_byte The pointer in which to return the 
     *                                address prefix byte.
     * 
     * @retval true If the parameter was returned.
     * @retval false If Gazell was enabled, the pipe was invalid or 
     *               out_address was a NULL pointer.
     */
    bool nrf_gzll_get_address_prefix_byte(uint32_t pipe, uint8_t* out_address_prefix_byte);
    
Reply
  • Hi,

    The RF address in bluetooth (MAC) is different from the RF address in gazell, in terms of the length and build-up.

    To get/set the RF address in gazell, you need to use the functions given by the gazell API: developer.nordicsemi.com/.../a00955.html

    Here are the functions you're looking for (snippet from nrf_gzll.h):

    /**
     * @brief Set the base address for pipe 0.
     *
     * The full on-air address for each pipe is composed of a multi-byte base address
     * prepended to a prefix byte.
     *
     * For packets to be received correctly, the most significant byte of 
     * the base address should not be an alternating sequence of 0s and 1s i.e. 
     * it should not be 0x55 or 0xAA. 
     *
     * @param base_address The 4 byte base address. All bytes are used.
     *
     * @retval true  If the parameter was set.
     * @return false If Gazell was enabled.
     */
    bool nrf_gzll_set_base_address_0(uint32_t base_address);
    
    
    /**
     * @brief Get function counterpart to nrf_gzll_set_base_address_0().
     *
     * @return Base address 0.
     */
    uint32_t nrf_gzll_get_base_address_0(void);
    
    
    /**
     * @brief Set the base address for pipes 1-7.
     *
     * Pipes 1 through 7 share base_address_1. @sa nrf_gzll_set_base_address_0.
     *
     * @param base_address The 4 byte base address.
     *
     * @retval true  If the parameter was set.
     * @retval false If Gazell was enabled.
     */
    bool nrf_gzll_set_base_address_1(uint32_t base_address);
    
    
    /**
     * @brief Get function counterpart to nrf_gzll_set_base_address_1().
     *
     * @return Base address 1.
     */
    uint32_t nrf_gzll_get_base_address_1(void);
    
    
    /**
     * @brief Set the address prefix byte for a specific pipe.
     *
     * Each pipe should have its own unique prefix byte. 
     *
     * @param pipe                The pipe that the address should apply to.
     *                            This value must be < NRF_GZLL_CONST_PIPE_COUNT. 
     * @param address_prefix_byte The address prefix byte.
     *
     * @retval true  If the parameter was set.
     * @retval false If Gazell was enabled, or if the pipe was invalid.
     */
    bool nrf_gzll_set_address_prefix_byte(uint32_t pipe, uint8_t address_prefix_byte);
    
    
    /**
     * @brief Get function counterpart to nrf_gzll_set_address_prefix_byte().
     *
     * @param pipe                    The pipe for which to get the address.
     *                                This value must be < NRF_GZLL_CONST_PIPE_COUNT.
     * @param out_address_prefix_byte The pointer in which to return the 
     *                                address prefix byte.
     * 
     * @retval true If the parameter was returned.
     * @retval false If Gazell was enabled, the pipe was invalid or 
     *               out_address was a NULL pointer.
     */
    bool nrf_gzll_get_address_prefix_byte(uint32_t pipe, uint8_t* out_address_prefix_byte);
    
Children
No Data
Related