Mesh network using Arduino Yun

i need to build a wireless mesh network using inbuilt wifi module of arduino yun as each node. this arduino yun is same as openwrt supporting routers. has anyone tried this setup? how are nodes connected to each other in wireless mesh using BATMAN-adv protocol?

Start with this:
https://openwrt.org/docs/guide-user/network/wifi/mesh/batman
Overall, remember that there are two layers. The first layer is 802.11s, which is built into the wireless driver. It will send packets over the air without regard to who may receive them, or if they are received. The second layer is BATMANadv, which works up a table by MAC address to remember if the destination for a packet can be reached directly, or if it needs to be relayed via another mesh station.

At the top BATMAN creates a bat0 interface, which works like an Ethernet port, i.e. you can bridge it into the LAN network and the routers will be linked as if connected by an Ethernet switch.

802.11s also offers an internal mesh forwarding mechanism, which must be turned off to use BATMAN instead. This is the mesh_fwding = 0 option.

You may find some old documentation referring to the use of an "adhoc" radio interface under BATMAN instead of 802.11s. This is not recommended any more. 802.11s is the modern standard and has better driver support.

2 Likes

Thank you very much for your reply.... i followed exactly same example that you have refered. According to that document we create 1 layer 3 ap and 1 layer 2 ap(mesh 802.11s). And same for other nodes. My qns is how do these ap communicate to each other..?? How do one node knows other multiple nodes within range at the same time?

1 Like

802.11s is layer 1. BATMAN-adv is layer 2 (it works through MAC addresses not IP addresses). The standard kernel gives layer 3 functionality, that is an IP address to the bat0 interface.

I think that BATMAN employs both active and passive probing to discover neighboring nodes (i.e. those that are in radio range). Nodes broadcast who their neighbors are and every node uses that information to construct a table of the whole network including the MACs of nodes that are not in their direct radio range and how to reach them.

It is more advanced than the builtin 802.11s layer 2 (HWMP) that you won't be using. Though there is nothing that wrong with HWMP for a small mesh.

2 Likes

I see the Arduino Yun is using the Atheros 9331 which was around from 2011 according to

https://wikidevi.com/wiki/Atheros_AR9331

I have a couple of devices that use them. I run them with either OLSR (ontop stock OpenWRT build) or 802.11s (LibreMesh)

They work well but overall wireless performance not that high, especially when using them in AP and Mesh mode at the same time (if you for example only have 1 radio) Performance also drop the more devices you use in the mesh

These devices and others with same AR9331 chipset are still more expensive that the Arduino Yun

Zsun TF Reader
GL-USB150
TP-Link MR3020
TP_Link WR703N
etc

I see the advantage of the Arduino Yun is POE support and 100Mbps Ethernet

I will try in the future these Arduino Yun also

Howto troubleshoot BATMAN-adv layer 3 issues ?
My latest builds LibreMesh IPv6 works but not IPv4...