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]?

  • 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.
     */
    
  • When some advertiser_packet_send() is called, I want to know how to behave.

    I try it. advertise interval is 100ms.

    first call is set to '5 count'. second call is set to '10 count'.

    first packet is send 5-advertises per 100ms(total 500ms)

    next,

    second packet is send 10-advertises per 100ms(total 1000ms)

    It'is correct?

  • You need to check for tx complete call back to make sure that the advertising packets are sent. But could you explain what you are planing to do ?

  • Thank you.

    I plan that merge NRFMESH and own proprietary MESH library.

    Own MESH library send advertise by 'varius-interval'.

    So that, I want to understand NRFMESH send scheduling.

Related