USB tethering issues

Lucas, GuillaumeX guillaumex.lucas at
Thu Jan 27 07:25:17 PST 2011

Hi Martin,

> I look through the code and find that I forget to push a updated patch.
> Just pushed, you can patch it and try whether it can work. THX!

I've updated my code with your patch. It's better as now the __connman_technology_add_interface() is called. But it's always failed for the USB tethering :(
When I run the enable-tethering script, the set_tethering function of the plugin/ethernet.c file is not called. 

As suggested by Samuel in offline I've added the following debug traces:

diff --git a/src/technology.c b/src/technology.c
index ff1cf78..f882728 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -159,12 +159,18 @@ void __connman_technology_add_interface(enum connman_servi
        for (list = technology_list; list; list = list->next) {
                struct connman_technology *technology = list->data;

+               DBG("Techno type %d (%d) driver %p",
+                       technology->type, type, technology->driver);
                if (technology->type != type)

                if (technology->driver == NULL)

+               DBG("Techno add interface %p",
+                       technology->driver->add_interface);
                if (technology->driver->add_interface)
                                                        index, name, ident);

Here is what I've seen when I plug my USB gadget:

connmand[1664]: src/ipconfig.c:__connman_ipconfig_newlink() index 2
connmand[1664]: usb0 {RX} 1 packets 76 bytes
connmand[1664]: usb0 {TX} 0 packets 0 bytes
connmand[1664]: usb0 {newlink} index 2 address 66:F6:1B:3F:03:A2 mtu 1500
connmand[1664]: usb0 {newlink} index 2 operstate 6 <UP>
connmand[1664]: src/detect.c:detect_newlink() type 1 index 2
connmand[1664]: Create interface usb0 [ gadget ]
connmand[1664]: src/technology.c:__connman_technology_add_interface() Techno type 6 (9) driver (nil)
connmand[1664]: src/rtnl.c:rtnl_message() buf 0xbfd38610 len 156
connmand[1664]: src/rtnl.c:rtnl_message() NEWROUTE len 156 type 24 flags 0x0000 seq 0
connmand[1664]: src/device.c:device_scan_trigger() device 0x997c5c0
connmand[1664]: src/rtnl.c:rtnl_message() buf 0xbfd38610 len 64

So, there is no driver found for the USB gadget technology in the technology_list when we called src/technology.c:__connman_technology_add_interface(). My opinion is that there is somewhere a step who is missing: the adding of the gadget technology to the technology_list.

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.

More information about the connman mailing list