Starfighter.local is my iPad with Raspberry Pi setup. Here I’ll document the setup and process of how I set it up and run it.
It was inspired by TechCraft’s video Mobile Raspberry Pi Setup with iPad Pro and has been my daily driver outside home for a good amount of time now. I use it because my laptop is at the end of its lifetime and cannot be used outside of a dock setup.
Hardware
- Raspberry Pi 5 Model B, purchased from Verkkokauppa.com
- Kingston 256GB MicroSD, purchased from Verkkokauppa.com
- Aluminium case with a fan (RB-AlucaseP5-06B), purchased from Verkkokauppa.com
- USB-C cable to connect to Macbook
- UltimateGuard Deck Case 100+ as case
- Fits the Pi in the case + the cable + a few batteries for my keyboard
- Genki Shadowcast capture card
Software
- Raspberry Pi OS
- VS Code Server
- tmux
- NeoVim
- kiwix
Dev environments
- Python with pyenv and Jupyter Notebook
- I have a iOS shortcut that opens the Jupyter Notebook + a start script on Raspberry Pi to activate the virtualenv with jupyter installed and starts the server
- Javascript with node & npm
Todo
- Set up a easy way to create a full SD card snapshot weekly or monthly in case the running one gets corrupted so I don’t have to start from complete scratch.
- Set up USB-C shared internet
- Set up kommuuniwifi connection
- Configure tmux
- Configure NeoVim
- Debian’s package manager comes with an older version
- I tried run with released binaries but apparently the ARM processor became an issue there
- Install Rust
- Clone 235 and build a Debian version
- Set up a wifi access point so I can connect to it for ssh and kiwix when there’s no network (see: Pyssel: NetworkManager UI and access point, hotspot)
Access
Having an access to Internet you can share this via an access point (AP), also called Hotspot. There is a quick way to set up this via the command
sudo nmcli device wifi hotspot con-name Wifi_AP_wlan0 ifname wlan0 ssid RPi_AP password 12345678
Device ‘wlan0’ successfully activated with ‘37237db5-515e-400c-b744-f1b1b8a0a719’.
Hint: “nmcli dev wifi show-password” shows the Wi-Fi name and password.
To break it down
ifname
what Wi-Fi device is used.con-name
name of the created hotspot connection profile.(Optional)ssid
SSID of the hotspot.band
Wi-Fi band to use.(Optional)channel
Wi-Fi channel to use. (Optional)password
password to use for the created hotspot.
On my last trip I used it on the train and it’s just like using a laptop!
Notes
kiwix
- Downloaded Python, PHP and iFixit docs zims
- Installed kiwix-tools with
sudo apt-get install kiwix-tools
- Created a symlink
ln -s /usr/bin/kiwix-serve /opt/kiwix-serve
- Created a library with all the zims with
kiwix-manage library.xml add [doc].zim
- Created a systemd service to autostart kiwix (
/etc/systemd/system/kiwix-server.service
)
[Unit]
Description=Serve all the ZIM files loaded on this server
[Service]
Restart=always
RestartSec=15
User=juhis
ExecStart=/usr/bin/bash -c "/opt/kiwix-serve -p 9000 --library /home/juhis/kiwix/library.xml"
[Install]
WantedBy=network-online.target
- Restart with
sudo systemctl restart kiwix-serve
if needed. Logs withjournalctl kiwix-serve
- When starfighter is booted up, it can be accessed in the same network from http://starfighter.local:9000/
iPad as an extra screen
From The Best iPad Accessories To Make An iPad Worth It 2024 - YouTube I learned that iOS supports capture cards so I installed Orion and tested with my Genki Capture Card and Raspberry Pi and it does work!
This way I can debug my Raspberry Pi setup if for some reason I cannot access it over ssh/mosh or VNC. In a pinch, I can also use it as an extra, slightly larger screen for my Steam Deck.
Mosh or SSH
It’s worth using Mosh rather than SSH when connecting to Pi from iPad because iPad closes SSH connections after a short period of time (I’ve read it’s around 30 seconds but couldn’t find a primary source for it) when SSH app is on the background. This means you need to be constantly reconnecting.
Mosh is designed for exactly this type of use case as it can maintain better user experience for staying connected when the connection is spotty (like when traveling on a train while using mobile networks) or keeps disconnecting like is the case here.
You can install Mosh from your distribution’s package manager or check out details in the docs.