networking

SSH into a Raspberry Pi with only a network cable using OS X's 'Internet Sharing'

Recently, I found myself in a situation where I had to connect to a Raspberry Pi to set it up for a presentation, but I did not have:

  • A keyboard and/or other input device to use to type anything into the Pi
  • An HDMI cable to connect the Pi to a display so I could view anything on the Pi
  • A microSD card reader so I could modify the contents of the Pi's microSD card

Because of this, none of the standard methods of setting a static IP address, reconfiguring the Pi's WiFi configuration, or logging in on the Pi itself to find it's IP address or set things up so I could connect over a local network would work.

I remembered that Mac OS X handily includes an 'Internet Sharing' feature, which sets up a bridged network interface so your Mac is effectively a router and DHCP server to any devices connected to the shared interface.

Setting a Static IP address with Raspbian Jessie Lite on the Raspberry Pi

In the midst of my work upgrading the Raspberry Pi Dramble to Raspbian Jessie Lite, I noticed one of the basic components of the architecture—static IP addresses for all the Raspberry Pis—was not working correctly anymore. My Ansible playbooks configured the /etc/network/interfaces file correctly, so it would define a static IP address for the eth0 interface (the built-in Ethernet port on the Pi):

auto lo

iface lo inet loopback

iface eth0 inet static
  address 10.0.1.60
  netmask 255.255.255.0
  gateway 10.0.1.1
  dns-nameservers 8.8.8.8 8.8.4.4

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

In the past, with Raspbian Wheezy, everything worked fine, and the Pi would (after a reboot) use the static IP address 10.0.1.60.

Orange Pi Plus Setup, Benchmarks, and Initial Impressions

tl;dr: The Orange Pi Plus offers much better specs, and much better performance, than a similarly-priced Raspberry Pi. Unfortunately—and this is the case with most RPi competitors at this time—setup, hardware support, and the smaller repository of documentation and community knowledge narrow this board's appeal to enthusiasts willing to debug annoying setup and configuration issues on their own.

Orange Pi Plus - Front

Orange Pi Plus - Back

A few months ago, I bought an Orange Pi Plus from AliExpress. It's a single-board Linux computer very similar to the Raspberry Pi, with a few key differences:

Getting Gigabit Networking on a Raspberry Pi 2, 3 and B+

tl;dr You can get Gigabit networking working on any current Raspberry Pi (A+, B+, Pi 2 model B, Pi 3 model B), and you can increase the throughput to at least 300+ Mbps (up from the standard 100 Mbps connection via built-in Ethernet).

Note about model 3 B+: The Raspberry Pi 3 model B+ includes a Gigabit wired LAN adapter onboard—though it's still hampered by the USB 2.0 bus speed (so in real world use you get ~224 Mbps instead of ~950 Mbps). So if you have a 3 B+, there's no need to buy an external USB Gigabit adapter if you want to max out the wired networking speed!

Setting up the Edimax EW-7811Un or Tenda W311Mi 802.11b/g/n WiFi Adapter on a Raspberry Pi

Note: On Raspberry Pi models with built-in WiFi (e.g. the Raspberry Pi 3 model B), USB WiFi interfaces will use wlan1 (wlan0 is reserved for the first interface, in this case the internal one).

Since this is maybe the fourth time I've done this process on my Raspberry Pis, I decided to document the process of setting up cheap mini WiFi adapters on a Raspberry Pi A+/B+/2.

This process works great with any USB WiFi adapter that's supported out of the box. My three favorites (due to their inexpensive price and decent connection speed/reliability) are:

WiFi for a Small Tech Conference/Meetup

WiFi Routers - AirPort Extreme and AirPort Express

WiFi is awesome for homes and small businesses. Stick a router in a closet somewhere near where you have a cable modem or DSL router, and—boom!—easy Internet and Network access for all 5-10 people/devices within the building.

But, try bringing this setup to a small conference or a meeting of 25+ (or 200+) computer-using people, and you're in for a world of hurt. Some people will get slower-than-dialup access, some people won't be able to connect at all, and others will have strange issues that never happen when you're just using the network by yourself.

The problem(s)

There are many problems that cause WiFi to fail in any setting with more than a few people/devices:

AirPort Express - Flashing Yellow Light, Not Getting DHCP Address from Cable Modem

I spent the greater part of this afternoon trying to get my AirPort Express to connect to the Internet and share an IP address using a Motorola SB5101 Cable modem (with Charter Internet)... and since the solution was so simple and annoyingly stupid, I thought I'd post it here, for my reference and for anyone else spending an afternoon thinking his AirPort Express is dead.

As it turns out, the cable modem (this one, and likely many others) will only remember the MAC address of the first device it recognized when you last power cycled the modem.

When the Internet went down at my condo yesterday, I turned off my cable modem, plugged my Mac straight into it, turned the modem on, and use the internet via this direct connection for a while. When I plugged the AirPort Express back into the SB5101, I just got a flashing yellow (amber) light, and in the Airport Utility, a notice that the 'Internet Connection wasn't working'.

XLR over Cat5 - Balanced XLR Mic-Level & Line-Level Audio over Cat5 & Cat5e Cabling

Cat5 Cable with XLR Audio Jacks

The challenge: Run two 200' cable runs for VOX (2-way communication via headsets) and an ambient microphone. Mics and headsets to be used for broadcast of major event via satellite, web, and all major local news outlets.

Limitations: Extremely tight budget for cable + installation, two weeks to install and test, 100 year old stone/masonry building, skeleton crew of volunteers.

Solution:

  • Run readily-available Cat5e (shielded, solid) network cable to two VOX/mic locations (we had a box with a few hundred feet left inside, and we bought another 500' box (extra == always better) for $100. (Check Amazon for bulk Cat5e cable).
  • Use custom faceplates with two XLR jacks—female for VOX headsets, female for Mic input
  • Cross fingers, and hope it works.

Share a Proxied Network Connection via WiFi to your iPad/iPhone/iPod

For the past six weeks that I've had my iPad, I've fought with my office network, because it uses a Microsoft/NTLM authenticated proxy server which wreaks havoc on the iPhone OS's ability to use the Internet effectively (especially for third party apps).

After reading through countless forum support requests for people asking the same questions, I've finally found a (mostly) workable solution for this problem—at least for most apps and browsing on the iPad.

Doubling the Proxy

Since the iPhone OS seems to have a pretty hard time dealing with proxy authentication (most apps don't act like there's even an internet connection, even if Safari will work through the proxy), I used a solution I often use on my Macs at work: doubling up the proxy.

Basically, you can use an application like Authoxy on the Mac to make the Mac translate all its web traffic through a special internal connection, which gets messaged correctly by Authoxy to work with your company's proxy server.