I am using an EC25+FC20 board.
When I enter AP mode, I want to set FC20 to always have the same IP.
What should I do?
at+qwdhcp=?
+QWDHCP:<host_ip>,<range_start_ip>,<range_end_ip>,<leasetime>
at+qwdhcp?
+QWIFI: 0
OK
OK
AT+QWIFICFG="workmode",0
OK
AT+QWIFICFG="ssid",0,ap-mode-test
OK
AT+QWIFICFG="channel",0,5
OK
AT+QWIFICFG="mode",0,4
OK
AT+QWIFICFG="auth",0,3,2,"1234567890"
OK
root@colibri-imx6ull-emmc-15161328:/apps/tests# busybox microcom /dev/ttyUSB2
AT+QWDHCP="192.168.0.11","192.168.0.40","192.168.0.60",3600
OK
AT+QWIFI=1
OK
+QWIFIND: 1,"04:e8:b9:30:4f:71"
AT+QWIFICFG="stainfo"
+QWIFICFG: "stainfo",0,"00:00:00:00:00:00","0.0.0.0","0000:0000:0000:0000:0000:0000:0000:0000",""
+QWIFICFG: "stainfo",1,"04:e8:b9:30:4f:71","192.168.0.45","0000:0000:0000:0000:0000:0000:0000:0000","GS-HQ10-NA10AO9"
OK
AT+QWIFICFG="stainfo"
+QWIFICFG: "stainfo",0,"00:00:00:00:00:00","0.0.0.0","0000:0000:0000:0000:0000:0000:0000:0000",""
+QWIFICFG: "stainfo",1,"04:e8:b9:30:4f:71","192.168.0.45","0000:0000:0000:0000:0000:0000:0000:0000","GS-HQ10-NA10AO9"
OK
root@colibri-imx6ull-emmc-15161328:/apps/tests#
root@colibri-imx6ull-emmc-15161328:/apps/tests#
root@colibri-imx6ull-emmc-15161328:/apps/tests# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:420 errors:0 dropped:0 overruns:0 frame:0
TX packets:420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:28726 (28.0 KiB) TX bytes:28726 (28.0 KiB)
usb0 Link encap:Ethernet HWaddr CE:4A:F2:47:14:AE
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
usb1 Link encap:Ethernet HWaddr B6:8E:8A:DD:FD:60
inet addr:192.168.0.49 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::8db7:9e4d:3158:fbe9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:144 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15434 (15.0 KiB) TX bytes:6624 (6.4 KiB)
As shown in the log above, I don’t think there is a problem with setting AP mode, but IP is weird.
I set host_ip to 192.168.0.11 but when I check with ifconfig, the ip of usb1 is 192.168.0.49.
What’s the problem?
You can set the IP range.
Maybe you can try
AT+QWDHCP="192.168.0.0","192.168.0.11","192.168.0.12",3600
There seems to be a misunderstanding, but I want to set the host IP of the MCU(LInux Flatform)
AT+QWDHCP=“192.168.0.0”,“192.168.0.11”,“192.168.0.12”,3600
Isn’t this a command that allocates the IP of the device connected to FC20 in the MCU to 192.168.0.11?