Mini guide: bluetooth tether on android

  1. ensure bluetooth tethering is turned on , on your phone. “Settings: bluetooth OR more”
  2. enable bluetooth discovery on phone
  3. ssh into pwnagotchi and find your mac address for your phone
$ sudo bluetoothctl
$ scan on
......
[CHG] Device F4:A3:KF:E3:CE:9E Nexus 5

we care about F4:A3:KF:E3:CE:9E

  1. config.yml
main:
    plugins:
        bt-tether:
          enabled: true # if you want to use this, set ui.display.video.address to 0.0.0.0
          devices: 
            nexus5: 
              enabled: true
              search_order: 1
              mac: F4:A3:KF:E3:CE:9E  # mac of your bluetooth device
              ip: '192.168.44.45' # ip from which your pwnagotchi should be reachable
              netmask: 24
              interval: 1 # check every x minutes for device
              scantime: 15
              priority: 99
              max_tries: 0 
              share_internet: true
  1. back on the pwnagotchi lets pair. Have your phonew bluetooth settings open cause it will ask their too.
$ sudo bluetoothctl
pair F4:A3:KF:E3:CE:9E
...(pair) yes/no
$ yes
# here your phone will ask if you want to pair with some code ... say yes on phone and yes in terminal
$ trust F4:A3:KF:E3:CE:9E
$ trust F4:A3:KF:E3:CE:9E
# yes i run it twice because i dunno double trusting is better than single right?
  1. add bnep0-cfg . i like to do this so i know what device has what IP. this makes my life easier with multiple devices on bluetooth
    create the file
    /etc/network/interfaces.d/bnep0-cfg
#bnep0-cfg
allow-hotplug bnep0
iface bnep0 inet static
  address 192.168.44.45
  netmask 255.255.255.0
  network 192.168.44.0
  broadcast 192.168.44.255
  gateway 192.168.44.1
  metric 50
  1. hardware restart the pwnagotchi
$ sudo reboot
4 Likes

You can also find the MAC at Settings -> About Phone -> Status.

Thank you Ridingintraffic for this awesome guide. I had bluetooth set up on 1.2.1 and previous versions of the pwnagotchi. Today when running 1.3.0 my bluetooth just did not want to connect. I followed this guide to a T and was able to get it connected and back up and running :smile:

1 Like

In addiction, keep the screen on in bluetooth app (Settings > Connections > Bluetooth) because some vendor (I’ve tried Samsung and Motorola) prevent the scan and pair of device outside the app, even the trusted device