You are not logged in.

#1 2015-05-26 00:11:19

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Connect to smartphone Bluetooth access point from laptop (tethering)

I want to use Android's bluetooth tethering to connect a laptop (via the onboard bluetooth adapter) to a smartphone with bluetooth tethering (Android KitKat 4.4.4, no tethering restrictions). Bluetooth is on on the smartphone and bluetooth tethering is enabled. I have followed the wiki: btusb is loaded, the user is a member of the lp group, bluez and bluez-utils are installed and bluetooth.service is running.

The devices have been successfully paired using bluetoothctl and I am able to access files on the smartphone via obexfs. Here is the devices' info from bluetoothctl (Foo: smartphone, Bar: laptop, redacted MACs and UUIDs):

# info XX:XX:XX:XX:XX:XX
Device XX:XX:XX:XX:XX:XX
  Name: Foo
  Alias: Foo
  Class: 0x5e020c
  Icon: phone
  Paired: yes
  Trusted: no
  Blocked: no
  Connected: no
  LegacyPairing: no
  UUID: Dialup Networking         (...)
  UUID: OBEX Object Push          (...)
  UUID: OBEX File Transfer        (...)
  UUID: Audio Source              (...)
  UUID: Audio Sink                (...)
  UUID: A/V Remote Control Target (...)
  UUID: A/V Remote Control        (...)
  UUID: Headset AG                (...)
  UUID: NAP                       (...)
  UUID: Handsfree Audio Gateway   (...)
  UUID: SIM Access                (...)
  UUID: Phonebook Access Server   (...)
  UUID: Message Access Server     (...)
  UUID: PnP Information           (...)
  UUID: Generic Access Profile    (...)
  UUID: Generic Attribute Profile (...)
  Modalias: bluetooth:...

# show YY:YY:YY:YY:YY:YY
Controller YY:YY:YY:YY:YY:YY
  Name: Bar
  Alias: Bar-0
  Class: 0x10010c
  Powered: yes
  Discoverable: no
  Pairable: yes
  UUID: Generic Attribute Profile (...)
  UUID: A/V Remote Control        (...)
  UUID: OBEX File Transfer        (...)
  UUID: Generic Access Profile    (...)
  UUID: OBEX Object Push          (...)
  UUID: PnP Information           (...)
  UUID: A/V Remote Control Target (...)
  UUID: IrMC Sync                 (...)
  UUID: Vendor specific           (...)
  UUID: Message Notification Se.. (...)
  UUID: Phonebook Access Server   (...)
  UUID: Message Access Server     (...)
  Modalias: usb:...
  Discovering: no

I have tried everything with and without first "trusting" the smartphone and with and without the agent on.

Following the bluetooth section of the android tethering page on the wiki I have run the following command (with the smartphone's MAC address instead of "AA_...":

dbus-send --system --type=method_call --dest=org.bluez /org/bluez/hci0/dev_AA_BB_CC_DD_EE_FF org.bluez.Network1.Connect string:'nap'

No network interface appears and nothing appears on the command line, in the output of journalctl or via systemctl status bluetooth.service.

I have then tried to connect using blueman (2.0.rc1) (via blueman-applet, with networkmanager installed). Blueman also reports the smartphone as paired. Attempting to connect to the smartphone's network access point by right-clicking on it in the list yields

Connection Failed: Network Manager Failed to activate the connection

journalctl output (redacted MAC and UUID):

NetworkManager[2086]: <info>  keyfile: add connection /etc/NetworkManager/system-connections/Network Access Point on Foo (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,"Network Access Point on Foo")
NetworkManager[2086]: <info>  BT device Foo (XX:XX:XX:XX:XX:XX) added (DUN NAP)
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): new Bluetooth device (driver: 'bluez' ifindex: 0)
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): exported as /org/freedesktop/NetworkManager/Devices/6
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): preparing device
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): Activation: starting connection 'Network Access Point on Foo'
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): Activation: Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): Activation: Stage 1 of 5 (Device Prepare) started...
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): Activation: Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): Activation: Stage 1 of 5 (Device Prepare) complete.
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): Activation: Stage 2 of 5 (Device Configure) starting...
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): Activation: Stage 2 of 5 (Device Configure) complete.
NetworkManager[2086]: <warn>  (XX:XX:XX:XX:XX:XX): Error connecting with bluez: GDBus.Error:org.bluez.Error.InvalidArguments: Invalid arguments in method call
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): device state change: config -> failed (reason 'bluetooth-failed') [50 120 44]
NetworkManager[2086]: <warn>  (XX:XX:XX:XX:XX:XX): Activation: failed for connection 'Network Access Point on Foo'
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): device state change: failed -> disconnected (reason 'none') [120 30 0]
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): deactivating device (reason 'none') [0]
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): device state change: disconnected -> unmanaged (reason 'removed') [30 10 36]
NetworkManager[2086]: <info>  (XX:XX:XX:XX:XX:XX): deactivating device (reason 'removed') [36]

At some point the access point on the smartphone was visible via networkmanager's curses interface (nmtui) but it could not be activated. After a reboot and further attempts I have not seen it appear again. The work "finicky" comes up all over the internet for bluetooth configuration and I now understand why).

I have tried all of this with and without bluez-hid2hci installed (restarting bluetooth.service after each change) but that has no effect and I admit that I have no clear idea what it does at this point.

I have failed to find anything via online searching. There are several old posts about a tool named pand but I cannot find it (the posts were several years old). I am a bluetooth noob so I may very well be missing something basic. I suspect that

Error connecting with bluez: GDBus.Error:org.bluez.Error.InvalidArguments: Invalid arguments in method call

is the key but I don't know what to do about it.

Any help would be appreciated, but please don't suggest that I use USB or WiFi tethering. Both work and can be used as workarounds in some cases but ideally I need to get the bluetooth connection working.

Please let me know what additional information I should post. If someone knows how to go the other way (turn the laptop into a wifi


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB