请教:WINCE里如何预设WIFI IP和WIFI的相关登录设置?

sdx_none   2009-6-29 15:35 楼主
比如要预设IP、网关、DNS,
还有WIFI的加密方式、密码。

我想应该是修改注册表,但是我不知道在哪改,请指教。
全部的总数奉上!

回复评论 (19)

在无线网卡的驱动的注册表里面设,自己去找找驱动放哪里了。
点赞  2009-6-29 16:03
在WZCTOOL.cpp中,不是修改注册表的,因为他没实现保存在注册表里,假如你连上WIFI,断电后还是会丢掉信息的。
不过有几个BSP提供商好象修改了可以保存了注册表里。
你可以尝试在里面的一个结构体里写信息,关键是看懂wzctool.cpp
点赞  2009-6-29 16:28

4楼 wcs 

uping
点赞  2009-6-30 08:11
WZCTOOL的设置可以掉电保存,我觉得是在注册表里改的。
点赞  2009-6-30 09:09
WZCTOOL的设置可以掉电保存,我做过通过WIFI连接上网,可以从WZCTOOL提取函数进行预设,是可以保存的。
点赞  2009-6-30 11:24
我不想修改代码,按照DoConfigureAsRegistry函数里的注释,添加了下面的注册表项,但是还不行:
[HKEY_CURRENT_USER\Comm\WZCTOOL]
    "SSID"           = "ChinaNet-MUFq"
    "encryption"     = dword:4  ; WEP (Ndis802_11WEPEnabled)
        ;0 = WEP (Ndis802_11WEPEnabled)
        ;1 = no-encrption (Ndis802_11WEPDisabled)
        ;4 = TKIP (Ndis802_11Encryption2Enabled)

    "authentication" = dword:4
        ;0 = open (Ndis802_11AuthModeOpen)
        ;1 = shared-key (Ndis802_11AuthModeShared)
        ;3 = WPA (Ndis802_11AuthModeWPA)
        ;4 = WPA-PSK (Ndis802_11AuthModeWPAPSK)
        ;5 = WPA-NONE (Ndis802_11AuthModeWPANone)

    "key"            = "1/ABCDEFGG"   ; key generated automatically by EAP
    "eap"            = "tls"    ; TLS,PEAP,MD5 (certificate based authentication)
    "adhoc"          = dword:0  ; CE8021X is an infrastructure network
点赞  2009-7-1 11:36
IP预设我已经搞到了:
[HKEY_LOCAL_MACHINE\Comm\SDIO86861\Parms\TcpIp]
   "EnableDHCP"=dword:0
       ; This should be MULTI_SZ
   "DefaultGateway"="192.168.1.1"
       ; Use zero for broadcast address? (or 255.255.255.255)
   "UseZeroBroadcast"=dword:0
       ; Thus should be MULTI_SZ, the IP address list
   "IpAddress"="192.168.1.13"
       ; This should be MULTI_SZ, the subnet masks for the above IP addresses
   "Subnetmask"="255.255.255.0"
    "DNS"="192.168.1.1"

现在只剩下WIFI的认证之类的设置
点赞  2009-7-1 11:47
经过试验,
上面的[HKEY_CURRENT_USER\Comm\WZCTOOL]注册表信息,是给wzctool.exe用的。
运行wzctool.exe时,它会根据这些注册表信息给系统添加一个“首选网络”。

我不想运行wzctool.exe,怎么修改注册表添加默认的“首选网络”呢?
点赞  2009-7-1 12:56
你先什么都不添加进入wince后再wzc中手动连接ap,wzc会把所有信息保存在注册表中,重启后会自动连接。
你可以比较两次的注册表就可以了
点赞  2009-7-1 14:18
这招我试过,没用,下面是比较的结果:
[HKEY_CURRENT_USER\Comm]

[HKEY_CURRENT_USER\Comm\EAPOL]

[HKEY_CURRENT_USER\Comm\EAPOL\Config]

