USB tethering issues

Lucas, GuillaumeX guillaumex.lucas at
Fri Jan 21 08:04:24 PST 2011


I'm currently trying to test the USB tethering with connman-0.65.
I'm facing some issues and I'll appreciate your help.

If I take connman-0.65 and do not make changes on it I'm not able to correctly handle the USB gadget connection because the CONNMAN_DEVICE_TYPE_GADGET is not registered. To fix this I've added a new gadget driver in the ethernet plugin:

static struct connman_device_driver gadget_driver = {
	.name		= "gadget_a_moi",
	.probe		= ethernet_probe,
	.remove		= ethernet_remove,
	.enable		= ethernet_enable,
	.disable	= ethernet_disable,

And registered it in the ehternet_init function. With this change, the USB gadget is correctly detected by connman and an IP address is automatically assigned to it.

But for the tethering, nothing works. When I try to enable the tethering the ethernet.c:enable_tethering function is correctly called but do nothing because the cdc_interface_list is empty. This could be explain by the fact that the tech_add_interface() function is never called.

What I've understand is that the tech_add_interface() is called by the __connman_technology_add_interface() when there is a new link event and if the type of service is already present in the technology_list. In the traces that I've, it's never the case. The technology_list do not contains yet the GADGET services when we call the __connman_technology_add_interface() function.

I'm newbie with connman and my knowledge of its code not yet very well, so any help is welcome.

In attach the log that I've taken, if this could help:
	- start.txt: manual starting of connman (there is no kernel module USB loaded)
	- load_mod.txt: loading of the g_ether kernel module
	- plug.txt: plug of the USB gadget

Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: load_mod.txt
URL: <>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: plug.txt
URL: <>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: start.txt
URL: <>

More information about the connman mailing list