Patrik wrote:
> On Wed, 2015-10-14 at 17:53 +1100, Craig McQueen wrote:
> > I am working on a system where a USB dongle is used for Wi-Fi
> > functionality. The Wi-Fi can be used in client or access point mode,
> > configurable. However, it seems it's not possible to enable/disable
> > tethering mode while the USB Wi-Fi device is not currently plugged in.
> > E.g.:
> > 
> >     # connmanctl tether wifi off
> >     Error disabling wifi tethering: Method "SetProperty" with
> > signature "sv" on interface "net.connman.Technology" doesn't exist
> > 
> > What options would there be for enabling/disabling tethering, while
> > the Wi-Fi device is not currently plugged in?
>
> If this dongle is the only WiFi device, removing it will cause the
> technology to disappear as there are no devices this specific technology
> is able to control. So no options for this, but see
> TetheringTechnologies and PersistentTetheringMode in main.conf if the
> use case is such that tethering state needs to be remembered.

I'm setting PersistentTetheringMode = true in /etc/connman/main.conf. I'm also 
providing an initial /var/lib/connman/settings which contains parameters for 
WiFi tethering enabled. So when a user plugs in a Wi-Fi USB dongle, it goes 
into tethering mode automatically.

However, when the Wi-Fi dongle is not plugged in, the D-Bus interface gives no 
indication that persistent tethering is enabled, and gives no ability to 
disable it.

Perhaps if persistent tethering mode is saved, then the technology should 
continue to be visible, albeit with some property that indicates hardware isn't 
available.  E.g. Tethering = True, Powered = False, Hardware = False. Or 
something like that. Then it should be possible to at least disable the 
persistent tethering.

Similarly, I reckon it should be possible to see that configuration exists for 
a Wi-Fi network, and to remove it ("forget network"), even when the hardware 
isn't currently present or the network isn't currently detected. That is, all 
previously configured services should always appear in the list of services, 
with some property that indicates it isn't connected. E.g. Strength = 0, State 
= absent. Or something like that.

Another note: I notice that Connected = False when tethering is enabled and 
operational. I'm not sure what the rationale is for that, but perhaps that 
could be changed to Connected = True to clearly indicate when tethering is both 
enabled and operational.

-- 
Craig McQueen

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to