Auto init in OpenThread

Dear RIOTers,

I’m currently finishing the OpenThread port (#5552).

The implementation is radio independent via netdev, but requires the driver setup function to be called before passing the netdev pointer to the OpenThread contrib (check what I’m doing atm in 1).

The auto_init_xxxx functions like 2 do exactly that, but call gnrc_netdev related functions instead of OpenThread related functions.

What’s your opinion on how to deal with this? (e.g #ifdef MODULE_OPENTHREAD in auto_init_xxxx file?)

Jose

Hi Jose, that is exactly the same problem Shugou currently has with lwMAC [1] and I had when porting lwIP and emb6. When we originally wrote the auto-initialization we had cases like this (different stacks, different MAC protocols) in mind, but refrained from providing a solution since it simply wasn’t needed at the time. So I guess the time to come together and come up with a solution is now, unless we want to let auto_init_xxxx become our next sys/transceiver [2] ;-).

Cheers, Martine

[1] https://github.com/RIOT-OS/RIOT/pull/6554#discussion_r113234821 [2] https://github.com/RIOT-OS/RIOT/blob/044d3c704e62578a24e0676daeb2943ffa137a56/sys/transceiver/transceiver.c

Hi,