Implementation ideas for rpl ETXOF/MRHOF

Hello,

I'm looking into RPL objective functions for RIOT. My main goal is to extend RIOT-os such that RPL can be used in a practical wireless ad-hoc network.

For now we constructed a temporary setup with a border router and up to four nodes. The problem we ran into with our initial setup is that the parent selection of RIOT only uses the rank. If a node only barely receives a DIO frame from the border router, it will switch the parent to the border router while a lower ranked node is a better choice in terms of link quality or ETX.

My current goal is to implement ETXOF[1] or/and MRHOF[2] as an objective function for RIOT. I realize that this is not an easy task. This way I hope to have a node decide that an incidentally received DIO frame is not the cause of a switch to a worse parent.

Now to implement this I've looked into tracking ETX values within RIOT. How exactly ETX values are calculated I'm still trying to figure out. The first assumption I've made is that the 802.15.4 transceiver used has link layer acks enabled and reports RSSI/LQI and retransmission values. I'm currently looking along the lines of making an initial ETX estimation based on the reported RSSI and LQI. This value can then be adjusted with the retransmission statistics.

In RIOT I was thinking to make a separate array of structs with L2-address and statistics. This table can then be maintained in the gnrc ieee802154 code. The table doesn't have to be that large, maybe equal to the ncache table, but I would have to test how large the table should have. For now I think it doesn't take a lot of code to update entries within table. I haven't thought about what to do if the table is full and a new entry is needed. The RPL functions can then query the table for the required statistics.

My first idea was to add a statistics part into the neighbor cache table, but this looked like a bad idea after some research. The main reason is that a L2-address can occur multiple times in the ncache table.

Now to summarize my questions: - How would you calculate ETX assuming the provided RSSI/LQI and retransmission values? - Is a separate table with L2 statistics the right way(tm) to do this? - Any ideas what to do with entry expiration?

Any comments/questions and remarks about this idea? Your feedback is appreciated :slight_smile:

Best regards, Koen

[1] https://tools.ietf.org/html/draft-gnawali-roll-etxof-01 [2] https://tools.ietf.org/html/rfc6719