Patrik, Sorry for the delay, Glenn asked me to test this. Please see the results from testing with your patch below.
On Fri, Mar 28, 2014 at 2:52 AM, Patrik Flykt <[email protected]>wrote: > On Thu, 2014-03-27 at 14:31 -0400, Glenn Schmottlach wrote: > > > Just be to clear, the behavior you are expecting to see is that all > > Gadget related services "disappear" when tethering is enabled, > > correct? > > Yes. > > > I haven't used the offered tethering feature before (e.g. my > > patches allow ConnMan to configure and manage USB Gadget interfaces as > > a service - akin to wired ethernet) so I'm not completely sure of the > > setup. > > > > Is the idea that if Connman has a Gadget USB interface configured > > locally (so it appears as a ConnMan service), merely invoking: > > > > # connmanctl gadget on > > > > will cause the USB Gadget service to disappear? Is this the behavior I > will see? > > If the techology was powered off, connmanctl enable gadget will turn on > gadget technology and make a gadget service appear (only when a cable is > connected, we hope). > Yes, this is true. It also only shows up with the cable connected as you had hoped. > > connmanctl tether gadget on will enable tethering for the gadget device > and the gadget service will now disappear. We really can't have a gadget > service hanging around if gadget tethering is enabled as there is only > one IP link over the USB cable. It really can't be shared between > client/service and server/tethering roles. (the only example of the > opposite is Bluetooth, but there the whole thing was properly defined in > the first place). > > Yes, this works as you described. > connmanctl tether gadget off should restore the gadget service, but the > results may deviate a bit depending on what rtnl messages in which order > the kernel actually sends. Exiting e.g. ethernet tethering needs a cable > unplug/plug in to make proper things happen, this behavior is for > further study and if someone wants to fix it, go ahead... :-) > > Yes, this works as you described. When gadget tethering was disabled the service was restored. With the cable still connected it restored the complete connection and IP address. Ship it :-) > > Cheers, > > Patrik > > > _______________________________________________ > connman mailing list > [email protected] > https://lists.connman.net/mailman/listinfo/connman > _______________________________________________ connman mailing list [email protected] https://lists.connman.net/mailman/listinfo/connman
