OLSR meshing on 5 Ghz outdoor channels using AP-STA under OpenWrt/Falter
3.4.2021So you have your precious outdoor freifunk hardware set up and would like to establish a mesh connection using the
5 ghz outdoor channels with higher tx power allowed and you run into the issue that there is no
DFS support for neither 802.11s nor IBSS. What a bummer! As a workaround, we can use AP-STA mode (classic master and client wifi) and establish an OLSR on top of that. Here are some config snippets to help getting it running. YMMV! First, decide which device is your master (Access Point, AP). It should be positioned so that surrounding devices can see it and connect to it as clients (Stations, STA).
1.
AP radio configuration - /etc/config/wireless
config wifi-device 'radio0' #varies, your 5ghz might be radio1 option type 'mac80211' option channel '136' option path 'pci0000:00/0000:00:00.0' #varies a lot option hwmode '11a' #some put '11acn' here but in reality htmode sets n/ac option diversity '1' option country 'DE' option doth '1' #important for DFS option htmode 'HT20' #very very narrow
The important bits here are doth (802.11h) which enables frequency hopping once a DFS event occurs, obviously channel, and htmode. I chose very conservative settings here a bandwidth of only HT20. I have had trouble setting up any VHT40 and up, it would not initialize properly but I have only spent limited time trying out the combinations. Please try what works best for you.
2.
AP wifi configuration - /etc/config/wireless
option ifname 'wlan0-apmesh' option network 'olsrmesh' option encryption 'none' option device 'radio0' option mode 'ap' option ssid 'olsrmesh' option hidden '1'
So this is basic OpenWrt configuration for creating an open AP, option hidden ‘1’
hides its SSID to not confuse people trying to connect. Remember, we only use this AP-STA connection for OLSR meshing between our local nodes.
3.
Now get some IPs (IPv4) from
Freifunk Berlin in advanced mode. A /29
or /28
should be fine, depending on how many local nodes you want to be AP-STA-OLSR-meshing (besides none, of course ;)).
4.
AP wifi network configuration - /etc/config/network
config interface 'olsrmesh' option proto 'static' option ifname '' option netmask '255.255.255.240' # subnet mask of 10.31.70.128/28 I got option ipaddr '10.31.70.129' # the first usable ip from it I have found out with [ipcalc](http://jodies.de/ipcalc) option ip6assign '64'
5.
The following is for STA clients. Please also set the same settings for wifi hardware as on AP in step 1.
STA CLIENT wifi configuration - /etc/config/wireless
config wifi-iface option ifname 'wlan0-stamesh' option network 'olsrmesh' option encryption 'none' option device 'radio0' option mode 'sta' option ssid 'olsrmesh'
6.
STA CLIENT wifi network configuration - /etc/config/network
config interface 'olsrmesh' option proto 'static' option ifname '' option netmask '255.255.255.240' # subnet mask of my 10.31.70.128/28 option ipaddr '10.31.70.130' # second usable ip from my /28 option ip6assign '64'
Rinse and repeat on all clients, increment usable ip.
7.
Very important: To get OLSR to work, follow the
Mesh via LAN tutorial starting from ssh config STEP 10 and replace all fflan
with olsrmesh
. Also leave out option Mode ’ether’
in STEP 14 since this is not an ethernet connection.
It is also possible to run AP/STA simultaneously on a node to extend this dfs-semi-mesh, but the BI (Beacon Interval) of the AP/STA on the node must match.
In summary, while this way of building a half-baked local mesh network sort of works, it would be appreciated if DFS was implemented for 802.11s.