Voice Over B.A.T.M.A.N.

Bringing up Wifi

On Friday I set about testing Wifi on the two Mesh Potato prototypes. The N-type antenna connectors attach to the MP PCB via a pigtail with a tiny Hi-rose style connector. This looks a bit fragile so I decided to mount the two MPs in some weatherproof boxes so I had a firm mounting for the antenna pig tail. I chose one metal and one plastic, to see if the case material makes any difference to the Wifi performance. They wont be completely weatherproof (I’ll just run the phone power, and Ethernet cables through holes), but enough to take outside for some tests and withstand some handling.

I mounted both the PCB and the antenna connector in the lid, so the whole assembly can be removed without putting any strain on that tiny PCB antenna connector. Only problem is I can’t see the LEDs – will need to make a little window on the bottom of the box.

Mesh Potatoes mounted on box lids

Mesh Potatoes mounted on box lids

Having secured the antenna connector I brought Wifi up. I thought I would take the small, sensible step of trying to associate with my home Wifi network first. It was all looking good until my MP seemed to slow down then stop responding entirely. Then my laptop (also connected via Wifi) started to slow down and lost Internet connectivity. Oops, routing loop between Ethernet and Wifi on the Mesh Potato! Didn’t know you could bring down a whole network that way.

As Wifi was coming up automatically on boot it was hard to stop, so I ended up re-flashing the router and going straight to Batman. This came up straight away and I had two MPs and a Nanostation happily meshing with each other.

The blinking of the two Wifi lights as batman sends out messages every second is mesmerising 🙂

Voice Over B.A.T.M.A.N.

After a bit of messing around with Asterisk conf files I made a MP-MP phone call over Batman and the Mesh Network. The audio in one direction was fine but a little distorted in the other direction. After a break of a few days I took a look at this bug. The problem ended up being the Asterisk channel driver, it was accidentally sending both RTP audio and ring tone to the FXS driver during a call, i.e. ring tone wasn’t being switched off when the call was answered. This was overloading the FXS driver FIFO and causing distorted audio. Curiously, it worked OK until I tried a call over Wifi.

Anyway I have fixed this bug now and tested a few different codec configurations over the mesh including ulaw, gsm with 20ms frames, and GSM with 80ms frames. We can also make calls between a MP and a SIP phone connected to the Ethernet port of the MP. The load av is around 0.5 during a call (using the GSM codec).

Here is a block diagram of the test setup. The Laptop is used for monitoring. It’s cool that I can ssh to the remote MP over the mesh network and mess with Asterisk conf files, run top etc.

MP tests for first calls over the mesh

MP tests for first calls over the mesh

The audio sounds great. We can’t hear any echo, thanks to the Oslec echo canceller which seems to run fine on this platform. To stress the system a bit I tried ping flooding from my laptop. This affected the audio quality but the call was still very intelligible. Like driving under a bridge with a cell phone. This is interesting – perhaps a mesh potato network will have a “soft” degradation of quality as network traffic increases. Call quality will drop a little, but the network may not fall over.

The reliability of the Mesh Potato hardware has been remarkably good so far. I left the prototypes running for about 5 days, and when I came back the mesh was still running, and picking up a phone gave me dial tone. Can’t complain about that on hardware where the solder has barely cooled!

Tags: , , ,

4 Responses to «Voice Over B.A.T.M.A.N.»

  1. June 17, 2009 at 9:30 am, Fowl said:
    Very Impressive! Looking forward to seeing how big a mesh can get, and how it handles high load. I mean theoretically, a call only takes like 64kbps, right? So conservative 3 or 4 hops means ~10mbps which is still like 100 calls!

  2. June 18, 2009 at 10:16 am, Diaan said:
    I have been following your blog for some time now and I must say the closer the MP gets to completion the more excited I'm getting. I'm all for self-provisioning of telecoms and would *kill* for tech like this. I also have a number of friends who live on farms and when I told them about mesh networks, Antoine van Gelder's project and this they all got very excited. Seems they're all pining for decent communications.

  3. June 18, 2009 at 7:56 pm, mungewell said:
    Interesting project, glad to see that your testing is going well. Are you use single hops in the mesh, or relaying through other nodes? I fear that relaying will affect the performance quite significantly. You can emulate this situation by using 'iptables' on one node to drop all packets from another node so that the mesh will auto-magically reconfigure an alternate route via a 3rd node. command would be like: iptables -A INPUT -m mac --mac-source 00:E0:4C:A2:7E:66 -j DROP email me if you want a more detailed discription. Have fun, Mungewell.

  4. June 22, 2009 at 5:23 pm, Thomas said:
    Thankyou very much to all Team. I cant wait to deploy in my country. regards, thomas

Leave a Reply