summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-11-02 18:03:32 +0800
committerGitHub <[email protected]>2017-11-02 18:03:32 +0800
commit37e34006e28c4a3b010b015efa62a491a5bdd86a (patch)
treee84e7066c08d4decf9cc32d0d53dde05bd8075aa
parent8ca6b2ca2fae65d4c7c03d9bcd0ad4c45cc9e0b1 (diff)
parent74759197b0d8ce6c005d12b7fbfd83e49e9fff67 (diff)
Merge pull request #939 from zhaojuntao/murphy
[wlan cmd][lwip ip addr] modify
-rw-r--r--bsp/fh8620/rtconfig.h15
-rw-r--r--components/drivers/wlan/wlan_cmd.c4
2 files changed, 6 insertions, 13 deletions
diff --git a/bsp/fh8620/rtconfig.h b/bsp/fh8620/rtconfig.h
index ed31025f93..cefbff053c 100644
--- a/bsp/fh8620/rtconfig.h
+++ b/bsp/fh8620/rtconfig.h
@@ -182,20 +182,11 @@
// <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
// <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+#define RT_LWIP_IPADDR "192.168.1.30"
// <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" />
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+#define RT_LWIP_GWADDR "192.168.1.1"
// <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" />
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+#define RT_LWIP_MSKADDR "255.255.255.0"
// </section>
// </RDTConfigurator>
diff --git a/components/drivers/wlan/wlan_cmd.c b/components/drivers/wlan/wlan_cmd.c
index 21afd7020a..2ff0db903d 100644
--- a/components/drivers/wlan/wlan_cmd.c
+++ b/components/drivers/wlan/wlan_cmd.c
@@ -404,7 +404,7 @@ int wifi(int argc, char** argv)
wlan = (struct rt_wlan_device*)rt_device_find(argv[1]);
if (!wlan)
{
- rt_kprintf("no wlan:%s device\n");
+ rt_kprintf("no wlan:%s device\n", argv[1]);
return 0;
}
@@ -480,6 +480,7 @@ int wifi(int argc, char** argv)
rt_wlan_info_init(info, WIFI_AP, SECURITY_OPEN, argv[3]);
info->channel = 11;
+ result =rt_wlan_init(wlan, WIFI_AP);
/* start soft ap */
result = rt_wlan_softap(wlan, info, NULL);
}
@@ -489,6 +490,7 @@ int wifi(int argc, char** argv)
rt_wlan_info_init(info, WIFI_AP, SECURITY_WPA2_AES_PSK, argv[3]);
info->channel = 11;
+ result =rt_wlan_init(wlan, WIFI_AP);
/* start soft ap */
result = rt_wlan_softap(wlan, info, argv[4]);
}