Hi, pon., 27 sty 2020 o 22:27 Rafał Gajda <rafal.gajda@xxxxxxxxxxx> napisał(a): > > It looks like sequence number is correctly incremented when calling > DevKeySend but it isn't incremented at all when ConfigModel sends the > reply back. I think the culprit is in mesh/net.c in mesh_net_app_send() line 3160: > /* First enqueue to any Friends and internal models */ > result = msg_rxed(net, false, iv_index, ttl, > seq + seg_max, > net_idx, > src, dst, > key_aid,szmic, seq & SEQ_ZERO_MASK, > msg, msg_len); > > /* If addressed to a unicast address and successfully enqueued, > * or delivered to one of our Unicast addresses we are done > */ > if ((result && IS_UNICAST(dst)) || src == dst || > (dst >= net->src_addr && dst <= net->last_addr)) { > /* Adjust our seq_num for "virtual" delivery */ > net->seq_num += seg_max; > return true; > } When sending the message we first deliver it to internal models and only after that we increment the msg sequence number. If we do "net->seq_num += seg_max" before calling msg_rxed() then messages are delivered correctly. -- Rafał Gajda Silvair Sp. z o.o.