As far back as the Maemo-Linux Nokia N900 we have had a FOSS option to install and configure bluetooth tethering using the Personal Area Network profile. Using bt vs wifi is a major A/hr savings when on battery, it is quite secure, and easy to use once configured.
This is the PAN setup guide for Maemo Linux from around 2011(have to get past the old HTTPS certs) pre-systemd arm debian fork
https://bugs.maemo.org/Bluetooth_PAN
This is mostly a setup of iptables and some bluetooth or bluez config. When I had a pinephone I got as far as getting the PAN bluetooth link and networking working but for some reason never solved why I couldn’t get the link between the BT PAN and the cellular modem’s internet connection unless I SSH’ed into the phone with the -D and connected to that socks5 proxy as a crude hack.
1 Like
Ideally I would have made a working dhcp and network tunnel, but when I wiped and started again I must have missed a step in my notes. I never got it that close to working again using bluez(I could have been hacking at the configs themselves?) despite trying over the space of five years occasionally. It needs to be said that I don’t mentally visualize things like iptables very well and I am stuck cutting and pasting the work of others and praying too often.
2 Likes
OK I think I have it working; lets test this and add it to PureOS… Mobian too!
sudo modprobe bnep
echo “bnep” | sudo tee /etc/modules-load.d/bnep.conf
sudo hciconfig hci0 up
bluetoothctl
(in the [bluetooth] dialog type)
power on
(then end [bluetooth] session type)
exit
Lets make a personal area network
sudo sdptool add NAP
sudo nmcli connection add type bluetooth con-name "PAN-Share" ifname bnep0
bluetooth.type nap ipv4.method shared
sudo nmcli connection up "PAN-Share"
Now to keep it all after reboot
sudo apt install iptables-persistent
sudo netfilter-persistent save
crossposted to BT PAN - we need iptables and BT hackers
3 Likes
Is there an easy way to add an on/off button in the notification area or BT settings?
reality is the pairing process is enough GUI ad then when needed the client computer can connect to PAN as needed and the host phone can disconnect a problematic paired client completely.