Create a WiFi Hotspot
This guide explains how to set up a WiFi hotspot on the ALPON X4 using nmcli, the NetworkManager command-line tool. It's a simple and efficient way to share your internet connection.
Step 1: Create the WiFi Hotspot
- Open a terminal on the ALPON X4.
- Use the following command to create a WiFi hotspot. Replace <YourSSID> and <YourStrongPassword> with your desired network name and password:
nmcli connection add \
type wifi \
ifname wlan0 \
con-name hotspot-shared \
ipv4.method shared \
ipv4.addresses 192.168.10.1/24 \
wifi.mode ap \
wifi.ssid <YourSSID> \
wifi-sec.key-mgmt wpa-psk \
wifi-sec.psk <YourStrongPassword>
wlan0 | The WiFi interface used for the hotspot. |
<YourSSID> | Your WiFi network's name. |
<YourStrongPassword> | A strong password for your WiFi network. |
Important
- The default Sixfab applications on the ALPON X4 use the 100.0.0.0/16 subnet, and the container management system operates on a separate subnet.
- To avoid conflicts, ensure the subnet 192.168.10.1/24 or any other subnet you choose does not overlap with the Sixfab subnets.
Step 2: Start & Verify the Hotspot
- Start the hotspot with the command:
nmcli connection up hotspot-shared
- Verify the hotspot is active by listing connections:
nmcli connection show
You should see hotspot-shared in the list of active connections.
Step 3: Test the Hotspot
- Connect a device (e.g., smartphone or laptop) to the hotspot using the SSID and password you set earlier.
- Verify the device can access the internet.
Step 4: Deactivate the Hotspot
To stop and delete the hotspot configuration, run:
nmcli connection delete hotspot-shared
Conclusion
Setting up a WiFi hotspot using nmcli is a quick and efficient way to share your internet connection on the ALPON X4. The integration with NetworkManager ensures easy management and avoids manual configuration.
Troubleshooting: Common Issues and Fixes
Error Adding Connection
Error Message:
Cause
This error usually occurs when the WiFi password (PSK) provided does not meet the security requirements of WPA2 standards. WPA2 passwords must:
- Be at least 8 characters long.
- Contain a mix of letters, numbers, and symbols for security.
Solution
- Update the command with a password that meets these requirements. For example:
- Re-run the nmcli connection add command with the updated password.
Command Not Found or NetworkManager Missing
nmcli commands fail with "command not found" or NetworkManager is unavailable.
Solution
- Ensure NetworkManager is installed:
sudo apt update
sudo apt install network-manager
- Restart NetworkManager service:
sudo systemctl restart NetworkManager
Updated 9 days ago