2022

Smart Email Notifier – WiFi Edition

I finally got rid of the A9G GPRS module and Vodafone network limitations! After moving into my new apartment, I found that the mailbox is right at the front door, which is within my WiFi network range. This gave me the opportunity to redesign the mail notifier, breaking free from the reliance on mobile networks. I cancelled the ATtiny402, battery charging, and GPS devices, and replaced them with the ESP-M2 WiFi module, allowing the mail notifier to connect to my WiFi network. The new design makes the mail notifier more streamlined and reliable, and I no longer have to worry about its stability issues.

General Operation

The ESP’s main task is to send an HTTP network request when mail arrives, and to maximize battery life, the ESP is only powered on when the switch is triggered, and then powered off after the request is completed, which usually takes around 4-10 seconds.

To achieve this, I designed a special circuit. The switch input is connected to a 74LVC1G98 logic gate, configured as a NAND gate with an inverted input. Normally, the switch input is pulled high through R1, and the gate output remains low, disabling the 3.3V voltage regulator.

When the switch is triggered, capacitor…

RouterPi – CM4 High-Performance Router Board

Another Raspberry Pi Router! I’ve always wanted to use a Raspberry Pi as my home internet router, but previous versions didn’t quite meet my requirements. I needed two Ethernet interfaces that could handle 1Gb traffic with low latency. The Pi 2 had 100Mb Ethernet, and the Pi 3 had 1Gb Ethernet, but it was shared on the USB 2.0 bus, limiting it to a few hundred Mbps. There were other Pi-like products, but their software and long-term support didn’t look promising. So, for the past decade, I’ve been using a small fanless Intel N3050 mini-ITX system with a Gigabyte N3050N-D3H motherboard, which had dual onboard Ethernet and could run Debian Linux on a USB stick.

Then came the Pi 4, which had its own bus and 1Gb Ethernet on USB 3.0! However, I was still unhappy about the CPU overhead and power consumption increase from having to connect the second Ethernet interface to a USB 3.0 hub. This was the main reason I created a PCIe bridge “chip” to add a PCIe network card. But a few months later, the Compute Module 4 was released, and now there’s the RouterPi board: an optimized re-write.

Hardware

  • Raspberry Pi Compute Module 4 with 2GB RAM & 8GB eMMC
  • 2x

Raspberry Pi: Enabling 64-bit Kernel and Compiling RTL8111H Driver


Recently, I’ve been using the Compute Module 4 and a custom board with a Realtek RTL8111H PCIe Ethernet controller to develop a network router. However, the Raspberry Pi OS didn’t come with the required r8168 or r8169 drivers for the RTL8111. But fortunately, compiling and installing these drivers was relatively easy. Or at least until I discovered a neat trick: by adding arm_64bit=1 to the /boot/config.txt file, I could switch to a 64-bit kernel. This made the kernel 64-bit, but all user-space programs remained 32-bit. This was ideal for me, as all the routing work was retained in the kernel. Although a full 64-bit Raspberry Pi OS is still in development, I’m happy to stick with the 32-bit version for now.

  •  PROJECTS
  •  SOFTWARE
  •  LIBRARIES
  •  HOW-TO
  •  MORE STUFF
Donate

Raspberry Pi – Compiling a Module for the 64-bit Kernel

 3 Jul 2021

Recently I’ve been working on a network router using the Compute Module 4 and a custom base board with a Realtek RTL8111H PCIe Ethernet controller. Raspberry Pi OS doesn’t come pre-installed with the r8168 or r8169 driver needed for the RTL8111, but getting it compiled and installed is pretty easy. Or at least until I found out that it’s…

Smart Home Security: The Perfect Integration of IoT and Access Control Systems

I recently moved into a two-story apartment, with an intercom system at the entrance of the building, located in the lobby area. Since I usually live upstairs, I want to find a way to remotely open the door without having to rush downstairs to the intercom every time someone presses the doorbell. It would be very convenient. Even better, if I could know when someone presses the doorbell when I’m not at home, that would be great! This way, I can handle doorbell events in a timely manner and won’t miss any important visits.

My apartment’s intercom system has a basic setup, including a buzzer, a button to unlock the hall door, and a speaker, but the microphone in my intercom doesn’t work. The system is powered by 14V AC, but it has an electrical noise problem. Moreover, the system lacks voltage spike suppression, and I often see a small arc when I press the button to control the unlocking of the hall door. This also causes the error counter on my broadband modem to increase by 1. To solve these problems, I need to pay attention to the following points:

  1. Solve the problem of the microphone not working.
  2. Reduce the impact of electrical noise.
  3. Add voltage spike suppression to