Hi Patrik
I think the most difficult is how to define what is the power means when usb work as rndis mode.

And apply the patch, I test it in my device, found that it is only create a USB gadget network interface when kernel mode loaded even without a cable connected. so ConnMan create a technology with state power off. and then manual
up the interface, technology will power on.

At the same time, rndis is seem can work with enable rndis mode at first without a cable connected and then connect a cable. when I enable rndis first and then connect it with a PC, PC will try to generate a ip via dhcp, as there is not dhcp server listen it. pc will not obtain the IP address. Of course, I not should whether what I do is reasonable.

At the same time, I not should also what we can do if usb works as rndis mode with interface up and tethering off.

Best Regards
Guoqiang

On 12/18/2013 05:12 PM, Patrik Flykt wrote:
        Hi,

On Fri, 2013-12-06 at 12:27 +0800, Guoqiang Liu wrote:
From: "guoqiang.liu" <[email protected]>

Gadget technology will not update despite gadget interface state
changed. at the same times, the gadget interface will not up/down
even enable/disable gadget technology.

Here initiative up/down the interface when enable/disable gadget
technology, and monitor rtnl message to update gadget technology
power state.
Ethernet works such that it detects a carrier signal, i.e. the ethernet
cable is connected to another device, and therefore enables the device
in response. Devices of other technologies don't have such properties
and therefore do not get enabled automatically.

I think this patch intends to do the same as ethernet for USB gadget
interfaces when a cable is connected. Unfortunately this patch will
always enable the USB gadget interface whenever the kernel module is
loaded, also without a cable connected. So there is a difference in how
USB works, I don't know for sure whether USB gadget reporting interface
up without a cable connected is a bug or an intended feature.

In cases where PersistentTetheringMode is set, merely loading a kernel
module will cause gadget to start tethering and looks somewhat silly
without a cable attached. This needs some more thinking, does anyone
have any useful insights into this matter?

Cheers,

        Patrik



_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to