This guide will walk you through steps to set up the template SD Card, then migrate to eMMC and finally onboarding the OrangePi with our Player/Detector.
-
Setting up the SD Card from scratch and need to download the OS?
-> Please carefully read the Extremely crucial OS requirements section. Then, follow the guide in Initial SD Card Setup section.
-
Need to migrate from SD card to eMMC?
-> Please refer to the Migrate from SD Card to eMMC section.
-
Onboarding the OrangePi with our Player/Detector app?
-> Please refer to the Post-Setup Procedures section.
-
Work on existing OrangePi and need to update something?
-> Please refer to the FAQ section.
Quick way:
git clone https://github.com/oa-kai/opi-setup.git ~/playerDetail can be found at Migrate the all the scripts to the SD Card section.
Edit the player/config/display.conf file:
cd
cd player/config
nano display.confTo save the file, press Ctrl + X then Y then Enter.
For simplicity, just reboot the machine after changing the display config. Else, you can run the player/util-scripts/display.sh script to apply the changes without rebooting:
cd
cd player/util-scripts
./display.shcd
cd player/util-scripts
./imei-change.shcd
cd player/util-scripts
./hostname-change.shMake sure to reboot the device after changing the hostname.
cd
cd player
./player-config.shcd
cd player
./sync.shSome things you must make sure:
-
The OS you have is for the Orangepi 5B. If you have the OS for OrangePi 5 or even the OrangePi 5 Plus, this will not work.
-
You must use the Ubuntu Jammy GNOME version (not xfce, not custom OS).
-
The SD Card must be at most 32GB (less than the eMMC size at 64GB). Preferably, use a 16GB SD Card.
Why? As of the time writing this guide, only the GNOME version has 3D acceleration enabled by OrangePi. Without 3D acceleration, the slideshow player will not work properly.
Steps to search for the OrangePi 5B OS:
- Head to the OrangePi 5B Download page.
- Official Images -> Ubuntu image. Clicking on the Download will open the Google Drive where the manufacturer hosts the OS images.
- You will see there's many options for the OS (Focal or Jammy, GNOME or xfce, etc.). Make sure you download the Jammy GNOME version (currently its name is Orangepi5b_1.0.2_ubuntu_jammy_desktop_gnome_linux5.10.110.7z)
The default username and password for the OrangePi 5B is orangepi and orangepi respectively.
- Use the balenaEtcher to install the OS to the SD Card. You can also use the
ddcommand to do this, but I find balenaEtcher is more user-friendly.
- Plug in the SD Card to the OrangePi 5B before powering it up. The OrangePi 5B will set priority to boot from the SD Card if it detects one.
Multiple ways to do this:
-
Use a USB to transfer the files to the SD Card
-
Use the script
sync.shto sync the files from your local machine to the SD Card. This method is recommended as it will automatically exclude unwanted folders from the sync process. Make sure:- The OrangePi 5B is connected to the internet
- The OrangePi 5B has
sshenabled, by default. To double check, you can enablessheither by using the Settings from the User Interface or by running thesudo orangepi-configcommand and go toNetwork -> SSH. - Must be connected to the same network as the OrangePi 5B. Then, find the IP address by running the
ifconfigcommand on the OrangePi 5B and use it for thesync.shscript.
-
Clone the repository directly on the OrangePi 5B. The same copy of this repository is also hosted on a public repository associated with Kai orangead account. However, this method is not recommended as it requires Kai to constantly update the code on GitHub, where our team is not normally working on. To clone the repository, run the following command on the OrangePi 5B:
git clone https://github.com/oa-kai/opi-setup.git ~/player
On the OrangePi 5B, open the Terminal app and run the setup.sh script. It will do the following:
- Change default user password
- Set up timezone to Montreal
- Update the OS packages
- Install/Update Chromium Browser
- Install/Update Tailscale
- Install/Update Unclutter (to autohide the mouse cursor)
- Set up the screen resolution and orientation.
- Make the OrangePi auto-reboot at 3AM everyday
- Change GNOME Settings:
- Disable Bluetooth
- Enable Screen Keyboard
- Disable Screen Lock
cd
cd player
./setup.shSettings -> Sharing -> Remote Desktop
- Enable
Remote Desktop - Enable
Enable Legacy VNC Control-> Change toRequire a password - Enable
Remote Control - At
Authentication, set the password to as you wish.
On your local machine, the only VNC client that works for me is the TigerVNC on MacOS. Haven't tried on Windows/Linux yet.
This can be useful when you guys need to set up new WiFi at the destination. The screen keyboard can be enabled by:
Settings -> Accessibility -> Typing section -> Screen Keyboard
If the Screen Keyboard still not working yet, you can look for the keyboard icon on the top right corner, then click Restart on it. Else, just simply reboot the device.
Follow the guide Brown already made on Confluence to migrate the OS from the SD card to the eMMC. In brief, the steps are:
- On the corner left, select
Applications -> Accessories -> balenaEtcherand choose to Clone drive - Select the SD card as the source (normally the SD card is the /dev/mmcblk1)
- Select the eMMC as the destination (normally the eMMC is the /dev/mmcblk0)
- Click Continue and wait for the process to finish
- Shut down the device and remove the SD card. Boot up the device again and it should boot from the eMMC
From here the guide assumes that you have already migrated from SD card to eMMC, and the device is booting from the eMMC
The name format should be <project><xxxx> where:
<project>is the project name, for examplelabatt,africa,arq, etc.<xxxx>is the number marked on the device.
For example:
- If there's only a number
3stick to the OrangePi, there's high chance it's not yet designed for any project, the hostname should beopi0003. - If the OrangePi is marked with
Labatt0006, the hostname should belabatt0006.
Safe way to set up the hostname:
cd
cd player/util-scripts
./hostname-change.shIn this script, Kai already handle the lock on Chromium Web Browser profile. The script will also ask you to reboot the device after changing the hostname (recommended).
Note:
- Even though the WiFi dongle will provide USB connection directly, it's a good practice to configure the WiFi broadcasted from the dongle. This will ensure that if anything not running well with the USB connection, you guys can still power the dongle on separate USB power and let the OrangePi use the WiFi. Run the
~/player/util-scripts/wifi.shscript to update the WiFi configuration.
Execute the player.sh script to set up the slideshow player:
cd
cd player
./player.shNote:
- The script will ask you to choose which release you want to use (
prod,preprodorstaging). Choose accordingly to your need. - Running the
player.shscript will automatically set up the slideshow player to run on startup on the selected release. If you want to change the release, you can run theplayer.shscript again and choose a different release.
To ensure that the device is properly registered to the IMEI, run the imei-change.sh script:
cd
cd player/util-scripts
./imei-change.shTo connect the device via Tailscale:
sudo tailscale upEnsure that you log into Tailscale using the account device@orangead.ca. Once enrolled, the device is automatically registered with the same name as device's hostname. Remember to rename the device in the Tailscale admin console to match your intended name.