如何禁用Raspberry Pi 4板載內建藍芽及WiFi

停用Rasbperry Pi4 板載WiFi與藍芽

列出藍芽設備

hcitool dev

Devices: hci0 E4:5F:01:42:3A:4B

列出無線設備

iw dev

[…]
Name: disable-bt
Info: Disable onboard Bluetooth on Pi 3B, 3B+, 3A+, 4B and Zero W, restoring
UART0/ttyAMA0 over GPIOs 14 & 15.
N.B. To disable the systemd service that initialises the modem so it
doesn’t use the UART, use ‘sudo systemctl disable hciuart’.
Load: dtoverlay=disable-bt
Params:
[…]
Name: disable-wifi
Info: Disable onboard WLAN on Pi 3B, 3B+, 3A+, 4B and Zero W.
Load: dtoverlay=disable-wifi
Params:
[…]

檢查可使用的選項

less /boot/overlays/README

[…]
Name: disable-bt
Info: Disable onboard Bluetooth on Pi 3B, 3B+, 3A+, 4B and Zero W, restoring
UART0/ttyAMA0 over GPIOs 14 & 15.
N.B. To disable the systemd service that initialises the modem so it
doesn’t use the UART, use ‘sudo systemctl disable hciuart’.
Load: dtoverlay=disable-bt
Params: <None>
[…]
Name: disable-wifi
Info: Disable onboard WLAN on Pi 3B, 3B+, 3A+, 4B and Zero W.
Load: dtoverlay=disable-wifi
Params: <None>
[…]

關閉版載藍芽

echo "dtoverlay=disable-bt" | sudo tee -a /boot/config.txt

關閉板載 WLAN設備

echo "dtoverlay=disable-wifi" | sudo tee -a /boot/config.txt

禁用透過初始化 UART 連接 systemd服務的藍牙裝置

sudo systemctl disable hciuart

將 Raspberry Pi重開機

sudo reboot

確保藍牙設備無法使用

hcitool dev

Devices:

確保無線設備無法使用。

iw dev

檢查網絡設備

ip -br a

lo UNKNOWN 127.0.0.1/8 ::1/128 eth0 UP 172.16.1.101/16 fe80::12b8:2400:4357:ec24/64