This guide provides step-by-step instructions for configuring your Cyberdeck, including setting up the LCD display orientation, enabling Bluetooth keyboard functionality, and increasing the terminal font size.
- 8.8" LCD Display from Ali Express - US $37
- Raspberry PI 2 Model B for low power consumption
- Bluetooth USB Keyboard - US $14
The following instructions are from this thread. Thanks RPi Community!
To rotate the LCD display to a horizontal orientation:
-
Open the
cmdline.txt
file located in/boot/firmware/
:sudo nano /boot/firmware/cmdline.txt
-
Add or update the following parameter:
video=HDMI-A-1:480x1920@60,rotate=270
-
Ensure the entire line in the file looks similar to this:
console=serial0,115200 console=tty1 root=PARTUUID=247a1fd9-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=US video=HDMI-A-1:480x1920@60,rotate=270
Note: Replace
PARTUUID
and other parameters with those already present in your file. -
Save the file and exit.
-
Reboot the system for the changes to take effect:
sudo reboot
The bluetoothctl tool requires interactive commands for setting up and managing Bluetooth devices. The default-agent command, in particular, does not succeed in plain bash scripts because it reports "No agent is registered" even when the command sequence is correct. This happens because bluetoothctl expects a live session where the agent is explicitly registered (agent on) before setting it as the default agent.
Using expect allows us to simulate these interactions programmatically, ensuring that:
- The agent is successfully registered (agent on).
- The default-agent command succeeds in setting the registered agent.
This makes it possible to automate Bluetooth keyboard pairing and reconnection processes reliably.
-
Create the script file:
sudo nano /usr/local/bin/enable-default-agent-and-pair.sh
-
Copy the script from the
scripts/enable-default-agent-and-pair.sh
file included in this project. -
Make the script executable:
sudo chmod +x /usr/local/bin/enable-default-agent-and-pair.sh
-
Copy the
keyboard-monitor.service
andkeyboard-monitor.timer
files from thesystemd/
directory into/etc/systemd/system/
:sudo cp systemd/keyboard-monitor.* /etc/systemd/system/
-
Enable and start the timer:
sudo systemctl daemon-reload sudo systemctl enable keyboard-monitor.timer sudo systemctl start keyboard-monitor.timer
To increase the font size in the terminal:
-
Run the following command:
sudo dpkg-reconfigure console-setup
-
Follow the prompts:
- Select UTF-8 as the character set.
- Choose Terminus as the font.
- Select 16x32 as the font size.
-
Reboot to apply changes.
- Reboot the system and verify that the LCD is oriented correctly.
- Turn the Bluetooth keyboard off and on to confirm it reconnects automatically.
- Check the terminal font size to ensure readability.