Namespace configuration procedure
A Namespaces configuration is a valid json file stored in the following directory.
/home/wlanpi/.local/share/wlanpi-core/netcfg/configs
You can browse this directory (needs root access which you can get by running sudo su) and viewing the contents of any files in there.
The following tutorial will guide you through the simple setup using the WLAN Pi application.
The WLAN Pi App Network Page
The WLAN Pi application now contains a Network management feature.
If this is not visible in your application, ensure that your WLAN Pi application is up to date and check in case the feature needs unlocking in settings (this will be the case while it is a beta feature).

Navigate to the Network tab. You will see all your avaiable adapters and the state in which they are configured. The image below is the state found on a WLAN Pi with 2 adapters which has no prior Namespace configuration active.

The Status and Configuration tabs at the top of the page will switch between a review of the adapter state and the interface for setting up a Namespace. You might find that after performing actions, the application automatically navigates to the Status tab to display the results of the action
The configuration tab
The configuration tab is where the following functions can be performed
Setup of a simple Namespace configuration (recommended)
Advanced setup of a Namespace configuration (not necessary in nearly all uses)
Restoration of all adapters to their default state and removal of all Namespaces
Activation/Deactivation of stored configurations
Deletion and duplication of stored configurations
Edit of stored configurations

Setup a simple Namespace configuration
To setup a simple Namespace configuration, use the helper tool behind the green button

This assumes you want to connect at least one WLAN adapter to a network and auto-run an application in the same namespace, using this WLAN as default.
Pressing this will open the following set of helper stages:
1. Prepare the WLAN Pi for a new configuration
To ensure a new configuration can be setup, any active configurations are deactivated. This ensures all the available interfaces appear as options for configuration.
Press Proceed and continue with the setup

2. Select the Interface you want to connect to a Wi-Fi network.
The next step in the helper displays all the available interfaces to you. Select one which you wish to configure and connect to a Wi-Fi network

3. Enter the Wi-Fi configuration
Enter the SSID and security details for the Wi-fi you would like to connect to. Currently this can be Open, WPA2 or WPA3.

4. Setup application autostart
This is an optional step to setup an application which should auto run. This auto run will survive reboots all the while that this application is active.
The Application Name corresponds to the key created in the pre-requisites and must be entered exactly as it was entered.
If you have been following the Orb application tutorial, then you will have created the following configuration.
{"orb": "/usr/bin/orb sensor"}
The Application in this case will be orb - all lower case.
This instructs the Namespace manager application to run the application '/usr/bin/orb sensor'

5. Setup Network Namespaces
In this step, you can put the setup just created (connection to Wi-Fi + an auto-starting application) into a Network Namespace. This will ensure the application sees only this configured interface and nothing else, forcing it to be used as the default route.
If you are following this tutorial and setting up Orb as the application, you must say |Yes to this question if you want Orb to test the wireless newtork you are connecting to.
If you do not say Yes, your Wi-Fi connection and the Orb application will remain in the default/root namespace and Orb will end up testing the default route which is likely to be the ethernet interface.

6. Managing the remaining interfaces
You will be asked if you want to manage the other interfaces. If you have multiple adapters connected to your WLAN Pi, you can add them to the configuration here.
Selecting Yes will re-start the process for the next interface you choose. It is typical to only setup one namespace for simple applications.

7. Check the functionality is correct
Upon concluding the setup, your configuration will be activated and the WLAN Pi app will go back to the Status page.
Wait a short time and you should see a different configuration of the interfaces, with an indication that the interface you configured is connected to the desired Wi-Fi (if it is available).
In the example below, wlan0 has successfully been moved to a new namespace (called 'wlan0_ns') and is connected to the OrbWPA3PSK SSID.
Now check if your your application is running in the normal way.

Last updated
Was this helpful?