0WM
Measure and visualize Wi-Fi coverage
Declared in: projects/0WM/default.nix
Try the service in a VM
-
Install Nix
- Bash
-
$ apt install --yes curl git jq nix
- Bash
-
$ apt install --yes curl git jq nix
- Bash
-
$ pacman --sync --refresh --noconfirm curl git jq nix
-
Download a configuration file
# default.nix { ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/main") { }, }: ngipkgs.demo-vm ( { lib, ... }: { programs.zwm-client.enable = true; services.zwm-server = { enable = true; openFirewall = true; settings = { port = 3000; aps = [ "http://127.0.0.1:8003" # mock access point ]; ssids = [ "Production" ]; }; }; } )
-
Enable binary substituters
- Bash
-
$ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/ trusted-public-keys = cache.nixos.org-1:6nchdd59x431o0gwypbmraurkbj16zpmqfgspcdshjy= ngi.cachix.org-1:n+cal72roc3qqulxihpv+tw5t42whxmmhpragkrsrow='
-
Build and run a virtual machine
- Bash
-
$ nix-build ./default.nix && ./result
- Bash
-
$ nix-build ./default.nix && ./result
- Bash
-
$ rev=$(nix-instantiate --eval --attr sources.nixpkgs.rev https://github.com/ngi-nix/ngipkgs/archive/master.tar.gz | jq --raw-output)$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$rev.tar.gz --packages nix --run "nix-build ./default.nix && ./result"
- Bash
-
$ nix-build ./default.nix && ./result
-
Usage Instructions
-
Click on the bottom left menu,
Network, and open theChromiumbrowser -
Open a terminal and start the client, OpMode and mock access point programs:
$ 0wm-client & $ 0wm-opmode & $ 0wm-ap-mock & -
Visit http://127.0.0.1:8002 in your browser
-
Press the
Click here to startbutton and give it location permissions, when asked.If the icons on the left are not green, you may have to restart the page for the permissions change to take effect.
-
Press the
SCANbutton, on the right, which will scan the mock access point. -
If the scan was successful, the following will be printed in the terminal:
"GET /cgi-bin/scan/radio0 HTTP/1.1" 200 - "GET /cgi-bin/scan/radio1 HTTP/1.1" 200 -
-
Options
programs.zwm-client
-
Whether to enable 0wm-client.
- Type:
boolean- Default:
false- Declared in:
- projects/0WM/programs/0wm-client/module.nix
-
The _0wm-client package to use.
- Type:
package- Default:
pkgs._0wm-client- Declared in:
- projects/0WM/programs/0wm-client/module.nix
-
0WM config settings.
- Type:
open submodule of (JSON value)- Default:
{ }- Declared in:
- projects/0WM/programs/0wm-client/module.nix
-
0WM server address
- Type:
string- Default:
"http://127.0.0.1:8000"- Declared in:
- projects/0WM/programs/0wm-client/module.nix
programs.zwm-client.enable
programs.zwm-client.package
programs.zwm-client.settings
programs.zwm-client.settings.api
services.zwm-server
-
Whether to enable 0wm-server.
- Type:
boolean- Default:
false- Declared in:
- projects/0WM/services/0wm-server/module.nix
-
Whether to open the
portspecified insettingsin the firewall.- Type:
boolean- Default:
false- Declared in:
- projects/0WM/services/0wm-server/module.nix
-
The _0wm-server package to use.
- Type:
package- Default:
pkgs._0wm-server- Declared in:
- projects/0WM/services/0wm-server/module.nix
-
0WM config settings.
- Type:
open submodule of (JSON value)- Default:
{ }- Declared in:
- projects/0WM/services/0wm-server/module.nix
-
0WM access point addresses
- Type:
list of string- Default:
[ ]- Declared in:
- projects/0WM/services/0wm-server/module.nix
-
0WM server address
- Type:
string- Default:
"127.0.0.1"- Declared in:
- projects/0WM/services/0wm-server/module.nix
-
0WM server port
- Type:
16 bit unsigned integer; between 0 and 65535 (both inclusive)- Default:
8000- Declared in:
- projects/0WM/services/0wm-server/module.nix
-
WiFi SSIDs
- Type:
list of string- Default:
[ ]- Declared in:
- projects/0WM/services/0wm-server/module.nix
services.zwm-server.enable
services.zwm-server.openFirewall
services.zwm-server.package
services.zwm-server.settings
services.zwm-server.settings.aps
services.zwm-server.settings.interface
services.zwm-server.settings.port
services.zwm-server.settings.ssids
Examples
Enable 0WM client
{ ... }: { programs.zwm-client.enable = true; }
Declared in: projects/0WM/programs/0wm-client/examples/basic.nix
Enable 0WM server
{ ... }: { services.zwm-server = { enable = true; openFirewall = true; settings = { port = 3000; aps = [ "http://127.0.0.1:8003" # mock access point ]; ssids = [ "Production" ]; }; }; }
Declared in: projects/0WM/services/0wm-server/examples/basic.nix
This project is funded by NLnet through these subgrants:
- Core
- 0WM
Related links: