<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Setting NETWORK_TRANSMIT_COUNT , config_publication_state_t and access_publish_period_t makes no difference!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72684/setting-network_transmit_count-config_publication_state_t-and-access_publish_period_t-makes-no-difference</link><description>Hello to all, 
 (If &amp;quot;TLDR&amp;quot; go to &amp;quot;### TLDR ###&amp;quot; in the bottom of the page, where you&amp;#39;ll find the straight questions without all the context... ) Me and my team are using the nRF5 SDK 16.0.0_98a08e2 together with nrf5 SDK for Mesh v4.2.0 and the latest</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 May 2021 16:21:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72684/setting-network_transmit_count-config_publication_state_t-and-access_publish_period_t-makes-no-difference" /><item><title>RE: Setting NETWORK_TRANSMIT_COUNT , config_publication_state_t and access_publish_period_t makes no difference!</title><link>https://devzone.nordicsemi.com/thread/312453?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 16:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:454f528b-a88c-4e99-b5b8-ecd9d08b180d</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. Correct. The network layer implements a message cache, so a message will be filtered out if the seqnum is in the cache (&lt;a href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_packet.c#L128-L137"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_packet.c#L128-L137&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;2. Retransmissions of relayed packets is controlled by Relay Retransmit state (section 4.2.20 of the mesh specification). NETWORK_TRANSMIT_COUNT doesn&amp;#39;t affect this. To control this, you need to call config_client_relay_set. The default value can be changed through CORE_TX_REPEAT_RELAY_DEFAULT.&lt;/p&gt;
&lt;p&gt;2.1. If the message&amp;#39;s SeqNum is in the cache, it won&amp;#39;t be relayed the second time, so this is correct. But the amount of re-transmissions of the relayed packed can be configured separately through Relay Retransmit state.&lt;/p&gt;
&lt;p&gt;3. The original message (access PDU) is re-transmitted with different SeqNum, so they will be treated by the relaying nodes as a different message, that is correct.&lt;br /&gt;Just for the note. To avoid message&amp;#39;s duplication at the access layer, some models implement a field called as Transaction Identifier (TID) (see section 1.4.2.1 of the mesh model spec).&lt;/p&gt;
&lt;p&gt;3.1. The relaying node will forward the relayed packet the amount of times defined by Relay Retransmit state. The default value defined in CORE_TX_REPEAT_RELAY_DEFAULT and it is 1.&lt;/p&gt;
&lt;p&gt;4. Correct. There will be 3 messages with different SeqNum that are retransmitted 3 times. And then relayed the amount of times defined in Relay Retransmit state.&lt;/p&gt;
&lt;p&gt;5. We are working on such paper right now. But maybe this one could give more insights: &lt;a href="https://ieeexplore.ieee.org/document/9035389"&gt;ieeexplore.ieee.org/.../9035389&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting NETWORK_TRANSMIT_COUNT , config_publication_state_t and access_publish_period_t makes no difference!</title><link>https://devzone.nordicsemi.com/thread/311902?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 17:35:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:478cf10a-4bd7-4e7a-b0be-743943d39377</guid><dc:creator>EAn</dc:creator><description>&lt;p&gt;Greetings to @all and &lt;a href="https://devzone.nordicsemi.com/members/mttrinh"&gt;Mttrinh&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;I finally made it to revisiting this post and looking with more attention to these settings. A few doubts have emerged, and I would be very grateful if you or someone knowledgable could help shed light into the matter.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;All messages repeated due to the NETWORK TRANSMIT COUNT should have the same sequence number, therefore other nodes will treat the repetitions as the same message and will discard any replays. Correct?&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Does the NETWORK TRANSMIT COUNT affect all PDUs/messages in the network, including when they are being relayed?
&lt;ol&gt;
&lt;li&gt;I guess they would be relayed only once since the sequence number is the same for all messages re-transmitted at the network level. That is, if it is set to 2, then the messages will be transmitted 3 times by the source element, and they will always be relayed once by the relaying nodes. Correct?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Another thing I didn&amp;#39;t quite understand is: the Re-transmit Count, forces the access layer of the sender element and model instance to send the message 1+Packet Retransmit Count times. However, only the sender gets to do that, right? The relaying nodes forward each repeated message once, but since the original message was re-transmitted with a different SEQ num, they will be treated by the relaying nodes as a different message. correct?
&lt;ol&gt;
&lt;li&gt;Therefore, each relaying node will forward once each transmitted PDU. Am I wrong?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Finally, What is the sum effect of having both of these variables set? Take the following configuration scenario:
&lt;ol&gt;
&lt;li&gt;NETWORK TRANSMIT COUNT = 2&lt;br /&gt;generic_on_off retransmit_count = 2&lt;br /&gt;Does that mean that each message will be transmited 3 times by the network layer, and 3 times by the access layer, therefore 3x3 = 9 times in total for each PDU!?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Can anyone please point me to a good-practice manual/reference guide for bluetooth mesh tunning!? In my experience a small network has a very different set of needs from a big network (above 10 nodes). I&amp;#39;m losing more packets as the number of nodes grows in the network....&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much for making it all the way here! I&amp;#39;m looking forward for all the helpful pointers! If anyone wants to answer partially, please do!&lt;/p&gt;
&lt;p&gt;Best Regards!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting NETWORK_TRANSMIT_COUNT , config_publication_state_t and access_publish_period_t makes no difference!</title><link>https://devzone.nordicsemi.com/thread/302705?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 11:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bf11ce6-7852-484e-bec8-6a1f9da1dbea</guid><dc:creator>EAn</dc:creator><description>&lt;p&gt;Thank you very much Mttrinh! Your reply was indeed very informative and complete. I still have to perform some tweaks and tests with this new knowledge and will reply when I do so! &lt;br /&gt;&lt;br /&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting NETWORK_TRANSMIT_COUNT , config_publication_state_t and access_publish_period_t makes no difference!</title><link>https://devzone.nordicsemi.com/thread/301630?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 10:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8924f9b-d193-4a86-98f4-8bdcd2069d52</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;You send a segmented message with 4 PDUs. The segmentation and reassembly happens at the transport layer. Which means that the whole packet will be split into 4 segments at the transport layer and then will be transferred to the network layer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;transport_packet_in() is called by the network layer, when the packet is received. The also happens when the packet is targeted to a group address which the node is subscribed to (by loopback mechanism). I assume that the destination in&amp;nbsp;your&amp;nbsp;scenario is a group address since you say that p_rx_metadata-&amp;gt;source is set to NRF_MESH_RX_SOURCE_LOOPBACK.&lt;/p&gt;
&lt;p&gt;There needs to be considered that the network layer has a cache (see msg_cache_entry_exists()), which prevents the message with the same sequence number be processed twice.&lt;/p&gt;
&lt;p&gt;upper_transport_tx() in turn is called&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;before&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;the message being sent by the access layer is segmented by the transport layer.&lt;/p&gt;
&lt;p&gt;Two things needs to be clarified now:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;NETWORK_TRANSMIT_COUNT configures number of messages transmissions&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;at the network layer&lt;/em&gt;. In other words, how many times a network PDU with the same sequence number will be transmitted.&lt;/li&gt;
&lt;li&gt;retransmit_count (called RPC by customer) configures the message publication&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;at the access layer.&lt;/em&gt;&amp;nbsp;In other words, how many times an access PDU will be retransmitted.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So e.g. if you have retransmit_count = 1, you will see the message sent twice in upper_transport_tx(). The first one is the original publication and the second one is the republished message.&lt;/p&gt;
&lt;p&gt;In the mean time, no matter how big NETWORK_TRANSMIT_COUNT value is, if the destination of the message is a group address and the node is subscribed to that address, it will see each network PDU only once in transport_packet_in(). Considering the fact that you send a segmented message, you should see it 4 times (since 4 PDUs). Not sure why you see the message 5 times in transport_packet_in(). Probably, the message is split not to 4, but 5 PDUs. You can add log in transport.c::trs_sar_packet_out() to see how many segments in the message.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To the conclusion. To log the incoming and outgoing messages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;at the access layer, use mesh_msg_handle() and nrf_mesh_packet_send() (see access.c);&lt;/li&gt;
&lt;li&gt;at the transport layer, use transport_packet_in() and sar_segment_send() for segmented messages or unsegmented_packet_tx() for unsegmented messages (see transport.c);&lt;/li&gt;
&lt;li&gt;at the network layer, use network_packet_in() and network_packet_send() (see network.c);&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2.a and 2.b: NETWORK_TRANSMIT_COUNT configures number of transmissions of a network PDU&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;at the network layer&lt;/em&gt;&amp;nbsp;while NETWORK_TRANSMIT_INTERVAL_STEPS configures the interval between those transmissions. (see the mesh profile specification v1.0.1, section 4.2.19).&lt;/p&gt;
&lt;p&gt;2.c publish_period configures the interval at which messages are published by a model&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;at the access layer&lt;/em&gt;&amp;nbsp;(see the mesh profile specification v1.0.1, section 4.2.2.2).&lt;/p&gt;
&lt;p&gt;2.d publish_retransmit configures&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;retransmissions&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;of the message&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;at the access layer&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;(see the mesh profile specification v1.0.1, section 4.2.2.6, 4.2.2.7).&lt;/p&gt;
&lt;p&gt;3. This depends on your use case. If you wants to see the message once, you need to set publish_rentrasmit and publish_period to 0, and log the incoming message in mesh_msg_handle() in access.c. I also suggest to try out the nRF5 Mesh mobile app. This may also help to clarify how this works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting NETWORK_TRANSMIT_COUNT , config_publication_state_t and access_publish_period_t makes no difference!</title><link>https://devzone.nordicsemi.com/thread/300990?ContentTypeID=1</link><pubDate>Fri, 19 Mar 2021 15:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d6ac0c5-9381-41da-a80d-6a443eb80a3e</guid><dc:creator>EAn</dc:creator><description>&lt;p&gt;Thank you Mttrinh! It will be very helpful.&lt;br /&gt;Best regards!&lt;/p&gt;
&lt;p&gt;//EA&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting NETWORK_TRANSMIT_COUNT , config_publication_state_t and access_publish_period_t makes no difference!</title><link>https://devzone.nordicsemi.com/thread/300987?ContentTypeID=1</link><pubDate>Fri, 19 Mar 2021 14:57:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84f1fb76-f130-4aae-8d1a-acc3fcfebf64</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the late response.&lt;/p&gt;
&lt;p&gt;I have reached out the team regarding this, will give you an update as soon as I get a response.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>