FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2004
    Location
    HEL
    Posts
    168

    Reverse Bluetooth Tethering with Fedora 25

    I am looking for a solution for bluetooth reverse tethering with Fedora 25. The idea is to get internet connectivity on the Android phone by establishing a bluetooth connection with laptop/desktop(Fedora 25)'s and ultimately using it's internet connectivity.

    I have explored Bluez 4.x (which contains PAN daemon for creating a network) and Bluez 5.x (which don't have PAN daemon anymore). Googling provides some hints but most of the links discuss sharing internet connection between two laptops rather than between android and Fedora 25. One such link is:

    http://blog.fraggod.net/2015/03/28/b...-bluez-5x.html

    Does anyone know how can I achieve the above in Fedora 25 with Bluez 5.x.
    Last edited by buchalkalan; 1st August 2017 at 11:00 AM.

  2. #2
    Join Date
    Nov 2004
    Location
    HEL
    Posts
    168

    Re: Reverse Bluetooth Tethering with Fedora 25

    I have had some progress regarding my issue, however, I am seeing the following message in /var/log/messages. Could someone throw some light on these messages. The messages are somewhat cryptic and don't tell much.

    Code:
    Aug 11 09:21:46 fedbox avahi-daemon[922]: Registering new address record for fe80::5ef3:80ff:fe6e:1976 on bnep0.*.
    Aug 11 09:21:47 fedbox ModemManager[967]: <info>  Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-6': not supported by any plugin
    Aug 11 09:21:49 fedbox plasmashell: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
    Aug 11 09:22:15 fedbox rtkit-daemon[924]: Successfully made thread 28195 of process 1644 (/usr/bin/pulseaudio) owned by '500402' RT at priority 5.
    Aug 11 09:22:15 fedbox plasmashell: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
    Aug 11 09:22:16 fedbox NetworkManager[13187]: <info>  [1502432536.2410] policy: auto-activating connection 'Nexus 5 Network (nap)'
    Aug 11 09:22:16 fedbox NetworkManager[13187]: <info>  [1502432536.2424] device (BC:..:99): Activation: starting connection 'Nexus 5 Network (nap)' (cc541fb3-9f1d-4121-b86e-f50022fb6203)
    Aug 11 09:22:16 fedbox NetworkManager[13187]: <info>  [1502432536.2425] device (BC:..:99): state change: disconnected -> prepare (reason 'none') [30 40 0]
    Aug 11 09:22:16 fedbox NetworkManager[13187]: <info>  [1502432536.2428] device (BC..:99): state change: prepare -> config (reason 'none') [40 50 0]
    Aug 11 09:22:16 fedbox kdeinit5: plasma-nm: Unhandled active connection state change:  1
    Aug 11 09:22:16 fedbox bluetoothd[8124]: connect error: Connection refused (111)
    Aug 11 09:22:16 fedbox NetworkManager[13187]: <warn>  [1502432536.2504] device (BC:..:99): Error connecting with bluez: GDBus.Error:org.bluez.Error.Failed: Input/output error
    Aug 11 09:22:16 fedbox NetworkManager[13187]: <info>  [1502432536.2504] device (BC:..:99): state change: config -> failed (reason 'bluetooth-failed') [50 120 44]
    Last edited by buchalkalan; 11th August 2017 at 09:17 AM.

  3. #3
    Join Date
    Apr 2016
    Location
    Kota Tinggi, Johor, Malaysia
    Age
    21
    Posts
    163

    Re: Reverse Bluetooth Tethering with Fedora 25

    So you are trying to let Android to connect your Laptop's Internet through Bluetooth?

    I don't think that's possible on current Android stacks, heck may even be less efficient compare to Wifi...
    Laptop Specs
    https://forums.fedoraforum.org/showpost.php?p=1760122&postcount=528

  4. #4
    Join Date
    Nov 2004
    Location
    HEL
    Posts
    168

    Re: Reverse Bluetooth Tethering with Fedora 25

    Never mind, I got it working.

  5. #5
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,394

    Re: Reverse Bluetooth Tethering with Fedora 25

    Quote Originally Posted by buchalkalan
    Never mind, I got it working.
    how nice for you, please share the solution you used

  6. #6
    Join Date
    Sep 2017
    Location
    US
    Posts
    1

    Re: Reverse Bluetooth Tethering with Fedora 25

    Please share how you got this working. I have been fighting this for over a day now. I am trying to use the blueman + Network Manager method with no luck.

  7. #7
    Join Date
    Nov 2004
    Location
    HEL
    Posts
    168

    Re: Reverse Bluetooth Tethering with Fedora 25

    I'm a bit busy at the moment. I'll write a detailed post later on. In nut shell here is what I've done (I'm using KDE).

    Modify the /usr/lib/systemd/system/bluetooth.service as below:

    ExecStart=/usr/libexec/bluetooth/bluetoothd -n -C -P sap # -P sap is only needed when the mobile device don't have sim card; for a mobile device with sim card remove -P sap
    ExecStartPost=/usr/bin/sdptool add NAP
    Code:
    # systemctl daemon-reload
    # systemctl restart bluetooth.service
    Create a bridge (say br0) with brctl or ip command and make the physical LAN interface (say eno1) slave of the bridge br0. Please note that eno1 is the physical interface having internet connectivity. Flush the ip address(s) assigned to eno1; bring up the bridge and get/assign an ip address (e.g. with dhclient or nmcli or whatever tool you use).

    Install dnsmasq dhcp server and configure it in such a way that it leases the ip addresses via the bridge interface br0. (Say the bridge has ip address 192.168.1.1/24, then the dnsmasq should provide the ip addresses say 192.168.1.2-192.168.1.10(or whatever range is suitable for you).

    Run the command
    Code:
    bt-network -d -s nap br0 &
    Connect the mobile device with your fedora box via bluetooth; (remember to trust the mobile device).
    With mobile device connected to fedora box; go to bluetooth connection settings on the mobile device and check the box before "enable internet access".
    If everything works fine; you should see a new interface on both fedora box (named bnep0) and mobile device (named bt-pan). The bt-pan should have the ip address provided by the dnsmasq server and you should have the internet connectivity on the mobile device.

Similar Threads

  1. Blueman / Bluetooth NAP - reverse tethering
    By kosieh in forum Servers & Networking
    Replies: 1
    Last Post: 7th October 2015, 07:33 PM
  2. usb tethering works great with Fedora 21
    By marko in forum Servers & Networking
    Replies: 1
    Last Post: 20th January 2015, 08:44 AM
  3. Problems reverse usb tethering android device with fedora 15
    By H0wdy in forum Servers & Networking
    Replies: 1
    Last Post: 11th September 2011, 08:57 AM
  4. Blackberry, Bluetooth and tethering
    By mistergoodbytes in forum Guides & Solutions (Not For Questions)
    Replies: 0
    Last Post: 28th March 2011, 10:10 AM
  5. Phone Tethering [Fedora 10]
    By YaKillaCJ in forum Servers & Networking
    Replies: 0
    Last Post: 21st December 2008, 07:04 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •