Note: This post is the continuation of the previous post.
I have been trying to intergrate NXP'S IW612 based wifi module with iMX8MPEVK.
I have followed this document for the setup.
The problem is that I don't get Internet access in the client devices connected to the Access Point. The client devices seem to request for services from the Internet but the device responds unreachable. I have attached a snippet of output from tcpdump below:
01:53:41.901331 IP 172.24.100.5.41720 > nrt12s47-in-f10.1e100.net.https: Flags [S], seq 332091786, win 65535, options [mss 1460,sackOK,TS val 2069380644 ecr 0,nop,wscale 9], length 0
01:53:41.934260 IP 172.24.100.5.43714 > server-18-172-31-104.nrt20.r.cloudfront.net.https: Flags [S], seq 3938392598, win 65535, options [mss 1460,sackOK,TS val 1154171877 ecr 0,nop,wscale 9], length 0
01:53:41.963676 IP 172.24.100.1 > 172.24.100.5: ICMP host server-18-172-31-104.nrt20.r.cloudfront.net unreachable, length 68
Also, I noticed the document is based on 88w8987 WiFi modules. But I have an iw612 based WiFi module. Could this be the reason for difference in the results?
After doing some digging in the web, I found following article, from Toradex where it is said:
Toradex's provided Kernel configurations are insufficient for configuring NAT, thus it is important to add and enable the required kernel configs. For this, you can use the menuconfig
Is it necessary to do same with the wifi module I have?
Solved! Go to Solution.
Hi, @bgaurav1718
Thanks for your feedback.
Please try to change this line in /etc/udhcpd.conf
opt dns 192.168.0.1 #router IP
to below one:
opt dns 8.8.8.8 #external dns server
And also, do not set default gateway when you configure uap0 IP address:
I mean, if you use:
root@imx8mnevk:~# ifconfig uap0 192.168.2.2 netmask 255.255.255.0 up
root@imx8mnevk:~# route add default gw 192.168.2.1
Please change it to:
root@imx8mnevk:~# ifconfig uap0 192.168.2.2 netmask 255.255.255.0 up
I have tried on my local side, and now I can visit Internet on my PC which connect to NXP-uap0.
Best regards,
Christine.
Hi, @bgaurav1718
Thanks for creating case to us.
For 88W8987 it is similar with IW612 when Wi-Fi works.
Has your I.MX8MP board connected to Ethernet (can visit internet)and assigned correct IP address?
Firstly please make sure your I.MX8MP's ethernet can visit internet, then refer to the given guide to route the internet from Ethernet to IW612's Wi-Fi(as an AP).
You can also provide me your detailed setup steps and results in a doc or take video/screenshot for better understanding.
Best regards,
Christine.
I made sure that the eth interface has access to the internet. It is able to ping a remote IP (8.8.8.8) without any issues.
I have attached a document to show the settings I have used to configure the AP mode.
Hi, @bgaurav1718
Please let me know your IW612 Wi-Fi driver and FW version, so that I can do a same test with you.
I have I.MX8MP-EVK and IW612 module(Murata 2EL M.2 module).
Best regards,
Christine.
I am actually using the Evaluation Kit provided by UBlox. It is called EVK-MAYA-W2 based on MAYA-W276 which is again based on IW612 chipset.
Hi, @bgaurav1718
Thanks for your feedback.
Please try to change this line in /etc/udhcpd.conf
opt dns 192.168.0.1 #router IP
to below one:
opt dns 8.8.8.8 #external dns server
And also, do not set default gateway when you configure uap0 IP address:
I mean, if you use:
root@imx8mnevk:~# ifconfig uap0 192.168.2.2 netmask 255.255.255.0 up
root@imx8mnevk:~# route add default gw 192.168.2.1
Please change it to:
root@imx8mnevk:~# ifconfig uap0 192.168.2.2 netmask 255.255.255.0 up
I have tried on my local side, and now I can visit Internet on my PC which connect to NXP-uap0.
Best regards,
Christine.
This solution works in my side as well. Thank you very much @Christine_Li
Can you please explain what the issue was previously and why the changes we make work? This way, I can have a better understanding of the issue and solve it on my own in case it arises again.
Hi, @bgaurav1718
Thanks for your reply.
The problem is the DNS configurations. The previous DNS configurations is internet unavailable.
When we config the DNS to 8.8.8.8(Google's default DNS), we can visit internet.
Best regards,
Christine.
Hi, @bgaurav1718
Thanks for your reply.
I tried without default Gateway, it works, I didn't try with default Gate way.
After you tried with internet available DNS and default Gateway, doesn't it work?
Best regards,
Christine.
Hi, @bgaurav1718
Thanks for your reply.
I suspect there are two reasons:
1. It is not necessary to set default gateway. I checked my ASUS router, there is also no gateway in the configurations which working as an AP. Please see below:
2. The configurations in /etc/udhcpd.conf
opt router 192.168.2.1 # uap0 gw IP
It has influence on Internet access.
Best regards,
Christine.
Hi, @bgaurav1718
Have you tried on your side?
Does my suggestion work on your side?
Please let me know whether have any other concerns on this thread I can help you.
Best regards,
Christine.
Hi, @bgaurav1718
I think I have reproduced your issue on my local side with Linux kernel 6.1.22 and Wi-Fi driver is the default one in this kernel.
Please see below:
Right now I suspect it might be related to Linux kernel version.
I will try to debug and resolve it, once have any updates, I will let you know.
Best regards,
Christine.
Hi, @bgaurav1718
Did you execute:
Step 2 Configurations For NAT between uap0 & eth0
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i uap0 -o eth0 -j ACCEPT
# iptables-save > /etc/iptables/iptables.rules
Step 3 Enabling iptables and Restart board
# systemctl --system daemon-reload
# systemctl enable iptables
# reboot
If no, can you please execute to have a try?
Best regards,
Christine.