arm板ping计算机不通?
在做ARM板与PC机通信,PC机是WINDOWS 7 系统,ARM烧的linux2.6核,用串口加超级终端来进行操作。ARM的IP是192.168.1.6,PC机IP设置为192.168.1.7.然后用网线连接起来,网线就是普通家用上网的网线。连接起来之后用ping命令总是无法ping通,PC机上pingARM的IP显示无法访问目标主机,ARM上pingPC机的IP则一直没有反应。
请问设置ARM于PC的网络连接是不是只要设置IP在同一网段就可以了?还需要做一些其他的工作么?已经尝试过用交叉网线和直通网线了,都遇到同样的问题,网关也设置成一样的了。
网线应该是连接好的,ARM板上RJ45口灯是亮的,并且插上网线后ARM板输出:
eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
ARM板上ping主机出现这样的显示:
PING 192.168.1.7 (192.168.1.7): 56 data bytes
------------[ cut here ]------------
WARNING: at net/sched/sch_generic.c:226 dev_watchdog+0x260/0x280()
NETDEV WATCHDOG: eth0 (dm9000): transmit timed out
Modules linked in: ov9650 zd1211rw rt73usb rt2x00usb rt2x00lib mac80211 input_polldev
Backtrace:
[<c003bfd4>] (dump_backtrace+0x0/0x10c) from [<c033fb0c>] (dump_stack+0x18/0x1c)
r7:c0475e08 r6:c02d8a30 r5:c04539f0 r4:000000e2
[<c033faf4>] (dump_stack+0x0/0x1c) from [<c0049f50>] (warn_slowpath_common+0x4c/
0x80)
[<c0049f04>] (warn_slowpath_common+0x0/0x80) from [<c0049fd0>] (warn_slowpath_fm
t+0x30/0x38)
r7:00000000 r6:c38ba400 r5:c04dea98 r4:c0475e2c
[<c0049fa0>] (warn_slowpath_fmt+0x0/0x38) from [<c02d8a30>] (dev_watchdog+0x260/
0x280)
r3:c38ba400 r2:c0453a08
r4:c047c070
[<c02d87d0>] (dev_watchdog+0x0/0x280) from [<c0053e40>] (run_timer_softirq+0x1ac
/0x22c)
r7:c02d87d0 r6:c0475ea8 r5:00000100 r4:c04d0a40
[<c0053c94>] (run_timer_softirq+0x0/0x22c) from [<c004f120>] (__do_softirq+0x78/
0x100)
[<c004f0a8>] (__do_softirq+0x0/0x100) from [<c004f1f0>] (irq_exit+0x48/0x50)
[<c004f1a8>] (irq_exit+0x0/0x50) from [<c0037048>] (_text+0x48/0x70)
[<c0037000>] (_text+0x0/0x70) from [<c0037a44>] (__irq_svc+0x24/0xa0)
Exception stack(0xc0475f48 to 0xc0475f90)
5f40: f4100000 00000032 f4100000 60000013 c0038ed8 c0474000
5f60: c0038ed8 c04af984 3001e904 41129200 3001e8d0 c0475f9c c0475fa0 c0475f90
5f80: c003950c c0038f38 60000013 ffffffff
r7:c04af984 r6:00004000 r5:f4000000 r4:ffffffff
[<c0038ed8>] (default_idle+0x0/0xac) from [<c003950c>] (cpu_idle+0x4c/0x68)
[<c00394c0>] (cpu_idle+0x0/0x68) from [<c033daf8>] (rest_init+0x5c/0x70)
r7:c04784f0 r6:c0020d34 r5:c04af940 r4:c04d320c
[<c033da9c>] (rest_init+0x0/0x70) from [<c0008944>] (start_kernel+0x1e0/0x24c)
[<c0008764>] (start_kernel+0x0/0x24c) from [<30008034>] (0x30008034)
r5:c04afa28 r4:c0007175
---[ end trace ca1a1e11ef0cb6dd ]--- arm
[解决办法]
显然系统工作不正常。不好说是什么问题,目前看是在看门狗这块崩了,可以把内核中对看门狗的支持去掉
[解决办法]
这个问题我们遇到过,当时是一部分板子是OK的,一部分板子不行,确定是硬件问题,但是在硬件上找不出来哪部分跟这个有关,最后没办法,只有寻求软件了。后来是改了软件里面的一部分寄存器的某些BIT位才OK的,是和ARP相关的一些寄存器,由于我们用的系统可能不是同一个,所以具体哪个也不好使,当时是一个个寄存器时出来的,具体的原因现在还没搞明白。有些代码里面有说明,你看下:
//b[31] = 1 // enable port authorization
//b[29] = 1 // enable L2 learning
//b[27] = 1 // enable L2 aging
//b[23] = 1 // Rx_VLAN==Default VLAN handling: POP the incoming top VLAN-ID and then Push the new VLAN-ID back as the top outgoing VLAN
//b[22:21] = 01 // IPV6 packet Forward to the other port
//b[18:17] = 11 // Vlan mode 3
//b[16] = 1 // Un-known UC packet Forward to the other port
//b[15] = 1 // Un-known MC packet Forward to the other port
//b[14:13] = 01/00 // ARP packet forward to the other port /CPU (for ipstack branch)
//b[12:11] = 01 // IGMP packet forward to the other port
//b[10] = 0 // Forward DA==My MAC to CPU
//b[9] = 1 // BPDU packet Forward to the other port
//b[2:1] = 00 // OAM packet Forward to the other port
//b[0] = 0 // 802.1X packet Forward to CPU