Commit 2447adfd authored by olivernyc's avatar olivernyc
Browse files

Fixes

parent e0f98b19
......@@ -2,6 +2,3 @@
layout: default
title: Hardware
---
# This is a great hardware section!
* Blah
......@@ -12,14 +12,14 @@ Supernode 2 (node 570) is located at 1196 Metropolitan Avenue in Brooklyn New Yo
## Coverage
<img title="Coverage area" src="../img/nycmesh-570-coverage.jpg">
<img title="Coverage area" src="/img/nycmesh-570-coverage.jpg">
## Photos
<img title="The radios" src="../img/nycmesh-570-radios.png" style="width:49.7%;">
<img title="Point-to-point link to node 227" src="../img/nycmesh-570-227-link.png" style="width:49.7%;">
<img title="The router" src="../img/nycmesh-570-router.png" style="width:49.7%;">
<img title="Battery backup" src="../img/nycmesh-570-battery.png" style="width:49.7%;">
<img title="The radios" src="/img/nycmesh-570-radios.png" style="width:49.7%;">
<img title="Point-to-point link to node 227" src="/img/nycmesh-570-227-link.png" style="width:49.7%;">
<img title="The router" src="/img/nycmesh-570-router.png" style="width:49.7%;">
<img title="Battery backup" src="/img/nycmesh-570-battery.png" style="width:49.7%;">
## Hardware
......@@ -42,13 +42,13 @@ section td {
## Schematic
<img title="Schematic" src="../img/nycmesh-570-schematic.png">
<img title="Schematic" src="/img/nycmesh-570-schematic.png">
## Backhaul
A pair of AirFiber 24s was donated to NYC Mesh and was deployed between 227 and 570 to provide Brooklyn with a near 1Gbps backhaul link to Supernode 1, the Manhattan area of the mesh and the internet.
<img title="Deploying an AF24 at node 227" src="../img/nycmesh-570-227-link-2.png" style="max-width:480px;">
<img title="Deploying an AF24 at node 227" src="/img/nycmesh-570-227-link-2.png" style="max-width:480px;">
## Battery backup
......
......@@ -12,10 +12,10 @@ Our community's source repositories are hosted on Github in the [nycmeshnet orga
We are working to improve our router firmware, which is a fork of LibreMesh with a few modifications specific to our network.
- [lime-sdk](https://github.com/nycmeshnet/lime-sdk)
- [nycmeshfeed](https://github.com/nycmeshnet/nycmeshfeed)
* [lime-sdk](https://github.com/nycmeshnet/lime-sdk)
* [nycmeshfeed](https://github.com/nycmeshnet/nycmeshfeed)
#### Website
- [nycmeshnet.github.io](https://github.com/nycmeshnet/nycmeshnet.github.io) - Our public website is hosted by Github and its full source is available here.
- [map-nodes](https://github.com/nycmeshnet/map-nodes) - This script pulls from our node spreadsheet and renders the data which powers the node map on our website.
* [nycmeshnet.github.io](https://github.com/nycmeshnet/nycmeshnet.github.io) - Our public website is hosted by Github and its full source is available here.
* [map-nodes](https://github.com/nycmeshnet/map-nodes) - This script pulls from our node spreadsheet and renders the data which powers the node map on our website.
---
layout: default
hidetitle: true
title: NYC Mesh Project docs
---
## NYC Mesh Project docs
NYC Mesh is a community owned network in the New York City area.
[Join our network through our main page.](https://nycmesh.net/join)
......
......@@ -3,5 +3,9 @@ layout: default
title: Help Us
---
To learn more about joining the network, check out our main page at [Join](https://nycmesh.net/join)
We have a [list of available volunteer positions](http://nycmesh.net/help)
You can [join our Slack group](http://slack.nycmesh.net) where we do our planning
To learn more about joining the network, check out our [join page](https://nycmesh.net/join).
---
title: Help
layout: default
category: Help us
---
We have a [list of available volunteer positions](http://nycmesh.net/help)
You can [join our Slack group](http://slack.nycmesh.net) where we do our planning
......@@ -18,7 +18,7 @@ This opens a [vi editor](http://www.lagmonster.org/docs/vi.html) and you can cha
For some nodes, their main purpose is to be an internet gateway. To ensure that they always try to be online, you can add a watchdog script that pings a known website and calls "network restart" if it fails. These kind of scripts often ping 8.8.8.8, which is Google's DNS server.
I've discovered 3 ways to recover a qMp mesh router that has functioning wifi but has lost internet- ```network restart```, ```bmx6 restart``` and restarting dnsmasq-```killall dnsmasq; dnsmasq start```. Sometimes the dns forwarder, dnsmasq will stop working correctly letting you ping some things and not others. dnsmasq will then forward bad dns info to the other routers too so it needs to be fixed quickly! ```killall dnsmasq; dnsmasq start``` will fix it.
I've discovered 3 ways to recover a qMp mesh router that has functioning wifi but has lost internet- `network restart`, `bmx6 restart` and restarting dnsmasq-`killall dnsmasq; dnsmasq start`. Sometimes the dns forwarder, dnsmasq will stop working correctly letting you ping some things and not others. dnsmasq will then forward bad dns info to the other routers too so it needs to be fixed quickly! `killall dnsmasq; dnsmasq start` will fix it.
gwck is a qMp utility that is restarted after network restart.
......@@ -30,7 +30,7 @@ I'm using "Signal: unknown" to show there is no connection. It seems to work rel
"sleep 5" is usual between "wifi down" and "wifi up". I've found it not necessary when there are no connections, but I'll leave it there in case.
You can [download the watchdog here](../../download/watchdog.html)
You can [download the watchdog here](/download/watchdog.html)
in the terminal-
......@@ -63,7 +63,7 @@ restartNetwork()
/etc/init.d/dnsmasq start
}
#gets date-time from log and exit if recently run. date-time is first two words of last line
#gets date-time from log and exit if recently run. date-time is first two words of last line
exitIfRecentRestart()
{
if [ -e $LOG ]; then
......@@ -93,11 +93,11 @@ fi
LOG="/tmp/log/mesh-watchdog.log"
FORCE=0
if [ "$1" = "-n" ]; then
echo "restartNetwork"
restartNetwork
if [ "$1" = "-n" ]; then
echo "restartNetwork"
restartNetwork
exit 1
elif [ "$1" = "-f" ]; then
elif [ "$1" = "-f" ]; then
echo "force tests-"
FORCE=1
elif [ "$1" = "-w" ]; then
......@@ -109,7 +109,7 @@ elif [ "$1" = "-b" ]; then
restartWifi; wait 60; restartNetwork
exit 1
elif [ "$1" != "" ]; then
echo -e "Usage: `basename $0` [OPTION]\n\nTests wifi and internet connections and restarts if necessary (default)\n\n\t-f\tforce test\n\t-n\trestart network\n\t-w\trestart wifi\n\t-b\trestart both wifi and network\n\t-h\toptions\n"
echo -e "Usage: `basename $0` [OPTION]\n\nTests wifi and internet connections and restarts if necessary (default)\n\n\t-f\tforce test\n\t-n\trestart network\n\t-w\trestart wifi\n\t-b\trestart both wifi and network\n\t-h\toptions\n"
exit 1
fi
......@@ -129,14 +129,14 @@ NOSIGNAL=`echo "$IWINFO" | grep 'Signal: unknown' | wc -l`
if [ $WLAN -eq 0 ]; then
echo "no wlan interfaces, wifi is probably disabled"
elif [ $WLAN -eq $NOSIGNAL ]; then
# all wlan interfaces are down, so restart wifi
# all wlan interfaces are down, so restart wifi
echo "$DATE restart wifi- wlans:$WLAN no-signal:$NOSIGNAL interfaces:$WI" | tee -a $LOG
restartWifi
sleep 60
restartNetwork
exit 1
else
echo "wifi:ok wlans:$WLAN no-signal:$NOSIGNAL interfaces:$WI"
echo "wifi:ok wlans:$WLAN no-signal:$NOSIGNAL interfaces:$WI"
fi
# restart network if ping google.com && 8.8.8.8 fails 4 times
......@@ -144,7 +144,7 @@ count=1
while [ "$count" -le 4 ]
do
if /bin/ping -c 1 google.com >/dev/null && /bin/ping -c 1 8.8.8.8 >/dev/null; then
echo "wan:ok ping-count:$count"
echo "wan:ok ping-count:$count"
exit 0
fi
let count++
......@@ -153,7 +153,7 @@ echo "$DATE network restart" | tee -a $LOG
restartNetwork
```
Make it executable-
Make it executable-
```
chmod +x /root/mesh-watchdog.sh
......@@ -170,6 +170,3 @@ It can run once a minute as it detects whether a network restart has just occurr
Thanks to Nitin for help with the wifi problem and Zach for help with dnsmasq.
[Email me](mailto:brian@nycmesh.net) if you have any questions or suggestions.
{{ define "main" }}
<main class="bg-white bt bw05 b--light-gray sans-serif flex flex-row-l flex-column">
<div class="bg-white w-100 mw8 pa4">
<h1>
{{ .Title }}
</h1>
{{ .Content }}
<div class="bg-white w-100 mw8 pa4-ns pa3">
<div class="f4-ns f5 measure-wide">
<h1 class="f2-ns f3 fw6 mv0">
{{ .Title }}
</h1>
{{ .Content }}
</div>
</div>
</main>
{{ end }}
\ No newline at end of file
{{ define "main" }}
<main class="bg-white bt bw05 b--light-gray sans-serif flex flex-column">
<div class="bg-white w-100 mw8 pa4">
<div class="f4 lh-copy measure-wide">
<h1 class="f2 fw5">{{ .Title }}</h1>
<main class="bg-white bt bw05 b--light-gray sans-serif flex flex-row-l flex-column">
<div class="bg-white w-100 mw8 pa4-ns pa3">
<div class="f4-ns f5 measure-wide">
<h1 class="f2-ns f3 fw6 mv0">
{{ .Title }}
</h1>
{{ .Content }}
</div>
</div>
......
{{ define "main" }}
<main class="bt bw05 b--light-gray sans-serif flex flex-row-l flex-column">
<div class="bg-white w-100 mw8 pa4">
<div class="f4 lh-copy measure-wide">
<div class="f4-ns f5 lh-copy measure-wide">
<h1 class="f2-ns f3 fw6 mv0">
{{ .Title }}
</h1>
{{ .Content }}
</div>
</div>
......
{{ $currentPage := . }}
<div class="pl4 w-30-l flex justify-end-l br bg-near-white b--light-gray">
<div class="pl4-ns pl3 w-30-l flex justify-end-l br bg-near-white b--light-gray">
<div class="w5 overflow-y-hidden flex flex-column">
<a href="/" title="Home" class="flex-shrink-0 h3 f3-ns f4 ttu fw7 black nowrap flex items-center">
<img src="/img/logo.svg" class="h2 mr2" />
<span class="db-ns dn f4">NYC Mesh
<span class="f4">NYC Mesh
<span class="ml1 blue f5">Docs</span></span>
</a>
<div class="overflow-y-scroll pv4">
<div class="overflow-y-scroll pv4-ns pv3">
<ul class="list ma0 ph0">
{{ range .Site.Sections }}
<li>
......
......@@ -5,14 +5,6 @@ body {
height: 100%;
}
h1,
h2,
h3,
h4,
h5 {
margin: 0;
}
body {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
......
#!/bin/sh
# mesh-watchdog v1.1.1, NYC Mesh, Brian Hall
restartWifi()
{
wifi down
sleep 5
wifi up
}
restartNetwork()
{
/etc/init.d/network restart
if /etc/init.d/gwck enabled; then
/etc/init.d/gwck restart
fi
/etc/init.d/bmx6 restart
sleep 4
killall dnsmasq
/etc/init.d/dnsmasq start
}
#gets date-time from log and exit if recently run. date-time is first two words of last line
exitIfRecentRestart()
{
if [ -e $LOG ]; then
set -- `tail -1 $LOG`
LASTRUN=`date --date="$1 $2" +%s`
if [ "$?" = "0" ]; then
#don't run for 1200s (20 minutes)
NEXTRUN=$(($LASTRUN + 1200))
NOW=`date +%s`
es=$(($NOW - $LASTRUN))
printf "time since last restartNetwork: "
printf '%dd %dh:%dm:%ds\n' $(($es/86400)) $(($es%86400/3600)) $(($es%3600/60)) $(($es%60))
if [ $NOW -lt $NEXTRUN ]; then
echo "waiting $(($NEXTRUN - $NOW)) seconds, use option -f to force"
exit 1
else
echo "run tests-"
fi
else
echo "invalid date from log, run tests-"
fi
else
echo "no log, run tests-"
fi
}
LOG="/tmp/log/mesh-watchdog.log"
FORCE=0
if [ "$1" = "-n" ]; then
echo "restartNetwork"
restartNetwork
exit 1
elif [ "$1" = "-f" ]; then
echo "force tests-"
FORCE=1
elif [ "$1" = "-w" ]; then
echo "restartWifi"
restartWifi
exit 1
elif [ "$1" = "-b" ]; then
echo "restart wifi, wait, restart network"
restartWifi; wait 60; restartNetwork
exit 1
elif [ "$1" != "" ]; then
echo -e "Usage: `basename $0` [OPTION]\n\nTests wifi and internet connections and restarts if necessary (default)\n\n\t-f\tforce test\n\t-n\trestart network\n\t-w\trestart wifi\n\t-b\trestart both wifi and network\n\t-h\toptions\n"
exit 1
fi
if [ $FORCE != 1 ]; then
exitIfRecentRestart
fi
DATE=`date +%Y-%m-%d\ %H:%M:%S`
IWINFO=`iwinfo`
# find lines containing "ESSID"|get name (previous word)|replace return with ","
WI=`echo "$IWINFO" | grep ESSID | grep -Eo '^[^ ]+' | sed ':a;N;$!ba;s/\n/, /g`
# count the number of wlan interfaces, and number of wlans with 'no signal'
WLAN=`echo "$WI" | wc -w`
NOSIGNAL=`echo "$IWINFO" | grep 'Signal: unknown' | wc -l`
if [ $WLAN -eq 0 ]; then
echo "no wlan interfaces, wifi is probably disabled"
elif [ $WLAN -eq $NOSIGNAL ]; then
# all wlan interfaces are down, so restart wifi
echo "$DATE restart wifi- wlans:$WLAN no-signal:$NOSIGNAL interfaces:$WI" | tee -a $LOG
restartWifi
sleep 60
restartNetwork
exit 1
else
echo "wifi:ok wlans:$WLAN no-signal:$NOSIGNAL interfaces:$WI"
fi
# restart network if ping google.com && 8.8.8.8 fails 4 times
count=1
while [ "$count" -le 4 ]
do
if /bin/ping -c 1 google.com >/dev/null && /bin/ping -c 1 8.8.8.8 >/dev/null; then
echo "wan:ok ping-count:$count"
exit 0
fi
let count++
done
echo "$DATE network restart" | tee -a $LOG
restartNetwork
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment