Comment 17 for bug 863451

Revision history for this message
Botao (botao-sun) wrote : Re: Ethernet doesn't work on Origen on build 2 of 11.09 staging-origen

About the "plug-in and plug-out":

1. If the adapter is plugged in before the board boots up:

Disable and enable can be executed correctly, and "ping" command can be executed correctly.

2. If the adapter is plugged in after the board boots up:

Disable and enable can be executed correctly, but there is no "Ethernet" icon in the upper right corner. "ping" command can't be executed correctly except do a Ethernet "disable and enable" action then execute "setprop net.dns1 192.168.1.1" to set DNS first. But even set DNS manually, "ping" command doesn't always work, see log below:
###########################################################
# ping www.google.com
ping: unknown host www.google.com
# setprop net.dns1 192.168.1.1
# ping www.google.com
PING www.l.google.com (74.125.71.103) 56(84) bytes of data.
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=1 ttl=41 time=238 s
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=2 ttl=41 time=232 s
ping: sendmsg: Network is unreachable
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=4 ttl=41 time=241 s
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=5 ttl=41 time=238 s
ping: sendmsg: Network is unreachable
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=7 ttl=41 time=237 s
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=8 ttl=41 time=238 s
ping: sendmsg: Network is unreachable
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=10 ttl=41 time=237s
64 bytes from hx-in-f103.1e100.net (74.125.71.103): icmp_seq=11 ttl=41 time=231s
ping: sendmsg: Network is unreachable
^C
--- www.l.google.com ping statistics ---
12 packets transmitted, 8 received, 33% packet loss, time 11006ms
rtt min/avg/max/mdev = 231.590/237.083/241.630/3.237 ms
# ping www.google.com
ping: unknown host www.google.com
# ping www.google.com
ping: unknown host www.google.com

[init.svc.dhcpcd_eth0]: [running]
[dhcp.eth0.result]: [ok]
[dhcp.eth0.pid]: [9361]
[dhcp.eth0.reason]: [BOUND]
[dhcp.eth0.dns1]: [211.147.6.3]
[dhcp.eth0.dns2]: [8.8.8.8]
[dhcp.eth0.dns3]: []
[dhcp.eth0.dns4]: []
[dhcp.eth0.ipaddress]: [192.168.1.9]
[dhcp.eth0.gateway]: [192.168.1.1]
[dhcp.eth0.mask]: [255.255.255.0]
[dhcp.eth0.leasetime]: [86400]
[dhcp.eth0.server]: [192.168.1.1]
[net.dns1]: [192.168.1.1]
###########################################################

That means you can only run "ping" command 1 time after the manually DNS setting, but actually, after set DNS manually, this setting is always there. This is a defect. And there is "ping: sendmsg: Network is unreachable", this doesn't appear in situation 1.

3. If the adapter is plugged in before the board boots up, but after the board enters the Android idle screen, plug it out and plug it in again:

3.1 If the Ethernet status is enabled:
After plug it out and plug it in, although the Ethernet status in setting menu still shows "enabled", the adapter even can't get IP address, of course, the "ping" command can't be executed correctly. At this time, if do the disable and enable action, the adapter can get the IP address and DNS can also be set automatically, but still have "ping: sendmsg: Network is unreachable" which is not shown in situation 1. Another thing is you can run "ping" many times here, not only 1 time like situation 2.

3.2 If the Ethernet status is disabled:
After plug it out and plug it in, then enable the Ethernet, there is no "Ethernet" icon in the upper right corner. The adapter can get the IP address but can't execute "ping" command:

# ping www.google.com
ping: unknown host www.google.com

However, the DNS setting is already there:

[init.svc.dhcpcd_eth0]: [running]
[dhcp.eth0.result]: [ok]
[dhcp.eth0.pid]: [3862]
[dhcp.eth0.reason]: [BOUND]
[dhcp.eth0.dns1]: [211.147.6.3]
[dhcp.eth0.dns2]: [8.8.8.8]
[dhcp.eth0.dns3]: []
[dhcp.eth0.dns4]: []
[dhcp.eth0.ipaddress]: [192.168.1.9]
[dhcp.eth0.gateway]: [192.168.1.1]
[dhcp.eth0.mask]: [255.255.255.0]
[dhcp.eth0.leasetime]: [86400]
[dhcp.eth0.server]: [192.168.1.1]

Even set DNS manually like situation 2, the ping command still can't be executed correctly:

# setprop net.dns1 192.168.1.1
# ping www.google.com
ping: unknown host www.google.com

In this situation, you have to do "disable and enable" Ethernet then set DNS manually, the "ping" command can be executed with "ping: sendmsg: Network is unreachable" message, but multiple times.

Above all are the tests I did in several different situations.