- Insert a new CR1220 battery into the slot on the HUB75-GPIO driver
- Make sure the jumper on the HUB75-GPIO driver is switched to "IIC-RTC" setting. In this position, the 3rd line of LEDs is inactive.
Use this SD card: Samsung PRO Endurance microSD, 32 GB.
Install Raspberry PI OS Lite 64 bit ver. 5.15.84-v8+
- Download and install the Raspberry PI Imager
- Use exactly this version of RaspiOS: https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-02-22/
Create a default user and enable SSH.
In the Raspberry PI Imager:
- "Raspberry PI Device": select "Raspberry PI 4"
- "Operating System": select "Use custom" and browse for the image file
- "Storage": select the drive with the SD card
- Press "NEXT"
- In the dialog "Use OS Customization?" dialog, choose "EDIT SETTINGS":
- "GENERAL / Set username and password": set login:
user
and password:password
- FIXME define non-default login/password
- "GENERAL / Set locale settings": set "Europe/Berlin" and Keyboard layout:
de
- "SERVICES / Enable SSH": check and select "Use password authentication"
- FIXME use "Allow public-key authentication only" instead
- Press "WRITE"
- In about 4 minutes, the SD card should be ready.
- "GENERAL / Set username and password": set login:
The rest is done via SSH.
-
Connect to a LAN via Ethernet
-
Find out the
<ip-address>
of the Raspi- e.g. with a Mikrotik router: http://192.168.114.1/webfig/#IP:DHCP_Server.Leases
- or use any IP scanner software
-
Run the
m1-install.sh
script via SSH:
m1-install-executor.sh <ip-address>
The board is connected to Ethernet.
reboot
=> The panel should display the current time and the blue dot.
ssh user@<ip-address>
sudo -i
hostname
Should output the last 8 bytes of /sys/firmware/devicetree/base/serial-number
file contents.
Insert the hostname into the "Hostname" column of https://docs.google.com/spreadsheets/d/1ewMfZ9fwiHdyakF1-PI1sjMTP-t4OwbRadxDGT6VGtM/edit#gid=696316085 spreadsheet.
journalctl -e -u openvpn-client@callhome
journalctl -f -u openvpn-client@callhome
- Login to
7c-vpn.sevencourts.com
via SSH using personal LDAP credentials
sudo -i
./7c.sh
Should display the list of scoreboards: hostnames together with their respective IP addresses as they are accessible from the 7c-vpn server.
10.8.0.4
7C-M1-R2
---
10.8.0.2
7C-M1-R3
---
Connect to the chosen scoreboard via SSH from 7c-vpn.sevencourts.com
:
ssh 10.8.0.4
Check kernel module is loaded with i2cdetect -y 1
-- the ouput table
will have UU
on cross of 60
row and 8
column.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
- Check RTC time is correct
- Show the current time from RTC with
hwclock --show
. - If the time differs from the actual time, wait until OS time is synced, and
actualize RTC clock time with
hwclock --systohc
.
- Show the current time from RTC with
- Test that the setup was done correctly
- Remember the current time
[hh:mm]
and turn off the panel withshutdown
. - Wait 3 minutes, turn on the panel, and after around 18 seconds panel
displays the actual time (
[hh:mm]
+ 3 minutes).
- Remember the current time
Disconnect from Ethernet, reboot.
=> The panel should display current time and the blue dot.
- Open "SevenCourts Admin" iOS app
- Connect the panel to a WiFi network
=> The panel should display current time and no blue dot.
Reboot. The panel should display:
=> ~15 seconds of black screen => ~5 second current time and the blue dot => current time only
- Login to
7c-vpn.sevencourts.com
via SSH using personal LDAP credentials
sudo -i
./7c.sh
Should display the list of scoreboards: hostnames together with their respective IP addresses as they are accessible from the 7c-vpn server.
10.8.0.4
7C-M1-R2
---
10.8.0.2
7C-M1-R3
---
Start update script for each panel, e.g.:
./7c-update-panel.sh 10.8.0.2
Stop the 7c service:
EDITOR=vim systemctl edit 7c
Before the ### Lines below this comment will be discarded
, configure the TABLEAU_SERVER_BASE_URL
environment variable with the server URL:
[Service]
Environment=PANEL_CONFIG=/opt/7c/panel.conf TABLEAU_SERVER_BASE_URL=<URL>
URLs:
- DEV: https://dev.server.sevencourts.com
- STAGING: https://staging.server.sevencourts.com
- PROD: https://prod.server.sevencourts.com
For PROD, this section can be removed, since the PROD URL is default.
If needed, switch the firmware branch:
cd /opt/7c/rpi-rgb-led-matrix/bindings/python/rpi-rgb-led-matrix-7c/
git fetch
git switch <branch>
Restart the 7c service:
systemctl daemon-reload
systemctl restart 7c
TODO: where to download for Android / iOS
Being logged in via SSH to the device:
echo "{\"ssid\":\"<SSID>\",\"psk\":\"<PSK>\"}" > /etc/7c_m1_assoc.json
CAVEAT this is NOT the recommended way, since raspi-config somehow collides with 7c-controller wpa_supplicant agent.
raspi-config nonint do_wifi_ssid_passphrase <SSID> <PSK>
Rasp-config command line parameters:
- https://forums.raspberrypi.com/viewtopic.php?t=21632
- https://loganmarchione.com/2021/07/raspi-configs-mostly-undocumented-non-interactive-mode/
wpa_cli
scan
scan_results
add_network
set_network 0 ssid "<SSID>"
set_network 0 psk "<PSK>"
See the WLAN setting currently configured by 7c-controller:
more /etc/7c_m1_assoc.json
See the WLAN setting currently configured by wpa_supplicant:
more /etc/wpa_supplicant/wpa_supplicant.conf
Check the status and log of 7c-controller:
systemctl status 7c-controller.service
journalctl -u 7c-controller.service -f
Check the current status of wlan0
:
iwconfig wlan0
- Activate Internet sharing on Mac
- Connect to M1 with
ssh [email protected]
After the installation is done, SD card can be cloned:
diskutil list
Assumed, the SD-card is displayed as /dev/disk4
diskutil unmount /dev/disk4
sudo dd if=/dev/disk4 of=7c.img
docker run --privileged=true --rm \
--volume $(pwd):/workdir \
monsieurborges/pishrink \
pishrink -aZv 7c.img 7c_shrinked.img
Eject the SD card.
Insert a new SD card.
sudo dd if=7c_shrinked.img of=/dev/disk4
- Install Python 3.9
- Download
- Mac: Homebrew
brew install [email protected]
- Install python extensions:
pip install Pillow
pip install requests
pip install python-dateutil
- Install RGBMatrixEmulator with
pip install RGBMatrixEmulator==0.13.3
- Clone RGBMatrixEmulator
Smoke-test with:
cd RGBMatrixEmulator/samples
python runtext.py
Open http://localhost:8888
in browser, "Hello world!" is to be displayed.
Use docker container run -it --rm tennismath.tableau.emulator
command. By default it is registered on DEV SevenCourts
server, but this can be overriden by providing server URL as TABLEAU_SERVER_BASE_URL
env var.