11Serial-to-Bluetooth Bridge
22==========================
33
4- - Tested on Raspberry Pi Zero W with Raspberry Pi OS Lite 32-bit 2025-10-01 (trixie)
4+ - Tested on Raspberry Pi Zero W with Raspberry Pi OS Lite 32-bit 2025-11-24 (trixie)
55 - A fairly large electrolytic capacitor (e.g. 470-1000uF) on the 5V pins is useful
66 to handle current spikes and prevent reboots when plugging in OTG cable.
7- - Base Installation: < https://github.com/haukex/raspinotes/blob/c3727f9b/BaseInstall.md >
7+ - Base Installation: < https://github.com/haukex/raspinotes/blob/54425986/BaseInstall.md >
8+ - In raspi-config, enable WLAN power saving
89 - With overlay filesystem, ufw, proxychains
910 - Without fail2ban, crontab, mail, unattended upgrades
10- - In raspi-config, enable WLAN power saving
1111
1212Setup on RPi:
1313
1414 git clone https://github.com/haukex/raspinotes.git ~/code/raspinotes
15+ echo "~/code/raspinotes" >>~/.git-mysync # optional, if you're using my tool
1516
1617 ~/code/raspinotes/bt-serial/install.sh
1718
1819 sudo vi /etc/systemd/system/bt-serial-bridge.service
1920 # Adjust settings (UUID, ports, baud rate etc.) in that file as needed
21+ # Run `bt_serial_bridge.py --help` for help
2022 # BT UUID should be random, *except* xxxxxxxx-0000-1000-8000-00805f9b34fb
2123 # Just for example, this replaces the UUID by a random one:
22- sudo perl -wMstrict -i -pe 's/--bt-uuid=\K[-0-9a-fA-F]{36}\b/chomp(my $u=lc qx#uuid -v4#);say STDERR $u;$u/e' /etc/systemd/system/bt-serial-bridge.service
24+ sudo perl -wM5.014 -i -pe 's/--bt-uuid=\K[-0-9a-fA-F]{36}\b/chomp(my $u=lc qx#uuid -v4#);say STDERR $u;$u/e' /etc/systemd/system/bt-serial-bridge.service
2325
2426 sudo rfkill unblock bluetooth
2527
@@ -28,9 +30,10 @@ Setup on RPi:
2830 AlwaysPairable = true
2931 JustWorksRepairing = always
3032
33+ # A "pretty hostname" of your choice:
3134 echo PRETTY_HOSTNAME="Ser-BT-1" | sudo tee /etc/machine-info
3235
33- sudo perl -wMstrict -i -pe 's#^ExecStart=.*bluetoothd\K\s*$# --compat\n#' /lib/systemd/system/bluetooth.service
36+ sudo perl -wM5.014 -i -pe 's#^ExecStart=.*bluetoothd\K\s*$# --compat\n#' /lib/systemd/system/bluetooth.service
3437
3538 sudo systemctl daemon-reload
3639 sudo systemctl restart bluetooth
@@ -55,10 +58,11 @@ Debugging notes:
5558
5659Cloning notes:
5760
61+ - Set a new ` PRETTY_HOSTNAME ` in ` /etc/machine-info ` .
5862- Set a new UUID in ` /etc/systemd/system/bt-serial-bridge.service ` , e.g. via the example command shown above.
5963
6064
61- <!-- spell: ignore Mstrict Pairable bluetoothd fakepty icanon rfkill socat wlan trixie proxychains raspi raspinotes -->
65+ <!-- spell: ignore Pairable bluetoothd fakepty icanon rfkill socat wlan trixie proxychains raspi raspinotes mysync -->
6266
6367Author, Copyright, and License
6468------------------------------
0 commit comments