I was going to set up an AP and was going through the documentation here.
I got to this part:
/lib/systemd/system/hostapd.service does not exist. Do I make it or is this a typo
I’m running torizon OS 7
I was going to set up an AP and was going through the documentation here.
I got to this part:
/lib/systemd/system/hostapd.service does not exist. Do I make it or is this a typo
I’m running torizon OS 7
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello!
When setting up a Wi-Fi Access Point on Torizon OS 7 using hostapd, the absence of the /lib/systemd/system/hostapd.service
file can be addressed with a few steps:
Verify Installation: First, ensure that hostapd is installed on your system. You can check this by running hostapd -v
in the terminal. If it is not installed, you will need to install it using the package manager.
Create the Service File: If hostapd is installed but the service file is missing, you can create it manually. This file is essential for managing the hostapd service, which enables your device to function as a Wi-Fi access point. You can create the file at /lib/systemd/system/hostapd.service
with the following content:
[Unit]
Description=Hostapd IEEE 802.11 Access Point
After=network.target
[Service]
ExecStart=/usr/sbin/hostapd /etc/hostapd/hostapd.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
Make sure the paths to hostapd
and the configuration file (/etc/hostapd/hostapd.conf
) are correct for your setup.
Review Documentation: Double-check the Toradex documentation to ensure there are no additional steps or updates for setting up hostapd on Torizon OS 7.
By following these steps, you should be able to set up your device as a Wi-Fi access point successfully.
If you have any more questions, feel free to ask!
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem:
Hey @jeffbelz,
It should have that file by default. Here is my results.
torizon@verdin-imx8mp-07011921:~$ sudo tdx-info
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.23-7.0.0-g558ba3740880 #1-Torizon SMP PREEMPT Wed Sep 25 11:25:16 UTC 2024
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=00
Distro name: NAME="Torizon OS"
Distro version: VERSION_ID=7.0.0-build.1
Hostname: verdin-imx8mp-07011921
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version: 0058 V1.0C
Serial number: 07011921
Processor arch: aarch64
------------------------------------------------------------
torizon@verdin-imx8mp-07011921:~$ cat /lib/systemd/system/hostapd.service
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
After=network.target
[Service]
Type=forking
PIDFile=/run/hostapd.pid
ExecStart=/usr/sbin/hostapd /etc/hostapd.conf -P /run/hostapd.pid -B
[Install]
WantedBy=multi-user.target
torizon@verdin-imx8mp-07011921:~$
-Eric
I found the file but it’s not writable anyway to override this without having to work with the core builder to replace the file
I assume the modifications should go under [Service]
Few more things I found.
Step 8 has a few issues
seems I don’t have connmanctrl, or the /etc/connman/main.conf file
Hey @jeffbelz,
Correct, this is because we use OSTree as an update mechanism.
The document you have is for our linux/yocto reference image build. It uses ConnMan, here is the AP documents for Torizon OS.
-Eric
Almost got it I think but got some errors. I run the ap.sh to quickly do the nmcli con commands.
Then I get the errors. attached is my errors, the script, and the .network file. I am running OS 7. should I go back to 6?
ap.sh (508 Bytes)
80-wifi-ap.network (139 Bytes)
Note:
no wlan0. But I can connect to my homes ssid with the mlan0
update:
I got the AP running, but I can’t ssh into the access point.
Update:
I’m able to connect to the AP and it gives my PC an IP, but ping does not work from PC to AP
PC to AP = ping 198.168.0.2 (the ip of the AP) does not work
AP to PC = ping 198.168.0.21 (ip of my PC) works
I image something isn’t configured right .
interface=uap0
ssid=
hw_mode=g
channel=1
own_ip_addr=192.168.0.2
wpa=2
wpa_passphrase=
Match]
me=uap0
Type=wlan
WLANInterfaceType=ap
[Network]
Address=192.168.0.2/24
DHCPServer=yes
[DHCPServer]
PoolOffset=10
PoolSize=5
EmitDNS=yes
DNS=192.168.0.1
update:
I went through and setup internet sharing and that seem to work. Still no ssh. and can’t ping to the AP even through I’m connected to it.
Any ideas?
Hey @jeffbelz,
Can you clarify what your setup again. Torizon OS 7, with AP setup, running on a verdin imx8mp?
Can you tell me what you are considering ‘connected to the AP?’ and can you share the output of your ssh.
Also, do you have antennas connected to the verdin wifi module? This can greatly impact the connectivity.
-Eric
I got it sorted. I had everything setup right, but I did not disconnect my ethernet line from my PC. Once I did that all ssh functionality came back. Conflict of having 2 networks working at the same time