Skip to content

Instantly share code, notes, and snippets.

View coseos's full-sized avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile

RaspyPlay4 with Raspberry Pi

For the RaspyPlay4 to work, you need to edit your /boot/config.txt and add a line:

device_tree_overlay=iqaudio-dacplus

or

#!/bin/bash
HOST=${1}
PATH=${2}
telnet ${HOST} 80 <<<EOF
GET ${PATH} HTTP/1.1
HOST: ${HOST}
EOF>>>
#!/bin/bash
#
# Show Raspberry Pi eeprom configuration
#
# BOOT_ORDER= specifies the boot order which will allow you to boot from SSD connected over USB
#
sudo rpi-eeprom-config

Razer Book 13 WiFi Intel AX-201 with Debian 11

The Razer Book 13 includes a rather new Intel AX-201 WiFi that is not supported out of the box by Debian 11 on a fresh installation (as of 2021-12-30).

To make your WiFi adapter work, get the (latest) Firmware from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git. Using https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-20211216.tar.gz worked well for me.

You have to untar the file and look for the driver files. Copy the files to the /lib/firmware/ folder and reboot your system.

To copy the files from the extracted archive, use:

#!/usr/bin/python3
# Use this python script to read RFID tag with sb components RFID reader
#
# The original script is located at https://github.com/sbcshop/RFID-Breakout
#
# Added shebang to make the script executable on its own using python3
import serial #import serial module
#
# Raspberry Pi / Raspi OS, /boot/config.txt
#
# With 'gpio=26=op,dh', GPIO 26 is set to output a signal when the Raspberry Pi is turned on.
#
gpio=26=op,dh
#
# Raspberry Pi / Raspi OS, /boot/config.txt
#
# With 'dtoverlay=gpio-shutdown', GPIO 3 is used as a power on/off switch.
#
dtoverlay=gpio-shutdown
#!/bin/bash
PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo`
echo $PUBLIC_IP
{ 'timestamp': '16/10/2021 14:57:41', 'state': '#' }
{ 'timestamp': '16/10/2021 14:57:43', 'state': '#' }
{ 'timestamp': '16/10/2021 14:58:11', 'state': '#' }
{ 'timestamp': '16/10/2021 14:58:13', 'state': '#' }
{'date':'2021-08-06T20-59-58','message':'1040710'}
{'date':'2021-08-06T21-01-59','message':'1040830'}