# NetworkManager and bluetooth tethering

## KShots

Ok, at this point, I have things _almost_ working. I can manually get my bluetooth tether up and running, but networkmanager cannot see it.

I found instructions from ArchLinux on using dbus-send to trigger a 'nap' request to generate a bnep interface, which works. In my case, I did:

```
/usr/bin/dbus-send --system --type=method_call --dest=org.bluez /org/bluez/hci0/dev_CC_FA_00_12_6F_ED org.bluez.Network1.Connect string:'nap'
```

You can see the interface from ifconfig:

```
bnep0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.44.20  netmask 255.255.255.0  broadcast 192.168.44.255

        inet6 fe80::fef8:aeff:fe9f:b4c3  prefixlen 64  scopeid 0x20<link>

        ether fc:f8:ae:9f:b4:c3  txqueuelen 1000  (Ethernet)

        RX packets 1975  bytes 671866 (656.1 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 2086  bytes 429518 (419.4 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

Bear in mind, even though it has an IP address in the above, you do not get an IP address at this point - I captured that after I managed to get DHCP running on it, which brings me to the next step... running dhcp. In my case, I chose to use systemd-networkd, which should theoretically run DHCP whenever it sees a matching device... so I created /etc/systemd/network/btnet.network:

```
[Match]

Name=bnep0

[Network]

DHCP=yes
```

, enabled the systemd-networkd service, and started it. Next thing I knew, I had an IP address... but my /etc/resolv.conf was empty. At the moment, I don't know how to resolve that manually other than to simply append one of the google DNS servers in there:

```
nameserver 8.8.8.8
```

That brings me to where I am now... I can post this message over my existing connection at this point.

Back to my point: How can I automate all of this? Can I use networkmanager like I do with my other interfaces? How can I convince NM that my interface even exists?

As far back as March of 2014, I was able to successfully (and even easily) use networkmanager to configure my bnep interfaces, but that functionality disappeared around april-may of 2014. I don't know what version of networkmanager (or the plasma applet for KDE in my case) I was running at the time. What I'm running now is networkmanager-0.9.8.8 and plasma-nm-0.9.3.3. Even at this point, where the network is fully operational, networkmanager cannot see my connection.

EDIT: Now it's even more important... apparently, if networkmanager doesn't think I'm connected, it won't offer any of my VPN connections - so I'm cut off from my VPN  :Sad: 

----------

## eccerr0r

I heard it was a DUN problem with bluez5 ...

https://bugzilla.redhat.com/show_bug.cgi?id=1055628

Doesn't work for me yet AFAIK...

I wonder if it's possible to hack the ebuild to use bluez4 which had been working...

----------

## KShots

That's odd... not all bluetooth connections have anything to do with DUN (mine included). I wonder if they simply disabled it across the board just because it didn't work with the folks using DUN?

----------

## eccerr0r

Hmm... I've never tried PAN which is the other possible route.  DUN used to work fine for me.

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1229256 seems to be a bug related to it, unsure what the outcome is...

----------

