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

If you are using the Orb application, this must be wlan0 in order for Orb to detect as a wireless interface. This is a known bug and may well have been resolved by the time you follow this tutorial.

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.

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.

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.

Note.

If you are intending on using a second wireless adapter in monitor mode with Wi-Fi Explorer or any other Wi-Fi scanning tool, then you can answer No to this question to leave the adapter in the root namespace.

IMPORTANT

Most Wi-Fi scanning tools (Wi-Fi Explorer, WinFi, Analiti and Hamina Onsite) are expecting to see an interface in the root namespace so you must leave one there if you want to use one of these tools.

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?