I'm back with the second blog for the Experimenting with Extreme Environments Design Challenge. In my first post, titled "UrbanRest Guardian - Project Introduction," I introduced my project idea: the UrbanRest Guardian, which focuses on monitor and classifying nighttime noises in cities. Due to some customs issues during the holidays here in Spain, it took a bit longer to kick things off, but I finally got my hands on the kit containing all the necessary components.
Over the past couple of weeks, I've been diving into the kit, experimenting with each part to determine if they're suitable for building the UrbanRest Guardian. In this blog, I'll share my initial experiences with the kit, how I intend to utilize each component, the initial decisions I've made regarding assembly, and my first attempts at constructing and testing individual parts and software.
Table of Contents
- Exploring the kit
- Designing the Layout for Component Placement Inside the Enclosure
- Additional components
- Powering the Raspberry Pi4 compute module
- Wiring diagram
- USB connection cable
- Adjusting a heatsink and the CM4-NANO-A baseboard
- First boot
- SSH remote connection
- Monitoring WiFi signal
- Using WinSCP to copy the logs
- Checking CPU Temperature
- Temperature Logger
- Midas Display
- Wiring the Display
- Enabling I2C interface
- Driving the MIDAS Display
- Creating a python driver library for the MIDAS Display
- Exploring Real-Time Spectrogram Visualization on LCD Displays
- Microphone & USB Audio card
- Recording sound as wav
- Checking the audio interface using pyAudio
- Integrating Audio Capture and Display Visualization
- Video: sound_levels_test.MOV
- UrbanRest Guardian blog series
Exploring the kit
In the following composition, you can see an image showcasing all the components of the kit. Upon unpacking the components, I immediately noticed the size difference between the Raspberry Pi 4 compute module board, which was surprisingly small, and the IO board for the Raspberry Pi 4 compute module, which was notably large. Additionally, the display impressed me with its size, weight, and sturdy construction.
I was expecting another additional circular connector as advertised in the list of kit components, although I had planned a use for that connector, it is not important for the project and can be substituted in the design.
The smallest board is the Raspberry Pi4 Compute Module . This board is really small for all the potential it has. Nice design job by Raspberry. I was worried about the temperature the module can reach and I did some tests with a fan. The tests with the fan were satisfactory in terms of temperature regulation but not in terms of consumption. Although I did not measure the consumption with a fan, I did notice that the battery did not last as long as I would have liked. I have purchased an aluminum heatsink that works quite well, at least in the first tests.
The large board is the I/O board for the Raspberry Pi4 Compute Module. . I am going to use the I/O board during the development of the solution but for the final assembly I will use another simpler I/O module since my solution does not need as many interfaces and I need to reduce consumption.
This board can be powered through a 12 VDC barrel jacket or through a connector like the one used to power the PC power supplies that carry 5 and 12 VDC. If you are going to use the fan, it must be powered at 12 VDC.
There are two circular connectors: one for mounting on the box (MRD-BG04-L13-000 ), and one for a connector cable (MRD-BN04-M17-000 ). I will use the board connector to charge a battery, a 20000 mAh PowerBank, which will supply 5VDC to the Pi4 Compute Module and to the Display.
- MRDBN04M17000 | Circular Harsh MRD Series | Amphenol (amphenol-cs.com)
- MRDBG04L13000 | Circular Harsh MRD Series | Amphenol (amphenol-cs.com)
I could also use three of the pins to connect an external microphone but I will add a second circular connector with a TRS connector to facilitate the connection of different microphones during the experiments.
The display is a MIDAS backlit LCD display with 4 lines of 20 characters , it can display ASCII characters and 8 custom characters can be programmed. We will see in this blog how we can also use it to display graphical information in real time. I had trouble finding examples of display drivers that would work with this display, so in the end I decided to write my own lightweight driver. I present it later in this blog as well as the code repository so that anyone can use it however they want.
Also included in the kit is the Hammond enclosure that comes in a configuration with a transparent polycarbonate lid, a rubber gasket to prevent the entry of water and four screws that remain fixed to the lid for maintenance work.
The enclosure seems a little tight for the IO board if one wants to use normal connectors. Initially my needs are only to power the Raspberry Pi4 compute module with 5 VDC, connect a USB 2.0 audio capture card and access to the standard 40 pins of the piHat. I have looked for an alternative IO board that has those minimums.
To assemble the various system components inside the Hammond enclosure, I'll need to secure the components, manage the cables, and position the connectors. The enclosure offers several mounting options, including printed circuit boards mounted on rails or brackets, adjustable internal compartments, or the integration of sealed subassemblies within the enclosure. Since the Raspberry Pi 4 compute module generates significant heat, proper ventilation is crucial. Cable management, accessibility for modifications, and Wi-Fi antenna coverage are also key considerations.
I'll use standoffs to secure the compute module assembly and the board holding the Midas LCD display. It's important to ensure that cables do not obstruct other components, so I'll utilize clamps and plug-in connectors to facilitate assembly and disassembly of the different components.
Designing the Layout for Component Placement Inside the Enclosure
Considering the size of the battery I'll be using and to maximize available space, I've opted for a layered design approach. This involves organizing the components in layers within the enclosure to utilize space efficiently. The bottom layer will accommodate the largest and heaviest components, while the display will be positioned on the top layer.
To implement this design, I've cut a couple of transparent acrylic plastic panels for initial testing. Initially, I attempted to cut the acrylic using a manual fret saw, but the results were unsatisfactory as the saw blade tended to hook on the acrylic, causing tearing and breakage. Eventually, I switched to using a Dremel rotary tool with a cutting disc for PVC , operating at 15,000 rpm and ensuring the cutting area was well lubricated with dishwashing detergent.
In the image, you can see the two panels prepared for testing along with the tool used for cutting. It's crucial to note the importance of wearing protective safety glasses when using tools like rotary tools or saws. Remember, you only have one pair of eyes, so protecting them is essential.
I've prepared this template for cutting in svg format:1554VAPL_innerpanel.zip
Additional components
I've also ordered some extra components for my project. A waterproof connector for TRS audio connectors that will allow me to place the sound sensor outside the box.
As I mentioned before, my requirements are very undemanding in terms of interfaces, so I have looked for an alternative solution. A much simpler IO board than the one in the kit to reduce power consumption and have more space inside the enclosure: The CM4-NANO-A is a Waveshare mini board for the Raspberry Pi Compute Module 4, it is a baseboard for the Raspberry Pi Compute Module 4 with a 5V/2.5A USB Type C interface.
For capturing sound I will use a Trust Microphone with USB 2.0 sound card. During the experiments I will test three alternative modules, two of them lower cost.
For powering the compute module I will use a Portable charger 20000 mah black
and a Geekworm C235 heat sink for the Raspberry Pi4 compute Module. The heatsink I think is a must have, the CM4 dissipates less power than the Raspberry Pi 4 Model B, contains less metal in the PCB and fewer connectors, which means that it has less passive heat sinking than the Raspberry Pi 4 Model B. Despite it consuming less power, it may run warmer than the Raspberry Pi 4 Model B.
Without forgetting of course the different cables that allow powering the system and communicating with the peripherals, sensors and actuators.
Powering the Raspberry Pi4 compute module
I can power the Raspberry Pi4 compute module through the USB-C connector but to save space I will power the circuit through the 20-pin header of the IO nano board.
Wiring diagram
In the following diagram you can see the different cables that I will need to connect all the components of the system.
I need to find connectors that occupy minimal space and are positioned in a way that makes them accessible without obstructing or colliding with other parts. Their length should enable them to be neatly organized and routed.
USB connection cable
This is the configuration for the cables that I will use to charge the battery. USB connector pinout for external PowerBank charging.
Cable ID | Cable Color | MRD Pin | USB Pin | USB Male | Description |
RD | Red | 1 | 1 | VBUS | 5 DC |
WH | White | 2 | 2 | D- | USB Data- |
GN | Green | 3 | 3 | D+ | USB Data+ |
BK | Black | 4 | 4 | GND | Ground |
Adjusting a heatsink and the CM4-NANO-A baseboard
I first connected the Molex WiFi antenna before placing the heatsink. Once the heatsink is adjusted, it is difficult to insert the antenna connector into the socket. Then, with the help of some plastic tweezers, I applied thermal paste in the areas that produce the most heat,
Then, pressing lightly so that the thermal paste is well distributed, I placed the screws. You have to be very careful to tighten them little by little and not deform the PCB of the Raspberry Pi4 compute module.
Finally, solder the headers to the Waveshare CM4-NANO-A board and attach it to the Raspberry Pi4 compute module.
First boot
The CM4 board is the Lite version without eMMC and we need to use a Micro SD card for storing the operating system.
The Raspberry Pi Imager is the quick and easy way to install an operating system to a microSD card ready to use with your Raspberry Pi. I've used the recommended image for the Raspberry Pi OS (64-BIT)
After writing, a disk named BOOT is recognized, go into the disk and modify the config.txt file.
Add the line to the file: dtoverlay=dwc2,dr_mode=host.
To finish, eject the BOOT disk from the host PC. Disconnect the USB cable and power adapter, disconnect the BOOT, and set the switch to OFF. restart the board and go ahead with the examples.
SSH remote connection
When setting up the operating system image on the SD card, I enabled SSH connection for remote access. As I won't have an HDMI or CSI display, keyboard, or mouse to interact with the module directly, I'll be accessing the Raspberry Pi 4 compute module via SSH from a remote computer using the Windows 11 terminal. By assigning a network name to the Raspberry Pi, I won't need to know the automatically obtained IP address from the DHCP negotiation with my WiFi router.
ssh ealbertos@urbanrest.local
PS C:\Users\ealbertos> ssh urbanrest.local The authenticity of host 'urbanrest.local (fe80::187d:f54f:f520:df0%20)' can't be established. ED25519 key fingerprint is SHA256:QGJXfxfL/IVqDDr4ZAwalLgsECq2ZumfrwMJCmYjKpY. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'urbanrest.local' (ED25519) to the list of known hosts. ealbertos@urbanrest.local's password: Linux urbanrest 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Mar 15 16:13:05 2024 ealbertos@urbanrest:~ $ ls Bookshelf Desktop Documents Downloads Music Pictures Public Templates Videos ealbertos@urbanrest:~ $ sudo shutdown now Broadcast message from root@urbanrest on pts/1 (Sat 2024-04-06 00:37:12 CEST): The system will power off now! ealbertos@urbanrest:~ $ Connection to urbanrest.local closed by remote host. Connection to urbanrest.local closed.
Monitoring WiFi signal
One of the first tests that I needed to carry out as soon as possible is the viability of the Wi-Fi connection in the two exterior points where I am going to locate the enclosure for the noise classification tests. One of the points is barely 2 meters from the WiFi router but the other is about 15 meters away with several walls in between.
I installed a WiFi monitoring program on the Raspberry Pi 4 compute module. With an SSH session launched on my computer, I started recording video. Carrying the enclosure around the house, I began at the closest point to the WiFi router, ventured to the outermost point of the apartment, and then returned to the starting point.
sudo apt install wavemon -y
iwconfig
ealbertos@urbanrest:~ $ iwconfig lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11 ESSID:"MOVISTAR_A3C0" Mode:Managed Frequency:5.56 GHz Access Point: 46:AB:F8:F4:A3:CE Bit Rate=433.3 Mb/s Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on Link Quality=70/70 Signal level=-21 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:286 Invalid misc:0 Missed beacon:0
ealbertos@urbanrest:~ $ vcgencmd measure_volts volt=0.8500V ealbertos@urbanrest:~ $ vcgencmd version Feb 29 2024 12:24:53 Copyright (c) 2012 Broadcom version f4e2138c2adc8f3a92a3a65939e458f11d7298ba (clean) (release) (start)
Near the router there is a good connection. At the most extreme point of the house on the balcony the signal loses a lot, there is some packet loss but in general you can work without problems. These are the two points where the device will be tested, one location to monitor the empting schedules of garbage containers and the other to monitor new air conditioning units in an adjacent building that belongs to the city council.
Approximate position of the two points from Google Maps.
Dmesg - kernel ring buffer
From the messages in the kernel's circular buffer we can observe at the end of the log the communication losses when performing the Wi-Fi communication sensitivity tests that are resolved without problems, 12 hours later outside all night there are still no communication problems.
ealbertos@urbanrest:~/Documents/scripts $ dmesg [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083] [ 0.000000] Linux version 6.6.20+rpt-rpi-v8 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) [ 0.000000] KASLR enabled [ 0.000000] random: crng init done [ 0.000000] Machine model: Raspberry Pi Compute Module 4 Rev 1.1 [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x000000000dc00000, size 512 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] OF: reserved mem: 0x000000000dc00000..0x000000002dbfffff (524288 KiB) map reusable linux,cma [ 0.000000] OF: reserved mem: 0x000000003ef642c0..0x000000003ef646bf (1 KiB) nomap non-reusable nvram@1 [ 0.000000] OF: reserved mem: 0x000000003ef64700..0x000000003ef648b3 (0 KiB) nomap non-reusable nvram@0 [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003fffffff] [ 0.000000] DMA32 [mem 0x0000000040000000-0x00000000fbffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] node 0: [mem 0x0000000040000000-0x00000000fbffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff] [ 0.000000] On node 0, zone DMA32: 19456 pages in unavailable ranges [ 0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges [ 0.000000] percpu: Embedded 30 pages/cpu s85672 r8192 d29016 u122880 [ 0.000000] pcpu-alloc: s85672 r8192 d29016 u122880 alloc=30*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected PIPT I-cache on CPU0 [ 0.000000] CPU features: detected: Spectre-v2 [ 0.000000] CPU features: detected: Spectre-v3a [ 0.000000] CPU features: detected: Spectre-v4 [ 0.000000] CPU features: detected: Spectre-BHB [ 0.000000] CPU features: kernel page table isolation forced ON by KASLR [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI) [ 0.000000] CPU features: detected: ARM erratum 1742098 [ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923 [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 smsc95xx.macaddr=D8:3A:DD:B9:43:8C vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=fd749c27-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=ES [ 0.000000] Unknown kernel command line parameters "splash", will be passed to user space. [ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear) [ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 996912 [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] software IO TLB: area num 4. [ 0.000000] software IO TLB: mapped [mem 0x0000000037400000-0x000000003b400000] (64MB) [ 0.000000] Memory: 3337188K/4050944K available (13376K kernel code, 2210K rwdata, 4260K rodata, 4864K init, 1083K bss, 189468K reserved, 524288K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 43116 entries in 169 pages [ 0.000000] ftrace: allocated 169 pages with 4 groups [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] Root IRQ handler: gic_handle_irq [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns [ 0.000000] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns [ 0.000341] Console: colour dummy device 80x25 [ 0.000357] printk: console [tty1] enabled [ 0.000447] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000) [ 0.000465] pid_max: default: 32768 minimum: 301 [ 0.000539] LSM: initializing lsm=capability,integrity [ 0.000753] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.000820] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.001719] cgroup: Disabling memory control group subsystem [ 0.003309] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.003416] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.003536] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.003802] rcu: Hierarchical SRCU implementation. [ 0.003810] rcu: Max phase no-delay instances is 1000. [ 0.005754] EFI services will not be available. [ 0.006083] smp: Bringing up secondary CPUs ... [ 0.006696] Detected PIPT I-cache on CPU1 [ 0.006823] CPU1: Booted secondary processor 0x0000000001 [0x410fd083] [ 0.007511] Detected PIPT I-cache on CPU2 [ 0.007602] CPU2: Booted secondary processor 0x0000000002 [0x410fd083] [ 0.008303] Detected PIPT I-cache on CPU3 [ 0.008395] CPU3: Booted secondary processor 0x0000000003 [0x410fd083] [ 0.008499] smp: Brought up 1 node, 4 CPUs [ 0.008517] SMP: Total of 4 processors activated. [ 0.008525] CPU features: detected: 32-bit EL0 Support [ 0.008531] CPU features: detected: 32-bit EL1 Support [ 0.008540] CPU features: detected: CRC32 instructions [ 0.008659] CPU: All CPU(s) started at EL2 [ 0.008675] alternatives: applying system-wide alternatives [ 0.011035] devtmpfs: initialized [ 0.020589] Enabled cp15_barrier support [ 0.020621] Enabled setend support [ 0.020788] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.020811] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.033399] pinctrl core: initialized pinctrl subsystem [ 0.033929] DMI not present or invalid. [ 0.034431] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.036304] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations [ 0.036565] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.036993] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.037058] audit: initializing netlink subsys (disabled) [ 0.037234] audit: type=2000 audit(0.036:1): state=initialized audit_enabled=0 res=1 [ 0.037743] thermal_sys: Registered thermal governor 'step_wise' [ 0.037795] cpuidle: using governor menu [ 0.038013] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.038128] ASID allocator initialised with 32768 entries [ 0.039096] Serial: AMBA PL011 UART driver [ 0.045889] bcm2835-mbox fe00b880.mailbox: mailbox enabled [ 0.056169] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-02-29T12:24:53, variant start [ 0.060184] raspberrypi-firmware soc:firmware: Firmware hash is f4e2138c2adc8f3a92a3a65939e458f11d7298ba [ 0.070215] Modules: 2G module region forced by RANDOMIZE_MODULE_REGION_FULL [ 0.070228] Modules: 0 pages in range for non-PLT usage [ 0.070235] Modules: 517792 pages in range for PLT usage [ 0.076411] bcm2835-dma fe007000.dma-controller: DMA legacy API manager, dmachans=0x1 [ 0.078121] iommu: Default domain type: Translated [ 0.078132] iommu: DMA domain TLB invalidation policy: strict mode [ 0.078482] SCSI subsystem initialized [ 0.078656] usbcore: registered new interface driver usbfs [ 0.078691] usbcore: registered new interface driver hub [ 0.078735] usbcore: registered new device driver usb [ 0.080202] pps_core: LinuxPPS API ver. 1 registered [ 0.080214] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.080232] PTP clock support registered [ 0.081256] vgaarb: loaded [ 0.081682] clocksource: Switched to clocksource arch_sys_counter [ 0.082062] VFS: Disk quotas dquot_6.6.0 [ 0.082102] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.082211] FS-Cache: Loaded [ 0.085713] CacheFiles: Loaded [ 0.093220] NET: Registered PF_INET protocol family [ 0.093804] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.098328] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear) [ 0.098424] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.098446] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.098655] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear) [ 0.099600] TCP: Hash tables configured (established 32768 bind 32768) [ 0.100026] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear) [ 0.100214] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear) [ 0.100278] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear) [ 0.100494] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.101111] RPC: Registered named UNIX socket transport module. [ 0.101123] RPC: Registered udp transport module. [ 0.101129] RPC: Registered tcp transport module. [ 0.101135] RPC: Registered tcp-with-tls transport module. [ 0.101141] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.101173] PCI: CLS 0 bytes, default 64 [ 0.101791] Trying to unpack rootfs image as initramfs... [ 0.105929] kvm [1]: IPA Size Limit: 44 bits [ 0.107178] kvm [1]: vgic interrupt IRQ9 [ 0.107222] kvm [1]: Hyp mode initialized successfully [ 0.877101] Freeing initrd memory: 16724K [ 1.195133] Initialise system trusted keyrings [ 1.195457] workingset: timestamp_bits=46 max_order=20 bucket_order=0 [ 1.195534] zbud: loaded [ 1.196237] NFS: Registering the id_resolver key type [ 1.196263] Key type id_resolver registered [ 1.196270] Key type id_legacy registered [ 1.196293] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.196303] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 1.196941] Key type asymmetric registered [ 1.196952] Asymmetric key parser 'x509' registered [ 1.197008] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247) [ 1.197168] io scheduler mq-deadline registered [ 1.197180] io scheduler kyber registered [ 1.197216] io scheduler bfq registered [ 1.198154] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 23) [ 1.206210] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges: [ 1.206244] brcm-pcie fd500000.pcie: No bus range found for /scb/pcie@7d500000, using [bus 00-ff] [ 1.206285] brcm-pcie fd500000.pcie: MEM 0x0600000000..0x063fffffff -> 0x00c0000000 [ 1.206321] brcm-pcie fd500000.pcie: IB MEM 0x0000000000..0x00ffffffff -> 0x0400000000 [ 1.207345] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00 [ 1.207362] pci_bus 0000:00: root bus resource [bus 00-ff] [ 1.207377] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff]) [ 1.207426] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400 [ 1.207518] pci 0000:00:00.0: PME# supported from D0 D3hot [ 1.211016] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 1.211158] pci_bus 0000:01: supply vpcie3v3 not found, using dummy regulator [ 1.211291] pci_bus 0000:01: supply vpcie3v3aux not found, using dummy regulator [ 1.211363] pci_bus 0000:01: supply vpcie12v not found, using dummy regulator [ 1.637696] brcm-pcie fd500000.pcie: link down [ 1.637856] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01 [ 1.637886] pci 0000:00:00.0: PCI bridge to [bus 01] [ 1.638265] pcieport 0000:00:00.0: PME: Signaling with IRQ 27 [ 1.638611] pcieport 0000:00:00.0: AER: enabled with IRQ 27 [ 1.639061] pci_bus 0000:01: busn_res: [bus 01] is released [ 1.639605] pci_bus 0000:00: busn_res: [bus 00-ff] is released [ 1.648684] iproc-rng200 fe104000.rng: hwrng registered [ 1.648927] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB) [ 1.659658] brd: module loaded [ 1.665896] loop: module loaded [ 1.666457] Loading iSCSI transport class v2.0-870. [ 1.670605] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000 [ 1.877765] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus [ 1.878784] usbcore: registered new device driver r8152-cfgselector [ 1.878827] usbcore: registered new interface driver r8152 [ 1.878861] usbcore: registered new interface driver lan78xx [ 1.878893] usbcore: registered new interface driver smsc95xx [ 1.904534] xhci-hcd fe9c0000.xhci: xHCI Host Controller [ 1.904563] xhci-hcd fe9c0000.xhci: new USB bus registered, assigned bus number 1 [ 1.904792] xhci-hcd fe9c0000.xhci: USB3 root hub has no ports [ 1.904804] xhci-hcd fe9c0000.xhci: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000000000000010 [ 1.904864] xhci-hcd fe9c0000.xhci: irq 30, io mem 0xfe9c0000 [ 1.905182] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06 [ 1.905199] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.905211] usb usb1: Product: xHCI Host Controller [ 1.905220] usb usb1: Manufacturer: Linux 6.6.20+rpt-rpi-v8 xhci-hcd [ 1.905229] usb usb1: SerialNumber: fe9c0000.xhci [ 1.905793] hub 1-0:1.0: USB hub found [ 1.905835] hub 1-0:1.0: 1 port detected [ 1.906272] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 1.906393] dwc_otg: FIQ enabled [ 1.906400] dwc_otg: NAK holdoff enabled [ 1.906406] dwc_otg: FIQ split-transaction FSM enabled [ 1.906415] Module dwc_common_port init [ 1.907072] usbcore: registered new interface driver uas [ 1.907123] usbcore: registered new interface driver usb-storage [ 1.907560] mousedev: PS/2 mouse device common for all mice [ 1.910743] sdhci: Secure Digital Host Controller Interface driver [ 1.910756] sdhci: Copyright(c) Pierre Ossman [ 1.910969] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.913631] ledtrig-cpu: registered to indicate activity on CPUs [ 1.913929] hid: raw HID events driver (C) Jiri Kosina [ 1.914021] usbcore: registered new interface driver usbhid [ 1.914053] usbhid: USB HID core driver [ 1.914171] bcm2835_vchiq fe00b840.mailbox: there is not valid maps for state default [ 1.920082] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available [ 1.920628] NET: Registered PF_PACKET protocol family [ 1.920713] Key type dns_resolver registered [ 1.944456] registered taskstats version 1 [ 1.944670] Loading compiled-in X.509 certificates [ 1.954206] Key type .fscrypt registered [ 1.954226] Key type fscrypt-provisioning registered [ 1.961158] uart-pl011 fe201000.serial: there is not valid maps for state default [ 1.961563] uart-pl011 fe201000.serial: cts_event_workaround enabled [ 1.962065] fe201000.serial: ttyAMA1 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2 [ 1.962307] serial serial0: tty port ttyAMA1 registered [ 1.965321] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer [ 1.965571] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver [ 1.966556] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0 [ 1.966573] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated [ 1.992897] of_cfs_init [ 1.992998] of_cfs_init: OK [ 1.993202] clk: Disabling unused clocks [ 2.031728] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA [ 2.041358] Freeing unused kernel memory: 4864K [ 2.041604] Run /init as init process [ 2.041612] with arguments: [ 2.041617] /init [ 2.041623] splash [ 2.041629] with environment: [ 2.041634] HOME=/ [ 2.041639] TERM=linux [ 2.085281] mmc1: new high speed SDIO card at address 0001 [ 2.581369] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode [ 2.602094] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode [ 2.690329] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0 [ 2.715625] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4]) [ 2.717216] Registered IR keymap rc-cec [ 2.717390] rc rc0: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0 [ 2.717572] input: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input0 [ 2.720091] input: vc4-hdmi-0 HDMI Jack as /devices/platform/soc/fef00700.hdmi/sound/card0/input1 [ 2.721278] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4]) [ 2.725354] Registered IR keymap rc-cec [ 2.725546] rc rc1: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1 [ 2.726122] input: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input2 [ 2.728796] input: vc4-hdmi-1 HDMI Jack as /devices/platform/soc/fef05700.hdmi/sound/card1/input3 [ 2.729173] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4]) [ 2.729625] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4]) [ 2.730007] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 2.730332] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 2.730663] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 2.730907] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 2.731232] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 2.734004] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1 [ 2.734431] vc4-drm gpu: [drm] Cannot find any crtc or sizes [ 2.740676] vc4-drm gpu: [drm] Cannot find any crtc or sizes [ 2.741131] vc4-drm gpu: [drm] Cannot find any crtc or sizes [ 4.364469] mmc0: Skipping voltage switch [ 4.566337] mmc0: new high speed SDHC card at address aaaa [ 4.567304] mmcblk0: mmc0:aaaa SK32G 29.7 GiB [ 4.570081] mmcblk0: p1 p2 [ 4.570600] mmcblk0: mmc0:aaaa SK32G 29.7 GiB (quirks 0x00004000) [ 5.304643] EXT4-fs (mmcblk0p2): mounted filesystem fc7a1f9e-4967-4f41-a1f5-1b5927e6c5f9 ro with ordered data mode. Quota mode: none. [ 6.096928] systemd[1]: System time before build time, advancing clock. [ 6.298529] NET: Registered PF_INET6 protocol family [ 6.299810] Segment Routing with IPv6 [ 6.299842] In-situ OAM (IOAM) with IPv6 [ 6.379206] systemd[1]: systemd 252.22-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified) [ 6.379246] systemd[1]: Detected architecture arm64. [ 6.385374] systemd[1]: Hostname set to <urbanrest>. [ 7.183018] systemd[1]: Queued start job for default target graphical.target. [ 7.204680] systemd[1]: Created slice system-getty.slice - Slice /system/getty. [ 7.206300] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe. [ 7.207485] systemd[1]: Created slice system-systemd\x2dfsck.slice - Slice /system/systemd-fsck. [ 7.208253] systemd[1]: Created slice user.slice - User and Session Slice. [ 7.208644] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch. [ 7.209441] systemd[1]: Set up automount proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point. [ 7.209576] systemd[1]: Expecting device dev-disk-by\x2dpartuuid-fd749c27\x2d01.device - /dev/disk/by-partuuid/fd749c27-01... [ 7.209842] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes. [ 7.210051] systemd[1]: Reached target nss-user-lookup.target - User and Group Name Lookups. [ 7.210209] systemd[1]: Reached target slices.target - Slice Units. [ 7.210352] systemd[1]: Reached target swap.target - Swaps. [ 7.210489] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes. [ 7.211181] systemd[1]: Listening on systemd-fsckd.socket - fsck to fsckd communication Socket. [ 7.211506] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe. [ 7.212623] systemd[1]: Listening on systemd-journald-audit.socket - Journal Audit Socket. [ 7.213270] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log). [ 7.213961] systemd[1]: Listening on systemd-journald.socket - Journal Socket. [ 7.218541] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket. [ 7.219068] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket. [ 7.219785] systemd[1]: dev-hugepages.mount - Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages). [ 7.238030] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System... [ 7.242236] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System... [ 7.246652] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System... [ 7.247273] systemd[1]: auth-rpcgss-module.service - Kernel Module supporting RPCSEC_GSS was skipped because of an unmet condition check (ConditionPathExists=/etc/krb5.keytab). [ 7.253319] systemd[1]: Starting fake-hwclock.service - Restore / save the current clock... [ 7.258120] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout... [ 7.262997] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes... [ 7.268022] systemd[1]: Starting modprobe@configfs.service - Load Kernel Module configfs... [ 7.274916] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod... [ 7.281093] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm... [ 7.287618] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore... [ 7.293509] systemd[1]: Starting modprobe@fuse.service - Load Kernel Module fuse... [ 7.299478] systemd[1]: Starting modprobe@loop.service - Load Kernel Module loop... [ 7.300324] systemd[1]: systemd-fsck-root.service - File System Check on Root Device was skipped because of an unmet condition check (ConditionPathExists=!/run/initramfs/fsck-root). [ 7.318449] systemd[1]: Starting systemd-journald.service - Journal Service... [ 7.335226] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules... [ 7.341191] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems... [ 7.343615] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com [ 7.348666] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices... [ 7.367349] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System. [ 7.368843] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System. [ 7.374707] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System. [ 7.377892] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes. [ 7.384186] fuse: init (API version 7.39) [ 7.385952] systemd[1]: Finished fake-hwclock.service - Restore / save the current clock. [ 7.389077] systemd[1]: modprobe@configfs.service: Deactivated successfully. [ 7.390686] systemd[1]: Finished modprobe@configfs.service - Load Kernel Module configfs. [ 7.393238] systemd[1]: modprobe@dm_mod.service: Deactivated successfully. [ 7.395250] systemd[1]: Finished modprobe@dm_mod.service - Load Kernel Module dm_mod. [ 7.397085] systemd[1]: modprobe@drm.service: Deactivated successfully. [ 7.399314] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm. [ 7.401127] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully. [ 7.402179] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore. [ 7.404325] systemd[1]: modprobe@fuse.service: Deactivated successfully. [ 7.405660] systemd[1]: Finished modprobe@fuse.service - Load Kernel Module fuse. [ 7.407619] systemd[1]: modprobe@loop.service: Deactivated successfully. [ 7.408514] systemd[1]: Finished modprobe@loop.service - Load Kernel Module loop. [ 7.423703] i2c_dev: i2c /dev entries driver [ 7.442184] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System... [ 7.446693] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System... [ 7.447228] systemd[1]: systemd-repart.service - Repartition Root Disk was skipped because no trigger condition checks were met. [ 7.457824] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules. [ 7.462016] systemd[1]: Mounted sys-fs-fuse-connections.mount - FUSE Control File System. [ 7.463526] systemd[1]: Mounted sys-kernel-config.mount - Kernel Configuration File System. [ 7.466152] EXT4-fs (mmcblk0p2): re-mounted fc7a1f9e-4967-4f41-a1f5-1b5927e6c5f9 r/w. Quota mode: none. [ 7.469596] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables... [ 7.476399] systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems. [ 7.477982] systemd[1]: systemd-firstboot.service - First Boot Wizard was skipped because of an unmet condition check (ConditionFirstBoot=yes). [ 7.478280] systemd[1]: systemd-pstore.service - Platform Persistent Storage Archival was skipped because of an unmet condition check (ConditionDirectoryNotEmpty=/sys/fs/pstore). [ 7.483349] systemd[1]: Starting systemd-random-seed.service - Load/Save Random Seed... [ 7.488605] systemd[1]: Starting systemd-sysusers.service - Create System Users... [ 7.554043] systemd[1]: Finished systemd-sysctl.service - Apply Kernel Variables. [ 7.556550] systemd[1]: Finished systemd-random-seed.service - Load/Save Random Seed. [ 7.558011] systemd[1]: first-boot-complete.target - First Boot Complete was skipped because of an unmet condition check (ConditionFirstBoot=yes). [ 7.585147] systemd[1]: Finished systemd-sysusers.service - Create System Users. [ 7.610505] systemd[1]: Starting systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev... [ 7.611094] systemd[1]: Started systemd-journald.service - Journal Service. [ 7.665900] systemd-journald[284]: Received client request to flush runtime journal. [ 7.682881] systemd-journald[284]: File /var/log/journal/52c59f2d30c6419cab64249a8df07455/system.journal corrupted or uncleanly shut down, renaming and replacing. [ 8.815827] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [ 8.832597] rpi-gpiomem fe200000.gpiomem: window base 0xfe200000 size 0x00001000 [ 8.835375] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned. [ 8.836833] bcm2835_vc_sm_cma_probe: Videocore shared memory driver [ 8.836858] [vc_sm_connected_init]: start [ 8.840465] rpi-gpiomem fe200000.gpiomem: initialised 1 regions as /dev/gpiomem [ 8.850034] mc: Linux media interface: v0.10 [ 8.873858] [vc_sm_connected_init]: installed successfully [ 8.960680] videodev: Linux video capture interface: v2.00 [ 9.102572] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 9.134362] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. [ 9.242022] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned. [ 9.255779] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned. [ 9.279732] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned. [ 9.316593] rpivid feb10000.codec: Device registered as /dev/video19 [ 9.321845] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13 [ 9.338609] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14 [ 9.371380] bcm2835-codec bcm2835-codec: Device registered as /dev/video10 [ 9.371452] bcm2835-codec bcm2835-codec: Loaded V4L2 decode [ 9.371874] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15 [ 9.372381] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16 [ 9.372418] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 9.372435] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 9.372457] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 9.372469] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 9.379057] bcm2835-codec bcm2835-codec: Device registered as /dev/video11 [ 9.379167] bcm2835-codec bcm2835-codec: Loaded V4L2 encode [ 9.379912] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20 [ 9.380471] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21 [ 9.393291] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22 [ 9.422295] bcm2835-codec bcm2835-codec: Device registered as /dev/video12 [ 9.422348] bcm2835-codec bcm2835-codec: Loaded V4L2 isp [ 9.423594] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23 [ 9.423629] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 9.423644] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 9.423656] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 9.423668] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 9.432186] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp [ 9.485996] bcm2835-codec bcm2835-codec: Device registered as /dev/video18 [ 9.486045] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx [ 9.494749] bcm2835-codec bcm2835-codec: Device registered as /dev/video31 [ 9.494806] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image [ 9.650360] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 9.690536] Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf' [ 9.691504] Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328' [ 9.692428] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 9.696345] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600' [ 9.775980] Bluetooth: Core ver 2.22 [ 9.783725] NET: Registered PF_BLUETOOTH protocol family [ 9.783751] Bluetooth: HCI device and connection manager initialized [ 9.783780] Bluetooth: HCI socket layer initialized [ 9.783793] Bluetooth: L2CAP socket layer initialized [ 9.783830] Bluetooth: SCO socket layer initialized [ 9.906338] Bluetooth: HCI UART driver ver 2.3 [ 9.906373] Bluetooth: HCI UART protocol H4 registered [ 9.906774] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 9.910073] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator [ 9.910427] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator [ 9.911216] Bluetooth: HCI UART protocol Broadcom registered [ 9.970490] alsactl[380]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set [ 9.995658] brcmfmac: F1 signature read @0x18000000=0x15264345 [ 10.004406] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 10.007387] usbcore: registered new interface driver brcmfmac [ 10.030071] uart-pl011 fe201000.serial: no DMA platform data [ 10.270580] Bluetooth: hci0: BCM: chip id 107 [ 10.270918] Bluetooth: hci0: BCM: features 0x2f [ 10.272065] Bluetooth: hci0: BCM4345C0 [ 10.272087] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000 [ 10.275979] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.raspberrypi,4-compute-module.hcd' Patch [ 10.346506] brcmfmac_wcc: brcmf_wcc_attach: executing [ 10.359582] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2) [ 10.361230] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2 [ 11.055706] Bluetooth: hci0: BCM: features 0x2f [ 11.057049] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0190 [ 11.057063] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0382 [ 11.415601] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SS [ 11.698927] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 11.698956] Bluetooth: BNEP filters: protocol multicast [ 11.698981] Bluetooth: BNEP socket layer initialized [ 11.710493] Bluetooth: MGMT ver 1.22 [ 11.791728] NET: Registered PF_ALG protocol family [ 13.393857] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay) [ 13.398265] bcmgenet fd580000.ethernet eth0: Link is Down [ 13.419558] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled [ 18.525950] Bluetooth: RFCOMM TTY layer initialized [ 18.525985] Bluetooth: RFCOMM socket layer initialized [ 18.526007] Bluetooth: RFCOMM ver 1.11 [ 1178.106127] warning: `wavemon' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211 [ 6437.111904] ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0xa, action 0x8 [ 6803.793535] ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0xa, action 0x8 [ 9324.349788] ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0xa, action 0x8 [ 9444.357384] ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0xa, action 0x8 [20846.821237] ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0xa, action 0x8 [20966.802810] ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0xa, action 0x8 [34170.634681] ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0xa, action 0x8 [34224.456940] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail, reason -52 [34224.564938] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail, reason -52 [34224.672916] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail, reason -52 [34224.780913] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail, reason -52 [34226.509041] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail, reason -52 [34226.509491] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail, reason -52 [34226.509908] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail, reason -52 [34226.510318] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail, reason -52 [34226.510728] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail, reason -52 [34226.511139] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail, reason -52
Using WinSCP to copy the logs
To facilitate file transfers between both systems, Windows 11 on my computer and the Raspbian OS on the raspberry pi4 compute module, I used the windows application WinSCP
Checking CPU Temperature
After completing the Wi-Fi communication tests, I shifted my focus to monitoring the CPU temperature. I conducted a test with a fan and another without. Unfortunately, the fan test had to be aborted prematurely because the power bank battery ran out. It couldn't last all night. However, the test without a fan yielded better results. After 12 hours, the power bank had not dropped below 75% capacity. While I don't have more precise consumption data since I didn't monitor the power, I plan to do so in future experiments.
Measure Raspberry Pi Temp:
/usr/bin/vcgencmd measure_temp
Temperature Logger
With the following simple python script I was logging the temperature.
from gpiozero import CPUTemperature from time import sleep, strftime, time cpu = CPUTemperature() def write_temp(temp): with open("cpu_temp.csv", "a") as log: log.write("{0},{1}\n".format(strftime("%Y-%m-%d %H:%M:%S"),str(temp))) while True: temp = cpu.temperature write_temp(temp) sleep(5)
This is the csv format of the file it generates. Each line represents a timestamp followed by the temperature reading in degrees Celsius.
2024-04-06 22:57:58,39.433 2024-04-06 22:58:03,38.946 2024-04-06 22:58:08,39.433 2024-04-06 22:58:13,39.433 2024-04-06 22:58:18,39.92 2024-04-06 22:58:23,39.433 2024-04-06 22:58:28,39.92 2024-04-06 22:58:33,37.972 2024-04-06 22:58:38,39.433 2024-04-06 22:58:43,39.433 2024-04-06 22:58:48,38.946 2024-04-06 22:58:53,39.433 2024-04-06 22:58:58,39.433 2024-04-06 22:59:03,39.433 2024-04-06 22:59:08,39.433 2024-04-06 22:59:13,38.459 2024-04-06 22:59:18,39.433 2024-04-06 22:59:23,39.433 2024-04-06 22:59:28,40.407 2024-04-06 22:59:33,38.946 2024-04-06 22:59:38,38.946 2024-04-06 22:59:43,38.946 2024-04-06 22:59:48,39.433
Midas Display
The MC42005A6W-SPTLYI-V2 is a 4×20 Character LCD display. It has a Black on Yellow/Green appearance, and its construction is Chip-on-board (COB). The interface is I2C and it has Eng / Jap font sets.
Uses the RockWorks RW1063 LCD Controller. The RW1063 is a LCD driver & controller LSI which is fabricated by low power CMOS technology. It can display 2 lines x 8 (5 x 8 dot format) characters or 1 lines x 8 (5 x 8 or 5 x 11 dot format) characters. It is ideal for multi-language application.
Standard code RW1063-0A-001 can support up to 240 fonts.
Aspects to configure:
- I2C communication. It should allow the address to be configured to any of these values: 0x3C, 0x3D, 0x3E or 0x3F
- Data length 8 bits, this is important, since many libraries that work with parallel communication only implement 4-bit communications
- Configuration of the 2-line display, although the display has 4 lines, it is configured as two 2-line displays working in parallel with two LCD drivers.
- Only write mode is allowed for I2C, instruction write, and memory write operations can be used. It is not possible to use read operations, the display only asserts with ACK, it does not send data via I2C.
- The DDRAM memory addresses of the four display lines are 7 bits: 0x00, 0x40, 0x14, 0x54
- The CGRAM memory addresses for custom characters are 6 bits, from 0x00 to 0x56, each 5x8 bit character you need to send 8 bytes to configure it.
Wiring the Display
Raspberry Pi 40Way GPIO Header
Raspberry PI 40Way GPIO | 20x4LCD | Description |
3 - (GPIO 2 SDA) | 13 - (SDA) | SDA |
5 - (GPIO 3 SCL) | 14 - (SCL) | SCL |
4 - (5V) | 2 - (Vdd) | 5 V Power Supply for LCM |
6 - (Ground) | 1 - (Vss) | GND |
Display
Enabling I2C interface
The I2C interface is disabled by default, so I need to enable it before conducting tests with the Display, which communicates via I2C.
After this the /etc/modules file is modified
sudo i2cdetect -y 1
Using the logic analyzer of the Digilent Analog Discovery 2 Waveforms program, I was able to debug the communications to solve the problems found.
Driving the MIDAS Display
I didn't find examples for this display in Python for the Raspberry PI, but I did for Arduino. I checked the operation with an Arduino and from there, with what I learned from the Arduino libraries and the Midas display specification sheets, I created my own library.
Creating a python driver library for the MIDAS Display
All the display controller library code and examples are on github (javagoza/lcdrw1063: Python Driver for RW1063 controlled LCD Displays)
Here is a brief description of what it does and how to use it.
The lcdrw1063 lightweight library provides a Python RW1063 LCD I2C driver for use with the Raspberry Pi. It simplifies controlling display content and appearance.
Key features include:
- Easy-to-use functions for display manipulation.
- Compatible solely with i2c bus communication and 8-bit write commands.
smbus2: A drop-in replacement for smbus-cffi/smbus-python in pure Python
pip install smbus2
display = LCD.Lcd() # Instanciate the LCD driver
display.lcd_display_string("- Display Line 2", 2) # Write line of text to the second line of the display
display.lcd_clear() # Clears the lcd and sets cursor to home.
display = LCD.Lcd() # Instanciate the LCD driver
custom = LCD.CustomCharacters(display) # Instantiate a CustomCharacteres generator
custom.load_custom_characters_data() # Generate and load default custom characters from the controller
display.lcd_display_string("- Display Line 1", 1) # Write line of text to the first line of display
display.lcd_display_buffer([0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3], 2) # Print a sequence of custom chars on line 2
...
display.lcd_clear() # Clears the lcd and sets cursor to home.
display.lcd_set_display_off # Switch-off the display. Doesn't affect to backlight
The backlit display has very good visibility.
Exploring Real-Time Spectrogram Visualization on LCD Displays
I was intrigued by the idea of experimenting with displaying spectrograms on the LCD screen to visualize street sounds captured in real time. The display has the capability to define 8 custom characters. In the video, you can observe an example of real-time graphic generation using these custom characters.
Microphone & USB Audio card
After testing the display and WiFi communications, the next step was to test the USB 2.0 sound card and capture sound with the microphone.
Initially, the USB port on the module was not activated by default. Therefore, the first task was to enable it and then verify if the operating system recognizes the USB sound capturer.
lsusb is a command-line utility that displays information about USB buses and connected devices on a Linux system.
lusb
List all soundcards and digital audio devices
aplay -l
USB Audio Device is card 2.
dmesg is used to examine or control the kernel ring buffer.
dmesg | grep usb
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.
sudo nano /usr/share/alsa/alsa.conf
Scroll and find the following two lines:
defaults.ctl.card 0
defaults.pcm.card 0
Change the 0 to a 2 to match the card number of the USB device :
Reboot
sudo shutdown -r now
alsamixer is a graphical mixer program for the Advanced Linux Sound Architecture (ALSA) that is used to configure sound settings and adjust the volume.
alsamixer
This show you a gauge for “Speaker”, “Mic” and “Auto Gain Control”.
[ 8640.123226] Bluetooth: RFCOMM TTY layer initialized [ 8640.123264] Bluetooth: RFCOMM socket layer initialized [ 8640.123286] Bluetooth: RFCOMM ver 1.11 [ 8692.791732] usb 1-1: new full-speed USB device number 2 using xhci-hcd [ 8692.942248] usb 1-1: New USB device found, idVendor=1b3f, idProduct=2008, bcdDevice= 1.00 [ 8692.942270] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 8692.942282] usb 1-1: Product: USB Audio Device [ 8692.942292] usb 1-1: Manufacturer: GeneralPlus [ 8693.006159] input: GeneralPlus USB Audio Device as /devices/platform/scb/fe9c0000.xhci/usb1/1-1/1-1:1.3/0003:1B3F:2008.0001/input/input4 [ 8693.064062] hid-generic 0003:1B3F:2008.0001: input,hidraw0: USB HID v2.01 Device [GeneralPlus USB Audio Device] on usb-fe9c0000.xhci-1/input3 [ 8693.298147] usbcore: registered new interface driver snd-usb-audio
alsamixer
sudo /etc/init.d/alsa-utils reset
ealbertos@urbanrest:~ $ lsusb
Bus 001 Device 002: ID 1b3f:2008 Generalplus Technology Inc. USB Audio Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ealbertos@urbanrest:~ $
Recording sound as wav
First adjust the capture levels using the alsamixer
arecord -l
arecord is a command-line soundfile recorder for the ALSA soundcard driver.
arecord --format=S16_LE --rate=16000 --file-type=wav out.wav
Checking the audio interface using pyAudio
During the project I will be using the Python pyAudio library, let's see what it can do for us.
PyAudio provides Python bindings for PortAudio v19, the cross-platform audio I/O library. With PyAudio, you can easily use Python to play and record audio on a variety of platforms, such as GNU/Linux, Microsoft Windows, and Apple macOS.
import pyaudio p = pyaudio.PyAudio() info = p.get_host_api_info_by_index(0) numdevices = info.get('deviceCount') for i in range(0, numdevices): if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0: print("Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name'))
ealbertos@urbanrest:~ $ python list_microphone.py ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.2.pcm.hdmi.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM hdmi ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.2.pcm.hdmi.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM hdmi ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib pcm_a52.c:1001:(_snd_pcm_a52_open) a52 is only for playback ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Input Device id 0 - USB Audio Device: - (hw:2,0) Input Device id 1 - sysdefault Input Device id 5 - spdif Input Device id 6 - lavrate Input Device id 7 - samplerate Input Device id 8 - speexrate Input Device id 9 - pulse Input Device id 11 - speex Input Device id 12 - upmix Input Device id 13 - vdownmix Input Device id 15 - default ealbertos@urbanrest:~ $
Integrating Audio Capture and Display Visualization
To wrap up my experiences from the first two weeks of working with the kit components, I'll share two demonstrations. These showcase the integration of sound capture, processing, and real-time visualization of the relative sound level in decibels, both indoors and outdoors.
Indoor Scene: Broadcasting of a soccer match on the radio.
Outdoor Scene: A paper recycling truck passing by under the house at 1 in the morning.
UrbanRest Guardian blog series
Want to know more about this project? Check out the full blog series here:
- Blog 1 - UrbanRest Guardian - Project Introduction
- Blog 2 - UrbanRest Guardian - First contact with the kit components.
- Blog 3 - UrbanRest Guardian - Prototype Construction Journey
- Blog 4 - UrbanRest Guardian - Classifying Urban Sounds
- Blog 5 - UrbanRest Guardian - Remote Monitoring
- Final Blog - UrbanRest Guardian - Smart Street Noise Monitor