Configure wifi

Find the wifi interface name

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
3: wlxxxxxxxxxxxxx: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

Bring the wifi interface up

$ sudo ifconfig wlxxxxxxxxxxxxx up

Scan for wifi networks

$ sudo iwlist wlxxxxxxxxxxxxx scan

Edit /etc/wpa_supplicant/wpa_supplicant.conf

country=SE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
network={
ssid="abcd"
psk="1234567890"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

Do NOT modify /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

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

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Edit /etc/wpa_supplicant/wpa_supplicant.conf

country=SE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="abcd"
        psk="1234567890"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}

Get power save mode of wifi device

sudo iw dev wlan0 get power_save

Set power save mode off

sudo iw dev wlan0 set power_save off

Tribute to Malcolm Maclean https://leanpub.com/jerpi/read#leanpub-auto-for-jessie-edit-the-dhcpcdconf-file and Norman Dunbar http://qdosmsq.dunbar-it.co.uk/blog/2016/03/does-your-raspberry-pi-3-lose-wifi-connections-after-a-while/

Write raspbian image to SD card using Mac

Insert the SD card

Check for automatically mounted volumes

$ ls /Volumes/
MacBookSSD	boot

Identify mounted volumes

$ diskutil list
/dev/disk0 (internal, physical):
   #:                     TYPE NAME             SIZE       IDENTIFIER
   0:    GUID_partition_scheme                 *480.1 GB   disk0
   1:                      EFI EFI              209.7 MB   disk0s1
   2:                Apple_HFS MacBookSSD       479.2 GB   disk0s2
   3:               Apple_Boot Recovery HD      650.0 MB   disk0s3

/dev/disk1 (internal, physical):
   #:                     TYPE NAME             SIZE       IDENTIFIER
   0:   FDisk_partition_scheme                 *31.9 GB    disk1
   1:           Windows_FAT_32 boot             43.7 MB    disk1s1
   2:                    Linux                  31.9 GB    disk1s2

Unmount mounted volume

$ sudo umount /dev/disk1s1

Write the image to the SD card

$ sudo dd if=2017-07-05-raspbian-jessie-lite.img of=/dev/disk1 bs=1m

If you want to check the progress, press ctrl+t

$ diskutil eject /dev/disk1

Install Telldus-core for Tellstick Duo

Prereq is Raspbian Jessie Lite

Add the following line to your /etc/apt/sources.list:

deb http://download.telldus.com/debian/ stable main

Download and register Telldus public key

$ wget -q http://download.telldus.com/debian/telldus-public.key -O- | sudo apt-key add -

The key fingerprint is

$ 70C4 10C9 D73D 53E8 38B3 1C58 5A94 9181 E501 EA76
Telldus Technologies AB <info.tech@telldus.se>

Update the repository

$ sudo apt-get update

Install telldus-core and FTDI USB driver

$ sudo apt-get install telldus-core libtelldus-core-dev libftdi1

Reboot

$ sudo init 6

Mount Raspberry Pi SD card on Mac


Using Homebrew, install osxfuse and ext4fuse

$ brew cask install osxfuse
$ brew install ext4fuse

Find the Raspberry Pi’s partition ID

$ diskutil list

Create a mount point

sudo mkdir /Volumes/rpi

Mount the drive

sudo ext4fuse /dev/disk2s2 /Volumes/rpi -o allow_other

Unmount the drive

sudo umount /Volumes/rpi

Tribute to Jeff Geerling https://www.jeffgeerling.com/blog/2017/mount-raspberry-pi-sd-card-on-mac-read-only-osxfuse-and-ext4fuse