Set up and use the SDK skript WLAN-Switching

Goal

Up to 10 client configurations can be stored under the web interface of the WLAN client. However, if the customer wanted to store additional client configurations, this was not possible. This option should now be made possible by an SDK script. To do this, the storage space for a client configuration should be changed to match the required WLAN.

Prerequisites

  • NetModule Wireless Router with wireless connection
  • NetModule Software 4.9.0.102 / 5.0.0.100 or newer
  • Not available for legacy products NB1600, NB2700, NB3700, NB3710

The wiki was tested with router software 4.9.0.102 and 5.0.0.100

1. Set up the SDK script on the router

In the first step, the SDK function is activated and further options are specified.


  1. The function is activated under point 1.
  2. Under point 2, we free up memory for the execution of the script. For this SDK script, 50 MB is sufficient; only a few variables are stored temporarily for the execution of the program.
  3. Under point 3, we activate monitoring to check whether the script is still being processed correctly. We use the router's core function in the program. Monitoring makes sense here.

In the second step, we store the SDK script in Job Management.

First, we store the SDK script under Job Management. Using the plus button under point 3, we add a script.


After pressing the plus button, a new window opens with settings.

First, assign a name to the SDK process. In the second step, you can insert the SDK script using the “upload” function. You can open the script by clicking on the “show code” button in the WIKI and then download the “WLAN_switching.are” file. Once you have saved the file on your computer, you can search for it in step 3 using Browse and select it. The last step, “Apply“, saves everything to the router.


show code


Next, set up the trigger that will start the script.

Here, too, pressing the plus button opens a new window with insertion options.

Again, start by assigning a name to the SDK process. Use the “event-based” option as the trigger type for this script. Select the “sdk-startup” event from the list. Why do we use these settings for the script? The script was created as an endless script. The commands are controlled and executed in the script. Errors are output and the program is then terminated. The event starts the script when the daemon of the SDK program is started by the router. This is also advantageous if the watchdog restarts the SDK daemon on the router. In this case, the script is also reactivated. The “Apply” button saves the changes back to the router.


In the last step, we activate the SDK script on the router.

Again, enter the name for the SDK process first. If you want to activate the first SDK script on the router, the two fields “Trigger” and “Script” are already filled with the options you set up earlier. If you already have multiple scripts, you must select the correct option (Trigger and Script) from the pull-down menu. As before, click “Apply” to apply the setting to the router. In this case, the SDK script is also activated.


Using the Administration option under point 1, you can view information under the Status tab, point 2, to see whether the SDK script has started correctly and is running without errors.


2. Important settings in the SDK script

Please only make changes here in the script if additional WLAN clients are to be added.

What options do you have for modifying the SDK script to suit your needs?

In the upper section, you can enter the SSID(WLAN name of the access point) under point 1. Four placeholders have been entered in the script. However, these can be expanded as required. The password for the access point is entered under point 2. It is very important to assign the SSID to the correct password. Both pieces of information must be entered in the same order in the script.

Under point 3, you can determine where the Wi-Fi should be entered. In this setting, “wlan_client_entry = 10”, the Wi-Fi is added as the last entry in the client list. The entered Wi-Fi networks “test1 to test9” are also given priority by the router. If you enter the Wi-Fi network in the first position, it not only receives priority status 10, but you also use all Wi-Fi networks from your list before those stored permanently in the router. In this example, it is exactly the opposite. First the permanently stored networks and then the Wi-Fi list.

Under point 4, you can choose whether you want to use WLAN module 1 or WLAN module 2 for the entire system.


3. Additional information

show code