wlan0 on the tested T3 Gemstone O1 boards. On another system, replace the IFACE value with the appropriate IBSS-capable wireless interface name.
Each node must use:
- A suitable wireless interface that supports IBSS
- The same SSID
- The same frequency
- The same BSSID
- The same BATMAN-adv routing algorithm
- A unique node number
1, 2, and 3, but the mesh is not limited to three nodes.
1. Requirements
The tested T3 Gemstone O1 image already includes thebatman-adv kernel module.
Install the required userspace tools:
Supported interface modes, verify that IBSS is listed.
You can also check that the BATMAN-adv kernel module is available:
2. Select a Node Number
Each board needs a unique node number. The node number is used to derive:- The direct IBSS address:
192.168.100.N/24 - The mesh address:
192.168.200.N/24 - A unique locally administered
bat0MAC address
NODE to a different value.
For Node 1:
1 to 250.
The rest of the commands use the $NODE variable, so the same procedure can be repeated on every board.
3. Configure IBSS
First define the shared wireless parameters:SSID, FREQ, and BSSID.
Disable automatic Wi-Fi management
The normal Wi-Fi management services may change the interface back to managed mode while IBSS is being configured. Stop and mask both possible Wi-Fi backends:wlan0 from NetworkManager and mark it as unmanaged:
Note: NetworkManager itself is not stopped. This avoids interrupting other interfaces such as usb0, which may be used for SSH access.
Switch wlan0 to IBSS mode
Bring the interface down:type IBSS:
Join the IBSS cell
Join the sharedgemstone-mesh cell:
Configure MTU
The tested setup attempts to use an MTU of1532 on wlan0 so that BATMAN-adv can expose a 1500 byte MTU on bat0.
Run:
Assign the direct-link IP address
Remove any existing address fromwlan0:
4. Verify IBSS
Inspect the interface:wlan0inIBSSmode- Membership in the
gemstone-meshcell - The configured frequency
- Peer stations after neighboring nodes join the same cell
- A node-specific
192.168.100.N/24address
5. Configure BATMAN-adv
Configure BATMAN-adv only after IBSS is active. Define the mesh interface and routing algorithm:Check the IBSS prerequisite
Confirm thatwlan0 is still in IBSS mode:
Remove an existing BATMAN-adv configuration
Ifbat0 already exists from an earlier configuration, remove the previous interface association before rebuilding the mesh.
Check whether the interface exists:
bat0 does not exist, continue to the next step.
Load BATMAN-adv
Load the kernel module:Select BATMAN_V
Select the routing algorithm before adding the wireless interface:Add wlan0 to BATMAN-adv
Add the IBSS interface to the BATMAN-adv mesh:bat0 interface after the physical interface is added to the mesh.
Configure the bat0 MAC address
Bringbat0 down before changing its MAC address:
bat0 MAC address on each board is important when multiple boards originate from the same system image.
Configure the mesh IP address
Remove any existing address frombat0:
bat0 up:
$BAT_MAC.
6. Wait for Mesh Discovery
BATMAN-adv needs time to exchange mesh information with neighboring nodes. Wait for discovery:bat0:
bat0 to use an MTU of 1500.
7. Check the Mesh
Display direct BATMAN-adv neighbors:batctl version:
sudo batctl n does not show any neighbors, verify that:
- Other nodes completed the IBSS configuration
- Other nodes completed the BATMAN-adv configuration
- Every node uses
BATMAN_V - Every node uses the same IBSS SSID, frequency, and BSSID
iw dev wlan0 station dumpshows the expected IBSS peers
8. Test Mesh Connectivity
Applications should use thebat0 addresses for mesh communication.
For example, from Node 1 to Node 2:
192.168.200.N form.
A successful ping confirms end-to-end connectivity, but it does not by itself prove that the path is multi-hop. The verification section explains how to inspect the neighbor and originator tables and how the three-node test was used to verify an intermediate forwarding path.
9. Cleanup
When the mesh is no longer needed, remove the BATMAN-adv layer first and then returnwlan0 to normal managed Wi-Fi mode.
Remove BATMAN-adv
Define the interfaces if they are not already present in the current shell:bat0:
bat0 down:
wlan0 from BATMAN-adv:
Restore managed Wi-Fi mode
Remove the IBSS IP address:wlan0 down:
iwd as the managed Wi-Fi backend. Start that backend:
wpa_supplicant, start it instead of iwd:
wlan0 to NetworkManager management:

