Category: Hardware

Finding Raspberry Pi’s

I’m using Raspberry Pi’s for all sorts of projects. They’re fabulous, inexpensive computers that run Linux and can interact with the physical world. But sometimes, I have trouble finding them on my network. I know they’re there but I don’t have any idea of their IP address. For Pi’s that are connected to the display, keyboard and mouse, this isn’t much of a problem. But when the Pi is running headless, it’s a bit annoying trying to find it.

An easy way is to use nmap to find the all hosts on the local network with a specific MAC address prefix. For Raspberry Pi’s, there are two: B8:27:EB for older RPy models 1, 2, 3 and DC:A6:32 for RPy 4.

#! /bin/sh

nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'
nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/DC:A6:32/{print ip}'

nmap will find hosts on the specified network and awk will pull out the IP address of the host if the MAC address prefix matches those of the RPy’s.

Note that you’ll need to change the 192.168.1.0/24 to match your local network.

Black Rock City Wifi Summit 2015

The Black Rock City Wifi Summit 2015 took place yesterday. It was an interesting discussion with a collection of people from inside the Burning Man organization and artists / community who want to provide wifi to their art installation and camps. It was held at the Internet Archive which is a very interesting idea / place.

Tidbits

There are some bits of information that I learned or re-learned while at the summit.

BRC internet basically uses all the available bandwidth coming into Gerlach, around 40Mb/s, to support all the services for a temporary city of 70,000 people.

In 2014, the bandwidth was maxed out on Thursday before the event started.

Internet access is becoming / has become critical for the support of Burning Man. Without it, the event might not be able to take place.

Ubiquiti AirMax protocol deals well with the hidden node problem.

It’s important that the uplink antenna be stable and pointed at the center camp. Movement or misalignment of the antenna causes problems for everyone in that sector by reducing the available bandwidth.

The uplink antenna needs line of sight to the center camp tower.

If you need to use tape to seal anything, use aluminized hvac tape instead of duct tape. The glue on duct tape deteriorates rapidly in the heat and dust of the playa. The aluminized tape will last much longer.

During the weeks before and the event, download is maxed out. The week after, it’s the upload bandwidth that’s maxed out.

At 4:00 and A there’s usually a phone booth that uses VOIP to allow calls to the outside world. Calls are limited to 3 minutes. Because of bandwidth usage, the other side will be able to hear you while you might not be able to hear them. That makes for interesting conversations when you’re stoned.

Don’t use 5Ghz band for access points or other projects. It’s used for the uplinks and putting up local access points (or anything else) in the 5Ghz band will just interfere with the uplinks.

There’s lots of local, on playa bandwidth available. If there’s lots of data that you

Mount the local access points 6 or 7 feet in the air, no higher. This will help reduce interference and the hidden node problem on the local wifi connections.

If there’s any data you want to make available, consider setting up a server on the playa. If you do, let the folks on the BRC wifi mailing lists know about it. They may be able to help let people know about the server by including it on the captive portal page, setting up a dedicated IP address and / or a DNS entry.

Protect the access point and uplink power sources from water and dust. A simple way to do this is to put them in a tupperware type container. Cut a notch near the edge to allow any wires into the container and seal it closed.

There are no guarantees. The bandwidth available is completely subjective to the current needs and wifi in camps and art installations is at the bottom of the priority list.

Lastly and perhaps most importantly, the folks running the BRC network are at Burning Man to enjoy themselves. Leave them alone and talk with other camps and installations about any issues that you may be experiencing.

Setup On The Playa

There are two main components needed to setup wifi on the playa – an uplink radio and an access point. The uplink radio runs in the 5Ghz band and the access point in the 2.4Ghz band. The recommended uplink radio is the NanoBeam from Ubiquiti. A NanoBridge will work if you have a spare one laying about. The recommended access point is a Ubiquiti Unifi AP.

To start, reset the NanoBeam to factory settings before bringing to the playa can help you save some hassles and wasted time on playa. With it reset to factory defaults, mount it with a clear line of sight to the center camp tower and power it up. It should connect and start provisioning. This can take a while, as in hours depending on what else is going on. Use a laptop to monitor the setup and configuration.

After the NanoBeam has connected, been provisioned and received it’s IP address, connect and power up the local access point.

Consider a Unifi AP Outdoor. The rain last year helped several people discover that the Unifi AP’s aren’t waterproof. Water and playa dust will do corrosive wonders to exposed connections.

Note that the UniFi AP Outdoor 5G runs in the 5Ghz band, don’t use it.. Why? Because 5Ghz is used for the uplinks.

The configuration of the Unifi AP’s that’s downloaded from the playa NOC will most likely include a captive portal that times out after some period. This will help manage the bandwidth needed since you’ll have to re-accept the terms and conditions page to connect back to the Internet.

If you don’t use a Unifi AP, set your access point SSID to the camp name / location and make it discoverable. Set up a captive portal for your users. It’ll help manage available bandwidth and provide service to the community:

Projects

I’ve been toying with different ideas for project on the playa of which two seem to be most likely to happen this year.

Wifi Kiosks

The first is a local wifi spot and map server but since there will be playamap onsite and there’s lots of local bandwidth available, I think the mapping may get put on the back burner for this year.

It turns out that there were a few like minded people at the summit talking about projects to bring wifi to the masses. I’m planning to work with the folks at http://ki7wv.net/ to create some solar powered wifi kiosks and distribute them on the playa.

Trasher

Set up a Raspberry Pi image that pulls SNMP status from the Ubiquity NanoBeam uplinks. This will allow an uplink operator to get an idea on how well their connections works over time.

I’m currently thinking this can be done with Cacti or Nagios or perhaps just a simple Graphite setup. I think Nagios is way overkill for this but we’ll see. Some experimentation needs to be done…

Tags : , ,

Chasing a Rollover Crash

I was reminded recently that when writing code in C, you have to take care to understand how variable are going to be used when declaring them. I was had just finished working on the code used to control the fire effects at The Crucible‘s Maker Faire 2013 booth when the system just seemed to come to a halt. That’s not quite what it was supposed to do.

The system was designed to have 3 24′ towers as the central part of the booth. On top of the towers would be accumulator based fire effects – a 24″ round sphere w/ a 2″ exhaust port, a 9″ x 24″ oblong tank w/ a massive 3″ pneumatic solenoid / exhaust and three smaller accumulators based on old fire extinguishers. The solenoids on the fire effects would all be controlled with an Arduino. The idea was that there would be no direct user interaction this year but the system would run automatically. Plug in the Arduino and away we go.

The code would run one of a number of possible sequences, pause between 30 and 90 seconds, randomly run the next sequence, pause . . . And it did that, most of the time. A couple of times after starting up the Arduino, several sequences would run and then nothing else would happen. Made me wonder if I had crashed the Arduino.

I added some Serial.print statements to the code to dump out details on what was happening internally and ran the code again. This time it ran without issue for almost 2 hours before coming to a halt. Looking at the output on the serial console showed that that pause value was -31438. Of course everything came to a halt, the system was attempting to pause negative 31,438 milliseconds! This didn’t make much sense until I reread the Arduino docs and saw that ints are 16 bit values. Of course it rolled over into a negative number.

Digging into the code I realized that I had used int’s in several places where an unsigned long was needed. Once fixed, all was right with the world and the system went on to work just fine for both days of the Maker Faire.

Perhaps I need to start writing these systems on a Raspberry Pi where I can use Python 😉

Tags : , ,

Erasing a Hard Disk

I recently had the need to recycle several old computers and by old, I mean Power Mac G4 old. These systems were state of the art in 1999.

As any good IT professional knows, you don’t want to just recycle any computers without first erasing the data on the hard disks. Now I doubt that there’s anything of any importance on the disks but it’s better to erase them to be certain. A traditional way would be to reinitialize the disk and overwrite all the sectors several times. But why follow tradition when there are so many other, more creative ways to erase the contents!

I think I’ve come up with a method guaranteed to destroy the contents of a hard disk for those occasions when you need to be reasonably sure that the data can never be recovered.

What do you think? Too much?

Now before you think of trying this at home let me just say no, stop, don’t try this at home. That’s insane. This forge was running at approximately 2,300 degrees fahrenheit. There’s no way any appliance in your house generates nearly enough heat to reproduce this madness. Just put the thought out of your head.

Tags :

Growing up Arduino

I just read a post on Becky’s blog called “Mmm, serif-y.” She seems to have some mixed feelings about the little Arduino. I tend to agree with her but I’d like to offer a consideration that the Arduino has done more to open electronics and hardware hacking to more people than any other available electronics / hardware / software system to date. It’s easy to use, has lots of examples, an IDE that just work across Windows, OS X and Linux, and is very extensible through shields.

While many of these budding hardware hackers will never progress past the “oh golly gee, my led is blinking” stage, there are lots that will begin to explore more electronics, pcb design and creation, and such. They’ll discover that they can work with different types of hardware and electronics to bring their creations to life. And along the way they will also discover the wonderful sight of chips, resistors and caps going up in smoke. With that annoying burnt electronics smell that comes with it.

They’ll realize that the set of electronic candles they want to create would be too expensive if each one had an Arduino. They’ll start looking at other possibilities like using a PIC processor and designing their own PCB. They’ll ask questions and talk with others who are working to create their own bit of custom electronics. They’ll join or start a local hackerspace. And along the way, they’ll learn a bit and create even more.

All this because they were exposed to that simple world of the Arduino.

Tags :