[HKEY_CURRENT_USER\Comm\EAPOL\Config\ChinaNet-MUFq]
"EapTypeId"=dword:0000000d
"Enable8021x"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC\Parameters]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces\SDIO86861]
"Static#0000"=hex:\
      c4,00,00,00,13,00,00,00,00,1e,73,cb,76,ce,00,00,0d,00,00,00,43,68,69,6e,61,\
      4e,65,74,2d,4d,55,46,71,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,04,00,00,00,e2,ff,ff,ff,03,00,00,00,20,00,00,00,64,00,00,00,00,00,00,\
      00,99,09,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,\
      82,84,8b,96,0c,12,18,24,00,00,00,00,20,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,04,00,\
      00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,0d,00,00,00,00,00,00,\
      00,bc,a1,5a,00,00,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00,01,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,04,00,00,20,02,00,00,00,00,\
      00,01,68,00,00,10,00,00,00,10,00,00,00,99,5c,9f,bd,db,54,1b,2b,a0,84,36,28,\
      6f,c4,8b,f9,00,00,00,00,04,80,00,00,10,00,00,00,10,00,00,00,ce,dc,6d,f4,ad,\
      89,36,af,fd,55,1b,49,18,38,7f,e6,20,00,00,00,f0,d3,57,77,fc,1a,11,91,9d,8b,\
      98,3f,c6,fa,28,53,e9,c4,b3,0f,eb,38,c3,19,f8,2c,aa,6c,51,c0,1e,3f,14,00,00,\
      00,77,88,07,7b,1c,f4,1d,0c,9b,15,1e,a9,e5,f5,dd,cb,57,05,19,7c
"ActiveSettings"=hex:\
      c4,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,05,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,04,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,04,00,00,20,02,00,00,00,00,\
      00,01,68,00,00,10,00,00,00,10,00,00,00,ec,17,c2,c9,15,ba,4d,6f,3c,a7,7e,d3,\
      3d,98,a0,52,00,00,00,00,04,80,00,00,10,00,00,00,10,00,00,00,41,c3,ab,07,6f,\
      df,1c,dc,d6,61,bc,8f,72,63,e8,ad,20,00,00,00,35,c7,28,a9,41,2f,9f,8c,95,44,\
      78,b0,a7,cc,f6,27,17,3d,c3,7d,fc,ea,ae,c5,60,10,2d,84,06,27,3f,e6,14,00,00,\
      00,8c,ce,89,f2,70,b8,b5,04,71,8a,99,e4,b9,8f,5f,e8,9f,ea,ca,fb
"ControlFlags"=dword:01818002
"LayoutVersion"=dword:00000006

点赞  2009-7-1 21:00
wifi能这样设置吗?还真没有这么弄过
我这边是调用wifi厂商给的API来实现的,跟硬件先关的东西还是和硬件厂商联系,少走些弯路
点赞  2009-7-2 09:26
跟硬件相关的东西还是和硬件厂商联系,少走些弯路
点赞  2009-7-2 09:27
wifi的IP是不能预设的吧,物理地址在注册表上预设
点赞  2009-7-2 14:49
IP预设已经成功了,这很简单,注册表里这样写就可以了:
[HKEY_LOCAL_MACHINE\Comm\SDIO86861\Parms\TcpIp]
   "EnableDHCP"=dword:0
       ; This should be MULTI_SZ
   "DefaultGateway"="192.168.1.1"
       ; Use zero for broadcast address? (or 255.255.255.255)
   "UseZeroBroadcast"=dword:0
       ; Thus should be MULTI_SZ, the IP address list
   "IpAddress"="192.168.1.13"
       ; This should be MULTI_SZ, the subnet masks for the above IP addresses
   "Subnetmask"="255.255.255.0"
    "DNS"="192.168.1.1"


关键是WIFI的SSID、密码之类,不知道怎么预设
点赞  2009-7-3 11:03
小弟不才,是通过修改PB代码实现预设的
点赞  2009-7-17 09:59
学习一下。
点赞  2009-7-17 10:17
我讲下我的做法吧
我是将pb中NETUI文件夹wzcprops.c里面的程序部分进行修改,截获最后一次输入的配置记得是一个结构体
然后通过自己编另外的程序(当然你也可以在pb里面添加该功能)将截获的配置信息通过程序添加到“首选”,就这样实现wifi 的预设值

添加配置信息的程序,请参考
http://www.cnblogs.com/Jade2009/archive/2009/02/23/1368201.html

预祝你成果!
点赞  2009-7-17 10:27
MARK
点赞  2009-9-17 20:43
在注册表里设置静态ip也不行,还是dhcp获取的ip地址
点赞  2012-7-20 14:33
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复