Category Archives: MacOSX

Raspberry Pi Zero OTG – MacOSX

Download

  1. Raspbian as of 10/Dec/2016 this will download you Raspbian Jessie with Pixel (Pi Improved X-windows Environment, Lightweight) desktop
  2. Etcher v1 for Darwin x64 to flash Raspbian into the SD card. Visit main site for more info
  3. SDFormatter to format the SD card

Configuring Raspberry Pi Zero to Emulate Ethernet Over USB

Once you flash the Raspbian image onto the SD card then:

  1. Open a file at the root of the mounted drive called config.txt
  2. Add the following line at the very bottom: dtoverlay=dwc2
  3. Open a file at the root of the mounted drive called cmdline.txt
  4. Add the following line after the rootwait parameter: modules-load=dwc2,g_ether
  5. Create a file called ssh in to the root of the mounted driver, the file can contain any text you like, or even nothing at all: touch /Volumes/boot/ssh

Note: SSH will be disabled by default on the images from version 1.1 (2016-11-25-raspbian-jessie, Raspberry Pi reference 2016-11-25). When the Pi boots, it looks for the ssh file; if it finds it, it enables SSH and then deletes the file.

Connecting to the Pi Zero with USB and SSH on MACOSX

  1. Connect the USB cable to your MAC and the other end to the USB-micro port. Raspberry Pi Zero comes with 2 USB micro ports, the one towards the side of the Raspberry is dedicated for the Power Supply, the other one is for Data.
  2. Try pinging raspberrypi.local as: ping raspberrypi.local
  3. If you can reach the host then ssh: ssh pi@raspberrypi.local
  4. The password for user pi is raspberry
  5. If ping fails and you are getting “Request timeout”
  6. Then try the following, in your MAC, open “System Preferences” | “Sharing” | “Internet Sharing” enable | “To computers using” section enable “RNDIS/Ethernet Gadget”
  7. sharingDisconnect/reconnect the USB cable
  8. Now you should be able to ping and ssh

If you still cannot connect to your Raspberry Pi Zero, try the following:

  1. Try turning off Networking / WiFi
  2. Replaced the USB to microUSB cable
  3. Ensure Internet Sharing is enabled for “RNDIS/Ethernet Gadget”
  4. Install HoRNDIS (pronounce: “horrendous”) driver for Mac OS X, this allows you to use your Android phone’s native USB tethering mode to get Internet access.
Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Brew Package Manager Aliases

While installing a package using brew “brew instal package_name” noticed brew didnt complain for the missing “l” in the install, initially I thought it was an error in the brew so I tried “brew install package_name” (with two l’s this time) which passed through fine

Checking brew further:

[secuid0@m0nk /]$ brew
Example usage:
brew [info | home | options ] [FORMULA...]
brew install FORMULA... <------------Nothing about "instal" with a single "l"
brew uninstall FORMULA...
brew search [foo]
brew list [FORMULA...]
brew update
brew upgrade [FORMULA...]
brew pin/unpin [FORMULA...]

Troubleshooting:
brew doctor
brew install -vd FORMULA
brew [--env | config]

Brewing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
open https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md

Further help:
man brew
brew home

Checking the brew.rb file:
[secuid0@m0nk /]$ vi brew --prefix/Library/brew.rb

Found the homebrew supported aliases:

...
aliases = {'ls' => 'list',
'homepage' => 'home',
'-S' => 'search',
'up' => 'update',
'ln' => 'link',
'instal' => 'install', # gem does the same
'rm' => 'uninstall',
'remove' => 'uninstall',
'configure' => 'diy',
'abv' => 'info',
'dr' => 'doctor',
'--repo' => '--repository',
'environment' => '--env',
'--config' => 'config',
}
...

so both install and instal are supported…amongst others

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather