未验证 提交 37e34006 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #939 from zhaojuntao/murphy

[wlan cmd][lwip ip addr] modify
...@@ -182,20 +182,11 @@ ...@@ -182,20 +182,11 @@
// <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" /> // <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
#define RT_LWIP_ETHTHREAD_STACKSIZE 512 #define RT_LWIP_ETHTHREAD_STACKSIZE 512
// <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" /> // <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
#define RT_LWIP_IPADDR0 192 #define RT_LWIP_IPADDR "192.168.1.30"
#define RT_LWIP_IPADDR1 168
#define RT_LWIP_IPADDR2 1
#define RT_LWIP_IPADDR3 30
// <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" /> // <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" />
#define RT_LWIP_GWADDR0 192 #define RT_LWIP_GWADDR "192.168.1.1"
#define RT_LWIP_GWADDR1 168
#define RT_LWIP_GWADDR2 1
#define RT_LWIP_GWADDR3 1
// <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" /> // <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" />
#define RT_LWIP_MSKADDR0 255 #define RT_LWIP_MSKADDR "255.255.255.0"
#define RT_LWIP_MSKADDR1 255
#define RT_LWIP_MSKADDR2 255
#define RT_LWIP_MSKADDR3 0
// </section> // </section>
// </RDTConfigurator> // </RDTConfigurator>
......
...@@ -404,7 +404,7 @@ int wifi(int argc, char** argv) ...@@ -404,7 +404,7 @@ int wifi(int argc, char** argv)
wlan = (struct rt_wlan_device*)rt_device_find(argv[1]); wlan = (struct rt_wlan_device*)rt_device_find(argv[1]);
if (!wlan) if (!wlan)
{ {
rt_kprintf("no wlan:%s device\n"); rt_kprintf("no wlan:%s device\n", argv[1]);
return 0; return 0;
} }
...@@ -480,6 +480,7 @@ int wifi(int argc, char** argv) ...@@ -480,6 +480,7 @@ int wifi(int argc, char** argv)
rt_wlan_info_init(info, WIFI_AP, SECURITY_OPEN, argv[3]); rt_wlan_info_init(info, WIFI_AP, SECURITY_OPEN, argv[3]);
info->channel = 11; info->channel = 11;
result =rt_wlan_init(wlan, WIFI_AP);
/* start soft ap */ /* start soft ap */
result = rt_wlan_softap(wlan, info, NULL); result = rt_wlan_softap(wlan, info, NULL);
} }
...@@ -489,6 +490,7 @@ int wifi(int argc, char** argv) ...@@ -489,6 +490,7 @@ int wifi(int argc, char** argv)
rt_wlan_info_init(info, WIFI_AP, SECURITY_WPA2_AES_PSK, argv[3]); rt_wlan_info_init(info, WIFI_AP, SECURITY_WPA2_AES_PSK, argv[3]);
info->channel = 11; info->channel = 11;
result =rt_wlan_init(wlan, WIFI_AP);
/* start soft ap */ /* start soft ap */
result = rt_wlan_softap(wlan, info, argv[4]); result = rt_wlan_softap(wlan, info, argv[4]);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册