In my previous post I outlined the (many) steps involved in setting up a raspberry pi 3 in a pi-top laptop case as an Amiga laptop. Since, I can't leave well enough alone, I decided that I wanted to get wifi working and make sure my distribution was more up-to-date than the official Amibian distribution offered. Here are the steps I took to make this happen (at least the steps that I can remember):
It might be worthwhile to use Win32DiskImager (or equivalent) to make a backup of your SD card before trying this. I did and it gave me great peace of mind.
Update Your Pi
(Make sure your connected to a network with Ethernet. Each step will take a while to execute... that's normal.)
- "apt-get update"
- "apt-get upgrade"
- "apt-get dist-upgrade"
- "apt-get install rpi-update"
- "rpi-update"
Fix Automatic Login
- Login using the Amibian defaults: root/1234... or whatever you've changed them to
- Edit (see the previous article for file editing from the shell) /etc/systemd/system/getty.target.wants/getty@tty1.service as such:
- Change the "ExecStart=" line to: "ExecStart=-/sbin/agetty --autologin root %I"
- Change the "Restart=" line to: "Restart=no"
- Save and exit the editor
- "reboot"
Functionally, you should be back to where you were before starting the upgrade process: Your computer boots and automatically starts the Amiga Emulator. Note, however, that when you quit the emulator "exit" no longer restarts the emulator. Instead it exits the current terminal session. If you want to restart the emulator, just execute your startup script with "/bin/bash ~/.profile". If you accidentally type "exit" out of habit and want to get back into a terminal session, press alt-fn-F2 (or any other alt-function-key combination) to switch to a different terminal session.
Install The Wireless Stuff
These instructions assume that you're using a Raspberry Pi 3 with a built-in wifi interface. Other adapters might be able to leverage some of this info, but the firmware parts probably won't apply.
- Install the wireless tools package: "apt-get install wireless-tools"
- Install wpa supplicant for secured wireless networks: "apt-get install wpasupplicant"
- Configure your wireless connection:
- Create and edit a wireless network config file named "/etc/wpa_supplicant/wpa_supplicant.conf" that contains:
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 update_config=1 network={ ssid="network_id" psk="password" proto=WPA key_mgmt=WPA-PSK pairwise=TKIP group=TKIP id_str="Nickname" }
- Change "network_id" and "password" to your access point's SSID and passphrase. Keep the quotes around the values in that file, though!
- Create and edit a wireless network config file named "/etc/wpa_supplicant/wpa_supplicant.conf" that contains:
- Configure your wireless network interface:
- edit "/etc/network/interfaces"
- Change or add the wlan0 section to...
auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
- Unplug your Ethernet and "reboot"
- When your computer restarts, Quit the emulator and test your wireless configuration from the shell with: "ifconfig -a". You should see something like:
With an IP address properly configured for wlan0.eth0 Link encap:Ethernet HWaddr b8:27:eb:07:e5:49 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB) wlan0 Link encap:Ethernet HWaddr b8:27:eb:52:b0:1c inet addr:192.168.0.45 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::ba27:ebff:fe52:b01c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:14966 errors:0 dropped:9 overruns:0 frame:0 TX packets:1307 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1728707 (1.6 MiB) TX bytes:171182 (167.1 KiB)
There you have it! The official Amibian distribution will be updated soon, but I couldn't wait. If this all seems a little over your head, it might be worth waiting for a packaged solution such as theirs. Please comment with corrections, suggestions, and feedback! Happy Amiga-ing!
Sorry about all of the formatting errors. wptexturize was converting things like double-hyphens (–) to ndashes. I fixed this with the Raw HTML plugin.
[…] Leinninger.com » Upgrade Amibian and Enable WiFi […]