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

how to use multiple advertiser_packet_send() on nrfmesh

I run follow,

advertiser_t m_adv;

adv_packet_t m_packet[2];

m_packet[0] = advertiser_packet_alloc(&m_adv, 10);

advertiser_packet_send(&m_adv, &m_packet[0]);

m_packet[1] = advertiser_packet_alloc(&m_adv, 20);

advertiser_packet_send(&m_adv, &m_packet[1]);

Is work successful?

And,

How work scheduling m_packet[0] and m_packet[1]?

Parents
  • Could you elaborate more on what exactly you want to do ? What is the content of data you want to advertise ? Are you following Bluetooth Mesh or you want to create your own mesh protocol ?

    As described in the description of advertiser_packet_send, I don't see any problem here.

    /**
     * Sends a given packet using the given advertiser instance, this can be called multiple times
     * without having to wait for a tx_complete (@see advertiser_tx_complete_cb_t) on the previous
     * packets.
     *
     * @note       Once the packet is sent successfully, the @c tx_complete_callback in the @c p_adv
     *             will be called with @c p_packet and @c p_adv as parameters to the callback.
     *
     * @param[in,out] p_adv     An already initialized advertiser instance.
     * @param[in,out] p_packet  A valid packet that was allocated using @ref advertiser_packet_alloc, and
     *                          the the same advertiser instance as given to this function.
     */
    
Reply
  • Could you elaborate more on what exactly you want to do ? What is the content of data you want to advertise ? Are you following Bluetooth Mesh or you want to create your own mesh protocol ?

    As described in the description of advertiser_packet_send, I don't see any problem here.

    /**
     * Sends a given packet using the given advertiser instance, this can be called multiple times
     * without having to wait for a tx_complete (@see advertiser_tx_complete_cb_t) on the previous
     * packets.
     *
     * @note       Once the packet is sent successfully, the @c tx_complete_callback in the @c p_adv
     *             will be called with @c p_packet and @c p_adv as parameters to the callback.
     *
     * @param[in,out] p_adv     An already initialized advertiser instance.
     * @param[in,out] p_packet  A valid packet that was allocated using @ref advertiser_packet_alloc, and
     *                          the the same advertiser instance as given to this function.
     */
    
Children
No Data
Related