wince的DM9000双网卡不能同时使用
现在在2440上开发双网口,自己做的板子,用了两个DM9000A,操作系统是WinCE5.0。现在的问题是每个网口单独使用,比如只加载一个dm9000的驱动,这样的话,和PC机都能ping通,但是如果在wince中将两个网口的驱动同时编译进内核的话其中一个就不能用,但是连上网线的话指示灯还是会亮的,求指教~
我把注册表中的部分信息贴出来:
[HKEY_LOCAL_MACHINE\Comm\DM9CE1\Parms]
"BusNumber"=dword:0
"BusType"=dword:1
[HKEY_LOCAL_MACHINE\Comm\DM9CE2\Parms]
"BusNumber"=dword:1
"BusType"=dword:1
然后它们的IP我设置的不在同一网段,MAC地址设置的也不一样。
翻遍了各大论坛,最后我觉得问题可能跟"BusType"和"BusNumber"两个参数有关系,但是不知道操作系统是如何处理这两个参数的,在BSP中也没找到关于这两个参数的调用,请高手指教~
另外,据说一个DeviceID要对应一个WindowsID,不明白什么意思
参考自己的一个项目注册表的修改内容如下,只用一个DLL, 注册表内容,主要少了下面几行
C/C++ code?[HKEY_LOCAL_MACHINE\Comm\Tcpip\Linkage] "Bind"="DM9CE1" [HKEY_LOCAL_MACHINE\Comm\Tcpip1\Linkage] "Bind"="DM9EPCE1"
C/C++ code?IF BSP_DM9000 [HKEY_LOCAL_MACHINE\Comm\DM9CE] "DisplayName"="DM9isa Fast Ethernet Adapter" "Group"="NDIS" "ImagePath"="dm9isa.dll" [HKEY_LOCAL_MACHINE\Comm\DM9CE\Linkage] "Route"=multi_sz:"DM9CE1","DM9CE2" ;第1块网卡配置信息 [HKEY_LOCAL_MACHINE\Comm\DM9CE1] "DisplayName"="DM9isa Fast Ethernet Adapter" "Group"="NDIS" "ImagePath"="dm9isa.dll" [HKEY_LOCAL_MACHINE\Comm\DM9CE1\Parms] "BusNumber"=dword:0 "BusType"=dword:1 "XmitBuffer"=dword:20 "RecvBuffer"=dword:20 "SysIntr"=dword:1a "IrqNumber"=dword:1a ;DM9000的硬件中断号 "IoAddress"=dword:18000300 ;LAN1:DM9000AEP的片选入口地址+偏移地址 "UseSoftwareMac"=dword:1 "SoftwareMacAddress0"=dword:20 "SoftwareMacAddress1"=dword:04 "SoftwareMacAddress2"=dword:09 "SoftwareMacAddress3"=dword:18 "SoftwareMacAddress4"=dword:00 "SoftwareMacAddress5"=dword:07 [HKEY_LOCAL_MACHINE\Comm\DM9CE1\Parms\TcpIp] "EnableDHCP"=dword:0 "DefaultGateway"="192.168.1.1" "LLInterface"="" "UseZeroBroadcast"=dword:0 "IpAddress"="192.168.1.33" "Subnetmask"="255.255.255.0" "DNS"="192.168.1.1" ;"WINS"="192.168.1.1" ; ; ;第2块网卡配置信息 [HKEY_LOCAL_MACHINE\Comm\DM9CE2] "DisplayName"="DM9isa Fast Ethernet Adapter" "Group"="NDIS" "ImagePath"="dm9isa.dll" [HKEY_LOCAL_MACHINE\Comm\DM9CE2\Parms] "BusNumber"=dword:0 "BusType"=dword:0 "XmitBuffer"=dword:20 "RecvBuffer"=dword:20 "IoAddress"=dword:20000300 ;LAN2:DM9000AE的片选入口地址+偏移地址 "IrqNumber"=dword:2a ;DM9000AE的硬件中断号 EINT14=42=0x2A "SysIntr"=dword:27 ;SYSINTR_DM9000=16+23=39=0x27 "UseSoftwareMac"=dword:1 "SoftwareMacAddress0"=dword:20 "SoftwareMacAddress1"=dword:11 "SoftwareMacAddress2"=dword:06 "SoftwareMacAddress3"=dword:06 "SoftwareMacAddress4"=dword:13 "SoftwareMacAddress5"=dword:14 [HKEY_LOCAL_MACHINE\Comm\DM9CE2\Parms\TcpIp] "EnableDHCP"=dword:0 "UseZeroBroadcast"=dword:0 "DefaultGateway"="192.168.0.1" "IpAddress"="192.168.0.88" "Subnetmask"="255.255.255.0" "DNS"="192.168.0.1"ENDIF BSP_DM9000
如果不行, 可以坚持下 OAL的中断处理函数, 确认处理中断无丢失问题?