I have in my gadget.yaml an entry to connect my snap’s network-control and network-observe plugs, But despite this, these connections are not happening automatically when the device boots or I refresh my gadget snap.
both are system provided interfaces and as such do not need a slot declaration (similar to snap connect where you do not need to define core:network-control (or system:network-control) as target slot) …
also note that the gadget checks interface availability against the snap declaration from the store so the snap in the store needs to have these interfaces.
i.e. you need to have uploaded it with them.
adding an interface to a local build of a snap when this is not known by the store version yet and sideloading this local snap from ubuntu-image wont work …
My bad. I should I have mentioned that my snap is from store.
One interesting thing is auto connection happening when I build full image with ubuntu-image
But when I start with a old gadget and my snap on device and then do a snap refresh for both, auto connections do not happen.