Skip to content

SW_Gadgets

Rolf Obrecht edited this page Feb 27, 2023 · 7 revisions

Tools & Gadgets around piTelex

Access telex.json on SD-card with Windows-PC

A normal Windows-PC can not access the the Raspberry Pi (Linux) partition because it is formatted as ext4 (or btrfs). But the BOOT-partition is formatted as FAT32 which Windows can read and write. The idea is to move the configuration file telex.json to the BOOT-partition and replace the original file with a symlink that the piTelex program can access it.

sudo mkdir /boot/config/
sudo mv /home/pi/piTelex/telex.json /boot/config/
ln -s /boot/config/telex.json /home/pi/piTelex/telex.json

With this change the Windows user sees a config folder on the SD-card and can change the telex.json with notepad (or any better editor like notepad++)


OFF-button on Raspberry Pi

If you plan to use an Raspberry Pi of any kind and plan not to power it up all the time, it is heavily recommended to use this option, to ensure to not mess up your SD-card, your linux-installation and last but not least your Pi.

IMPORTANT: For using this functionality, it is important, to enable the "secure power off" feature of the Raspberry Pi on first startup.

First, navigate to /boot/config.txt, then insert the code-lines below in section "[all]" right at the bottom of the document:

# Shutdown-button
dtoverlay=gpio-shutdown,gpio_pin=21

The value '21' represents the GPIO number. GPIO-21 is connected to pin 40 at RPi-connector


Display network address in 1st console

Create file /lib/dhcpcd/dhcpcd-hooks/00-fix-ifwireless

case $interface in
        "wlan"*)
                if [ "$ifwireless" -ne "1" ]
                then
                        syslog err "env ifwireless not set to 1 on interface $interface, enforcing"
                        export ifwireless=1
                fi
                ;;
        *)
                echo "$interface not a wlan device"
                ;;
esac

create file /lib/dhcpcd/dhcpcd-hooks/99-myip

case "$reason" in
        BOUND|RENEW|REBIND|REBOOT|TIMEOUT)
                echo "\r\n\r\nMy IP Address is ${new_ip_address} (${interface})\r\n" > /dev/console
                ;;
        EXPIRE|FAIL|RELEASE|STOP)
                echo "\r\n\r\nDevice ${interface} disconnected\r\n" > /dev/console
                ;;
esac

Clone this wiki locally