When the Rasberry PI uses too much power, the WaveShare Hat does not connect the GSM network.
The following show the difference between the old (red) and adapted text file (green) as generated by the command diff --color -u old_file new_file
.
The file to change are chown in the second line. New lines start with +
(green) and removed/replaced lines start with -
(red). The markers (+
/-
/@
) should not be added to the file.
--- /etc/rc.local.bak 2023-01-22 19:47:55.906202807 +0000
+++ /etc/rc.local 2023-01-22 19:49:30.933060657 +0000
@@ -17,4 +17,11 @@
printf "My IP address is %s\n" "$_IP"
fi
+# Turn off USB/LAN
+# https://raspberrypi-guide.github.io/electronics/power-consumption-tricks
+echo '1-1' |sudo tee /sys/bus/usb/drivers/usb/unbind
+
+# Turn off HDMI output
+sudo /opt/vc/bin/tvservice -o
+
exit 0
Please make a copy for thed file to be edited first and check the differences:
sudo cp /etc/rc.local /etc/rc.local.bak
sudo nano /etc/rc.local
diff --color -u /etc/rc.local.bak /etc/rc.local
The output of diff
should match to the difference shown before.
Run these commands to disable BlueTooth:
sudo systemctl disable hciuart.service
sudo systemctl disable bluetooth.service
As before, make a back-up copy, edit the file and finaly review the changes with:
sudo cp /boot/config.txt /boot/config.txt.bak
sudo nano /boot/config.txt
diff --color -u /boot/config.txt.bak /boot/config.txt
--- /boot/config.txt.bak 2023-02-18 15:30:02.000000000 +0000
+++ /boot/config.txt 2023-02-21 20:28:54.000000000 +0000
@@ -78,7 +78,14 @@
[pi4]
# Run as fast as firmware / board allows
-arm_boost=1
+arm_boost=0
[all]
+enable_uart=1
+
+# https://www.foxplex.com/sites/raspberry-pi-over-und-underclocking/
+arm_freq=700
+core_freq=250
+core_freq_min=75
+sdram_freq=400
+over_voltage=0
How many CPU core does the Rassberry Pi have? Run the following command:
cat /proc/cpuinfo
To reduce the power consumption, limit the CPU cores to 1.
- Add
maxcpus=1
to the file/boot/cmdline.txt
beforeroot
. - If the file contains
console=serial0,115200
, then you should remove it.
Do not change the identifier following root=PARTUUID=
or anything else.
As before, make a back-up copy, edit the file and finaly review the changes with:
sudo cp /boot/cmdline.txt /boot/cmdline.txt.bak
sudo nano /boot/cmdline.txt
diff --color -u /boot/cmdline.txt.bak /boot/cmdline.txt
For example, my changes looked like this.
--- /boot/cmdline.txt.bak 2023-01-22 21:01:02.000000000 +0000
+++ /boot/cmdline.txt 2023-01-22 21:02:04.000000000 +0000
@@ -1 +1 @@
-console=tty1 root=PARTUUID=a999dc5f-02 rootfstype=ext4 fsck.repair=yes rootwait
\ No newline at end of file
+console=tty1 maxcpus=1 root=PARTUUID=a999dc5f-02 rootfstype=ext4 fsck.repair=yes rootwait
To reboot the Rasberry pi use the following command (you will need to reconnect via SSH, after the reboot process is finished):
sudo reboot