Skip to content

Instantly share code, notes, and snippets.

@boxysean
boxysean / gist:5111299
Created March 7, 2013 20:03
The layer 2 batman mesh is working, but I can't seem to get a bridge from eth0 to wlan0 to go. WHAT I WANT: To create a route on this device to 10.0.0.0/8 over the bat0 or mesh bridge interface, in order to see my 10.0.3.0/24 that is over the wlan0 ad-hoc network and connected. Not sure how to do that. Followed the quick start guide. <http://www…
root@brooklynnet-never:~# cat /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
ifconfig wlan0 mtu 1528
batctl if add wlan0
ifconfig br-lan mtu 1528
batctl if add br-lan
@boxysean
boxysean / unreachable-qrst
Created March 7, 2013 19:41
Running batman-adv on OpenWrt Attitude Adjustment 12.09-rc1, ad-hoc mode on NanoStation M2s. They "associate" according to OpenWrt LuCI and see each other according to "batctl o", but unable to ping by using the batctl layer 2 ping.
root@brooklynnet-never:~# batctl o
[B.A.T.M.A.N. adv 2012.3.0, MainIF/MAC: wlan0/00:27:22:4c:94:77 (bat0)]
Originator last-seen (#/255) Nexthop [outgoingIF]: Potential nexthops ...
e2:46:9a:34:1f:77 0.260s (255) e2:46:9a:34:1f:77 [ br-lan]: dc:9f:db:03:89:b1 (225) e2:46:9a:34:1f:77 (255)
dc:9f:db:02:89:b1 0.690s (255) dc:9f:db:03:89:b1 [ br-lan]: dc:9f:db:03:89:b1 (255)
c6:3d:c7:a8:2c:1d 0.300s (197) dc:9f:db:02:89:b2 [ wlan0]: dc:9f:db:02:89:b2 (197)
dc:9f:db:03:89:b1 0.660s (255) dc:9f:db:03:89:b1 [ br-lan]: e2:46:9a:34:1f:77 (225) dc:9f:db:03:89:b1 (255)
dc:9f:db:02:89:b2 0.200s (224) dc:9f:db:02:89:b2 [ wlan0]: dc:9f:db:02:89:b2 (224)
root@brooklynnet-never:~# batctl p dc:9f:db:03:89:b2
PING dc:9f:db:03:89:b2 (dc:9f:db:03:89:b2) 20(48) bytes of data
import cv
import sys
import os
image = cv.LoadImage(sys.argv[1])
storage = cv.CreateMemStorage()
haar=cv.Load('haarcascade_frontalface_default.xml')
detected = cv.HaarDetectObjects(image, haar, storage, 1.1, 2, cv.CV_HAAR_DO_CANNY_PRUNING, (20,20))
@boxysean
boxysean / router-hackz-001.md
Created December 10, 2012 15:04
Router Hackz: OpenWrt

A little report back from tonight's hack sesh:

  • Peter and Jonathan tried to hack into Peter's Netgear (I think it was a WNR1000) to flash OpenWrt. They weren't able to get the machine to respond to the flashing process, the Broadcom processor on that device doesn't appear to be so popular and there isn't much online community support for this product.

  • Karl brought 3 old WRT54Gs and discovered one of them was already running OpenWrt! Awesome, a really old build from 2006. We thought about upgrading the firmware but it was password protected really well -- the admin password prompt even worked when doing a factory reset on the sucker.

  • Johann, Sae, and Robbie played around with the OpenWrt interface and discovered how to blink the LEDs on the main page, how to SSH into the router, and thought about possible applications of an OpenWrt router. Johann and I were setting up a captive portal on the device to have it so every website accessed was redirected to the router's HTTP webserver.

Good stuff! We'll me

@boxysean
boxysean / router-hackz-002.md
Created December 10, 2012 15:03
Router Hackz: Wireshark

A report back from Tuesday's hack sesh:

  • We started off by installing Wireshark on our computers. Sae and Sarah run OS X 10.8 (Mountain Lion) which does not come with X11, so they needed to install XQuartz before launching Wireshark. (Sae, there you go, that's how you do it buddy.) We then dived in and played around with the basic features. (X11 is a cross-platform windowing system like Aqua and Cocoa are windowing systems for OS X. Lots of open source projects use it for their GUIs because it allows to code one solution for many platforms. The trade-off is the applications don't have the Apple/Windows look-and-feel that we all expect.)

  • Using Wireshark is a bit like a scavenger hunt. There's a lot of information flowing on our local networks, the fun part is trying to figure out what is interesting. Robbie and Peter, connected to the standard NYU wireless network, started to capture packets with dynamic webpages streaming election updates. They saw a lot of web traffic racing in and out of their own comp

@boxysean
boxysean / data-without-borders-final.md
Created December 5, 2012 03:44
Data Without Borders Final

Red Hook Mesh Network

My plan was to collect data about the usage of the Red Hook mesh network, but I failed to collect the proper data!

There is a unix utility called collectd which looks to be a great system operator tool for collecting and storing data over time. collectd is installed on all the routers in the mesh network, however I was never able to get the iptables plugin to report bandwidth used for any collectd instance. Sigh. I even asked people to help and tried a hack to get something, but nothing worked.

When the time came to perform some data analysis, I knew that although I didn't have quite the right data, I was still collecting data, so I started looking into that. A plugin that reported data on the mesh routing algorithm was installed, but when I investigated the data it turned out I had only two whole hours of said data. It looked like some of th

@boxysean
boxysean / hurricane-hackers-rhi-mesh.md
Created November 16, 2012 23:32
Hurricane Hackers RHI Mesh
@boxysean
boxysean / rhi-mesh-02.md
Created November 14, 2012 03:35 — forked from virtadpt/rhi-mesh-01.md
Red Hook Initiative mesh update 002

The weekend was a great buildout of the network. The weekdays are a bit quieter, but progress is still being made.

About

Internet connectivity is largely out in Red Hook. (Open question: How out?) A collection of initiatives are working together to rapidly build infrastructure to provide free, reliable Internet connectivity to Red Hook.

The goal of this project is twofold: to provide Internet connectivity in the short-term for the disaster relief effort, and to create an infrastructure for future disaster responses.

Groups involved:

@boxysean
boxysean / rhi-mesh-01.md
Created November 12, 2012 21:52
Red Hook Initiative mesh update: first edition

This is the first of periodic updates I'll make as I gather information.

About

Internet connectivity is largely out in Red Hook. (Open question: How out?) A collection of initiatives are working together to rapidly build infrastructure to provide free, reliable Internet connectivity to Red Hook.

The goal of this project is twofold: to provide Internet connectivity in the short-term for the disaster relief effort, and to create an infrastructure for future disaster responses.

Groups involved:

@boxysean
boxysean / beaglebone-DMX.md
Created November 8, 2012 06:20
beaglebone-DMX README

Output DMX from your BeagleBone

DMX is a standard in the lighting industry and is used in applications from architecture to art installations to stage production.

Build instructions

  1. build pasm by cding into pasm/pasm_source and running the appropriate pasm build script (linux, mac, windows)
  2. type make in the project's root directory