Hi,

On Mon, 2015-10-12 at 14:26 +0000, John Ernberg wrote:

> I'm using Connman in an embedded environment where a device will connect 
> to us over USB, this device will provide an ethernet interface on the 
> USB port, and the device will be in gadget mode.
> Thus when they connect to us we load the cdc_ether driver and create an 
> Ethernet interface over the USB port.
> 
> Being completely new to tethering in Connman and how it works, I'm 
> having some issues setting up Connman to provide a DHCP server on this 
> interface so the other device will receive an IP automatically once it 
> starts a DHCP client.

If I understood the above thing correctly, ConnMan runs on a device that
has a USB client and ConnMan needs to set up a DHCP server on it? This
is achieved by ensuring that both 'gadget' technology and 'gadget'
tethering are enabled. Also verify that the interface is not listed
in /etc/connman/main.conf NetworkInterfaceBlacklist option and that
'gadget' is either listed in TetheringTechnologies or
TetheringTechnologies is unset.

Now that the 'gadget' technology has been enable once, ConnMan will
remember its enabled state over reboots. With that in mind, one can then
set PersistentTetheringMode to true in /etc/connman/main.conf. This
preserves tethering state for all technologies over reboot, including
'gadget'.

If it is the opposite, i.e. ConnMan runs on the USB host end, the
procedure is the same, but the technology is instead 'ethernet'. This
affects the all ethernet devices on the machine, as USB ethernet dongles
are indistinguishable from internal PCI connected ones.

The networks that show up as services are the ones where ConnMan is a
end host/client. Tethering creates a local network bridge, 'tether', and
starts a DHCP server on it. The tethered network does not show up as a
service, as it is not an upstream connection.

> I have googled and read the documentation but I cannot figure out how to 
> do this properly.
> The current method on the server side is to enable the gadget-technology 
> when it shows up, configure an IP, netmask and gateway, and then enable 
> tethering on it. Which results in the services not being listable, and 
> no IP being given to the other side. If I run ifconfig on my side, the 
> interface is up, but unconfigured.

Here I lost track of which device is which. Please check the above and
see if that fixes your problem.

Cheers,

        Patrik

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

Reply via email to