WLAN configuration
This chapter describes the configuration of WLAN interfaces under Beckhoff RT Linux®. Two typical application scenarios are described:
- Operation as a WLAN client (connection to an existing access point)
- Operation as a virtual access point with
hostapd
To operate a WLAN interface as a client, the following software components must be installed and active.
install iNet Wireless Daemon (iwd)
The iwd service (iNet Wireless Daemon) is a system service for Linux® that manages WLAN connections. It runs as the systemd unit iwd.service. It performs the following tasks, among others.
- Scan for available WLAN networks
- Authentication to access points
- Setting up and managing the WLAN connection
- Management of WPA/WPA2/WPA3 keys
- Provision of a D-Bus interface for management tools such as iwctl
The package must be installed for iwd to be used:
sudo apt install iwdThe service must be active as well:
sudo systemctl enable --now iwdIf the iwd service is not active, no WLAN devices or networks can be queried.
Install WLAN firmware
Without the appropriate firmware, the WLAN adapter can be recognized by the system, but is not operational. Depending on the WLAN chipset used, the appropriate firmware package must be installed. For Realtek-based WLAN adapters, such as the Beckhoff WLAN stick CU8210-D001-0102, the following package is usually used:
sudo apt install firmware-realtekThe firmware is loaded automatically when the device is initialized. A manual configuration is not required.
Restart after firmware installation
After installing the iwd service and the firmware, the system must be restarted:
sudo shutdown -r nowCheck whether the WLAN interface is recognized by the system after the restart:
ip addr showThe output then looks as follows in the example with a Beckhoff WLAN stick:
4: wlx34c9f09ab29c: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 34:c9:f0:9a:b2:9c brd ff:ff:ff:ff:ff:ffThe WLAN stick is displayed with the interface name wlx34c9f09ab29c: "wl" = WLAN, "x" = MAC-based, predictable name (systemd/udev). The following sequence of digits is the MAC address.