Select Page

open-mesh omp2This little post is about Open-mesh cloud controlled wireless access points and a little scripting to make them function in our environment.

So, a very nice man donated several of these Open-mesh wireless access points to our international school. They are really affordably priced and the concept behind them is great.¬†They can run off of passive POE or regular power and can detect if they are on the wire or not. When they are on the wire they can act as a gateway to other devices and if they do not detect the wire they can wirelessly mesh with others that are in gateway mode creating a mesh of wireless ap’s to serve your single SSID across a campus. They connect to open-mesh’s cloud service where they can be centrally monitored and configured from anywhere.

Now all of that is great right? Absolutely! The only issue is we are in Ethiopia and in this developing country there are two things that are very inconsistent. Electricity, and Internet connection. Now sure, we have a huge generator, and UPS’s in the server closet, as well as a 12Mb fiber line provided by the telecom. UPS’s are very expensive here and they do not last long so we just can’t cover everything. When we lose power, which happens frequently each day, these device are not necessarily designed for that. When they come back up and don’t initially find a connection to the cloud, they tend to go into what I like to call a zombie state. They are on, but they stop trying to connect to the cloud so they can function properly and actually communicate on the network. After much troubleshooting and frustration and support tickets and firmware updates, I finally just came up with a script that runs every 10 minutes and checks to see if it can ping the inside gateway on our network. If it fails it reboots itself and usually finds the connection to the cloud and starts to work properly.

Here are the the instructions for the rebootIfDead script.

Find the IP of your device in the cloudtrax console and ssh into the device.

ssh root@DEVICEIP password

2015-02-20_07-38-09 2015-02-20_07-38-21

Change the target=”xx.xx.xx.xx” line to your gateway IP and copy and paste the following lines.

 

2015-02-20_07-59-29

This will create a file called rebootIfDead in the /sbin folder, mark it executable and fill it with the following contents:

 

Next it will add a recurring 10 minute launch of the script to the crontab.

Maybe there is another way to fix this issue or maybe it just presents itself in inconsistent power and internet situations such as ours.

Do you run Open-mesh, I would love to hear you thoughts!

Remember, be safe and please script at your own risk!