Dear Toradex Team,
I want to create a WIFI AP and followed the hostapd
method you described here. But it is not working as expected. The AP is created and I can see it but I can not connect to it.
However, it works for me when I do not use the IPMasquerade=yes
option in /etc/systemd/network/80-wifi-ap.network
This is the network file I use:
[Match]
Name=uap0
Type=wlan
WLANInterfaceType=ap
[Network]
Address=192.168.8.1/24
DHCPServer=yes
#IPMasquerade=yes
IPForward=ipv4
[DHCPServer]
PoolOffset=10
PoolSize=30
EmitDNS=yes
DNS=8.8.8.8
Looking at the networkd
documentation I can see what the IPMasquerade
option does, and I assume it is necessary when sharing the internet connection through the AP. Is this correct?
Also I am not really sure what to do with the DNS
option. Should I enter a public available DNS server, like Google DNS, or should I enter the address of the device which creates the AP?
Is this option only relevant when sharing the internet connection, so the “client device” is capable of resolving hostnames or urls?
Am I missing something in my configuration?
This is the TorizonCore version I am using on an apalis imx8:
cat /etc/os-release
ID=torizon
NAME="TorizonCore"
VERSION="6.3.0-devel-20230726+build.339 (kirkstone)"
VERSION_ID=6.3.0-devel-20230726-build.339
PRETTY_NAME="TorizonCore 6.3.0-devel-20230726+build.339 (kirkstone)"
DISTRO_CODENAME="kirkstone"
BUILD_ID="339"
ANSI_COLOR="1;34"
VARIANT="Docker"
Thank you in advance.
Kind regards,
Thorbjörn
Hello @n11ThoMumme,
Thanks for reaching out!
Could you please try with the Hostapd method? Also, please don’t forget to disable the systemd-networkd
service when you are working with hostapd. Let me know how that goes 
Hello @n11ThoMumme,
Do you have any updates on this topic?
Hi @rudhi.tx
sorry for the late response, but it has been quite busy at the office the past weeks.
I will try your proposed method soon and get back to you how it worked 
Best,
Thorbjörn
Hello @rudhi.tx
I tried the hostapd
method again and the result is still the same. As long as I use the IPMasquerade
option my laptop fails to get an IP address when connecting to the access point.
Furthermore, when I disable systemd-networkd
like you suggested, the uap0
interface does not get an IPv4 address after restarting the hostapd
service.
Some side notes which might be important:
- I tested this on a clean installation of Torizon 6.4.0 as I could not find the version above anymore.
ID=torizon
NAME="TorizonCore"
VERSION="6.4.0-devel-202308+build.9 (kirkstone)"
VERSION_ID=6.4.0-devel-202308-build.9
PRETTY_NAME="TorizonCore 6.4.0-devel-202308+build.9 (kirkstone)"
DISTRO_CODENAME="kirkstone"
BUILD_ID="9"
ANSI_COLOR="1;34"
VARIANT="Docker"
- After disabling
systemd-networkd
I rebooted the device. After this I restarted hostapd
because I did not do the changes to hostapd.service
(step 5 of the hostapd method) as it is read-only on my system. I wanted to deal with that later.
Can you verify that the hostapd method as described works for you?
Kind regards,
Thorbjörn
Hello @n11ThoMumme,
Sorry I made a mistake in my previous reply. You should be disabling NetworkManager
and not systemd-networkd
.
I have tried this already on an apalis iMX8 and can confirm that this works. Could you please try again and let me know how it goes? Again, apologies for my mistake.