Hi again Patrik, I decided to tcpdump the connection, just in case that would help. Attached the output below.
Best regards // John Ernberg On 10/15/2015 09:57 AM, John Ernberg wrote: > Hi Patrik, > > On 10/14/2015 03:20 PM, Patrik Flykt wrote: > >> Hi, >> >> On Wed, 2015-10-14 at 13:09 +0000, John Ernberg wrote: >>> All I know is that cdc_ether interfaces shows up as usb0, the eth0 >>> ethernet is a real ethernet port. When looking in /sys/class/net/usb0 >>> it indeed shows up as a gadget in the uevent file. >> This now looks like you are connecting an USB client end on the USB host >> system to a USB client on the USB client system. A USB client - USB >> client connection between two devices won't work. If this is a correct >> interpretation of your setup, the USB controller on the USB host system >> needs to be configured to support USB host and not USB client as it >> looks like its doing now. >> >> I think we need to start drawing figures in ascii art to get the picture >> complete, there are too many USBs in the explanation above... > USB Host USB Gadget > +----------+ +----------+ > | eth0| | | > | ES | USB cable | Dev | > | usb0|------------------|usb0 | > +----------+ +----------+ > cdc_ether g_ether > DHCP Server DHCP Client > > Interface usb0 Always has usb0 > created when DEVTYPE=gadget > gadget is connected > by USB cable. > DEVTYPE=gadget > in uevent file in > /sys/class/net/usb0 > >> Cheers, >> >> Patrik >> >> >> _______________________________________________ >> connman mailing list >> connman@connman.net >> https://lists.connman.net/mailman/listinfo/connman > However, progress! > I should have tried this much earlier, I started an udhcpc instance on the > USB Gadget side, > and that gave the interface an IP almost immediately. > This makes me think there is something with the DHCP Client that ConnMan > starts on the > USB gadget side. > So I enabled DHCP debug logging in ConnMan on the USB Gadget side, and turned > on regular debug prints, > and I don't see any DHCP activity. Did I miss to enable some setting in > ConnMan, or in the debug logging? > Is there something specific I should be looking for in the ConnMan logs to > understand why it doesn't work? > > Thank you in advance and best regards // John Ernberg > _______________________________________________ > connman mailing list > connman@connman.net > https://lists.connman.net/mailman/listinfo/connman # ./tcpdump -i usb0 & [ 3026.487670] device usb0 entered promiscuous mode tcpdump: WARNING: usb0: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on usb0, link-type EN10MB (Ethernet), capture size 65535 bytes [ 3061.146682] g_ether gadget: high-speed config #1: CDC Ethernet (ECM) [ 3061.196880] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready 02:02:35.646716 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28 02:02:36.526704 IP6 :: > ff02::1:ff00:1011: ICMP6, neighbor solicitation, who has fe80::ff:fe00:1011, length 24 02:02:37.526725 IP6 fe80::ff:fe00:1011 > ff02::2: ICMP6, router solicitation, length 16 02:02:41.536686 IP6 fe80::ff:fe00:1011 > ff02::2: ICMP6, router solicitation, length 16 02:02:43.866697 IP6 fe80::ff:fe00:1011 > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28 02:02:45.546687 IP6 fe80::ff:fe00:1011 > ff02::2: ICMP6, router solicitation, length 16 02:02:51.224212 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28 02:02:52.254225 IP6 fe80::ff:fe02:1201 > ff02::2: ICMP6, router solicitation, length 16 02:02:52.304195 IP6 fe80::ff:fe02:1201 > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28 02:02:56.264202 IP6 fe80::ff:fe02:1201 > ff02::2: ICMP6, router solicitation, length 16 02:03:00.274210 IP6 fe80::ff:fe02:1201 > ff02::2: ICMP6, router solicitation, length 16 02:03:01.534275 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48 02:03:01.754226 IP6 :: > ff02::1:ff7c:e91f: ICMP6, neighbor solicitation, who has fe80::886c:91ff:fe7c:e91f, length 24 02:03:02.754255 IP6 fe80::886c:91ff:fe7c:e91f > ff02::2: ICMP6, router solicitation, length 16 02:03:06.764221 IP6 fe80::886c:91ff:fe7c:e91f > ff02::2: ICMP6, router solicitation, length 16 02:03:09.834262 IP6 fe80::886c:91ff:fe7c:e91f > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28 02:03:10.774317 IP6 fe80::886c:91ff:fe7c:e91f > ff02::2: ICMP6, router solicitation, length 16 # udhcpc -i usb0 udhcpc (v1.22.1) started Sending discover... Sending select for 192.168.0.2... Lease of 192.168.0.2 obtained, lease time 86400 /etc/udhcpc.d/50default: Adding DNS 192.168.0.1 02:04:48.286721 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 02:00:00:00:10:11 (oui Unknown), length 300 02:04:48.324435 IP 192.168.0.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548 02:04:48.366696 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 02:00:00:00:10:11 (oui Unknown), length 300 02:04:48.404440 IP 192.168.0.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548 02:04:48.733158 ARP, Request who-has 192.168.0.1 tell 192.168.0.2, length 28 02:04:48.733448 ARP, Reply 192.168.0.1 is-at 02:00:00:02:12:01 (oui Unknown), length 28 02:04:48.733486 IP 192.168.0.2.60101 > 192.168.0.1.domain: 27667+ PTR? 0.0.0.0.in-addr.arpa. (38) 02:04:48.737303 IP 192.168.0.1.domain > 192.168.0.2.60101: 27667 ServFail- 0/0/0 (38) 02:04:48.737657 IP 192.168.0.2.34812 > 192.168.0.1.domain: 27667+ PTR? 0.0.0.0.in-addr.arpa. (38) 02:04:48.741111 IP 192.168.0.1.domain > 192.168.0.2.34812: 27667 ServFail- 0/0/0 (38) 02:04:48.741467 IP 192.168.0.2.39136 > 192.168.0.1.domain: 28579+ PTR? 255.255.255.255.in-addr.arpa. (46) 02:04:48.742805 IP 192.168.0.1.domain > 192.168.0.2.39136: 28579 ServFail- 0/0/0 (46) 02:04:48.742983 IP 192.168.0.2.54389 > 192.168.0.1.domain: 28579+ PTR? 255.255.255.255.in-addr.arpa. (46) 02:04:48.749828 IP 192.168.0.1.domain > 192.168.0.2.54389: 28579 ServFail- 0/0/0 (46) 02:04:48.750434 IP 192.168.0.2.47298 > 192.168.0.1.domain: 30038+ PTR? 1.0.168.192.in-addr.arpa. (42) 02:04:48.757854 IP 192.168.0.1.domain > 192.168.0.2.47298: 30038 ServFail- 0/0/0 (42) 02:04:48.758063 IP 192.168.0.2.49953 > 192.168.0.1.domain: 30038+ PTR? 1.0.168.192.in-addr.arpa. (42) 02:04:48.765064 IP 192.168.0.1.domain > 192.168.0.2.49953: 30038 ServFail- 0/0/0 (42) 02:04:49.766984 IP 192.168.0.2.48934 > 192.168.0.1.domain: 457+ PTR? 2.0.168.192.in-addr.arpa. (42) 02:04:49.767719 IP 192.168.0.1.domain > 192.168.0.2.48934: 457 ServFail- 0/0/0 (42) 02:04:49.767914 IP 192.168.0.2.38700 > 192.168.0.1.domain: 457+ PTR? 2.0.168.192.in-addr.arpa. (42) 02:04:49.771230 IP 192.168.0.1.domain > 192.168.0.2.38700: 457 ServFail- 0/0/0 (42) 02:04:53.744389 ARP, Request who-has 192.168.0.2 tell 192.168.0.1, length 28 02:04:53.744452 ARP, Reply 192.168.0.2 is-at 02:00:00:00:10:11 (oui Unknown), length 28 # ping 192.168.0.1 -I usb0 PING 192.168.0.1 (192.168.0.1): 56 data bytes 64 bytes from 192.168.0.1: seq=0 ttl=64 time=0.495 ms 02:06:50.870032 IP 192.168.0.2 > 192.168.0.1: ICMP echo request, id 45093, seq 0, length 64 02:06:50.870325 IP 192.168.0.1 > 192.168.0.2: ICMP echo reply, id 45093, seq 0, length 64 64 bytes from 192.168.0.1: seq=1 ttl=64 time=0.448 ms 02:06:51.870271 IP 192.168.0.2 > 192.168.0.1: ICMP echo request, id 45093, seq 1, length 64 02:06:51.870558 IP 192.168.0.1 > 192.168.0.2: ICMP echo reply, id 45093, seq 1, length 64 64 bytes from 192.168.0.1: seq=2 ttl=64 time=0.489 ms ^C --- 192.168.0.1 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0.448/0.477/0.495 ms 02:06:52.870482 IP 192.168.0.2 > 192.168.0.1: ICMP echo request, id 45093, seq 2, length 64 02:06:52.870811 IP 192.168.0.1 > 192.168.0.2: ICMP echo reply, id 45093, seq 2, length 64 02:06:55.874584 ARP, Request who-has 192.168.0.2 tell 192.168.0.1, length 28 02:06:55.874647 ARP, Reply 192.168.0.2 is-at 02:00:00:00:10:11 (oui Unknown), length 28 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman