Last active
January 19, 2025 21:13
-
-
Save velitasali/e9a844b0a72af6f1ff1a7a93b9827a23 to your computer and use it in GitHub Desktop.
Bluetooth NAP Network on RPi4 - package: bluez-utils
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/bt-agent.service | |
[Unit] | |
Description=Bluetooth Auth Agent | |
[Service] | |
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput | |
Type=simple | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/bt-network.service | |
[Unit] | |
Description=Bluetooth NEP PAN | |
After=pan0.network | |
[Service] | |
ExecStart=/usr/bin/bt-network -s nap pan0 | |
Type=idle | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/network/pan0.netdev | |
[NetDev] | |
Name=pan0 | |
Kind=bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/network/pan0.network | |
[Match] | |
Name=pan0 | |
[Network] | |
Address=192.168.2.1/24 | |
DHCPServer=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I love this setup, and i made a small minor tweak to bt-agent.service, that gives you the command to use on the client, lol.
if you happen to work from a terminal client that allows copy and paste, otherwise you would just type it out as listed.
ExecStartPost=sh -c 'printf "%%s\n" "clients use: sudo bt-network -C $( bt-adapter -l | sed -rn "s/.?(([[:xdigit:]]{2}:){5}[[:xdigit:]]{2})./\1/p" ) nap"'