Bluetooth problems on NUC6CAYH

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Bluetooth problems on NUC6CAYH

Postby kendew » 2017-08-31 22:07

One by one, thanks to people in this forum, I'm getting issues solved with this NUC6CAYH, which, in spite of problems presented here, I'm happy with. I've sort of been proceeding in order of importance for me and the next in line is bluetooth.
Bluetooth is something I haven't paid that much attention to but I'd like to know because I have a keyboard, a Logitech k830 that can connect either via USB or this version of the k830 can also connect via bluetooth. The NUC6CAYH being a very small box built by Intel, every USB port is valuable so bluetooth would be nice.
I've tried pairing the keyboard with the NUC and the software interface goes through the motions, but in the end doesn't pair, though the k830 is recognized. I've tried my smartphone but no success there.
I've been building up an Openbox environment because that gives me the freedom to install just what I want. So I tried to install bluetooth packages that were not going to bring in a lot of dependencies from the various Desktop Environments.
What's installed is blueman, bluetooth, bluez, bluez-obexd, bluez-tools, and libbluetooth3.
rfkill shows no blocks
Code: Select all
Ao:~$ sudo rfkill list
0: hci0: Bluetooth
   Soft blocked: no
   Hard blocked: no
1: phy0: Wireless LAN
   Soft blocked: no
   Hard blocked: no


Relevant (maybe) bluetooth info from journalctl:

Code: Select all
 9月 01 02:34:15 Ao bluetoothd[529]: Bluetooth daemon 5.43
 9月 01 02:34:15 Ao systemd[1]: Starting Daily apt download activities...
 9月 01 02:34:15 Ao systemd[1]: Starting Light Display Manager...
 9月 01 02:34:15 Ao systemd[1]: Started Getty on tty1.
 9月 01 02:34:15 Ao systemd[1]: Reached target Login Prompts.
 9月 01 02:34:15 Ao bluetoothd[529]: Starting SDP server
 9月 01 02:34:15 Ao systemd[1]: Started Bluetooth service.
 9月 01 02:34:15 Ao polkitd[528]: started daemon version 0.105 using authority implementation `local' version `0.105'
 9月 01 02:34:15 Ao dbus[462]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
 9月 01 02:34:15 Ao systemd[1]: Started Authorization Manager.
 9月 01 02:34:15 Ao accounts-daemon[456]: started daemon version 0.6.43
 9月 01 02:34:15 Ao systemd[1]: Started Accounts Service.
 9月 01 02:34:15 Ao systemd[1]: Started LSB: disk temperature monitoring daemon.
 9月 01 02:34:15 Ao systemd[1]: Reached target Bluetooth.
 9月 01 02:34:15 Ao kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
 9月 01 02:34:15 Ao kernel: Bluetooth: BNEP filters: protocol multicast
 9月 01 02:34:15 Ao kernel: Bluetooth: BNEP socket layer initialized
 9月 01 02:34:15 Ao dbus[462]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
 9月 01 02:34:15 Ao bluetoothd[529]: Bluetooth management interface 1.14 initialized
 9月 01 02:34:15 Ao bluetoothd[529]: Failed to obtain handles for "Service Changed" characteristic
 9月 01 02:34:15 Ao kernel: input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:0e.0/sound/card0/input9
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:0e.0/sound/card0/input10
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH Headphone Front as /devices/pci0000:00/0000:00:0e.0/sound/card0/input11
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH Front Headphone Surround as /devices/pci0000:00/0000:00:0e.0/sound/card0/input12
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input13
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input14
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input15
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input16
 9月 01 02:34:15 Ao kernel: input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input17
 9月 01 02:34:15 Ao systemd[1]: Reached target Sound Card.
 9月 01 02:34:15 Ao systemd[1]: Starting Hostname Service...
 9月 01 02:34:15 Ao bluetoothd[529]: Sap driver initialization failed.
 9月 01 02:34:15 Ao bluetoothd[529]: sap-server: Operation not permitted (1)


It seems sap server initialization fails. Also, operation not permitted. Sap I know means SIM access protocol but I'm not sure what a sap-server does or why I might need one. There was a bug over a similar issue filed here at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803265 .
And the suggestion
the error messages about SAP can be avoided by starting bluetoothd with the "--noplugin=sap" option.

Since SAP is probably of little use in Debian and since it does not work anyway, how about disabling it by default?


Is this a good solution? Is there anything that sticks out to anyone that I could try other than that?
And, this would be a wonderful case, is anyone using a k830 Logitech keyboard on Linux that can let us know that it's at least possible?

Sorry for long post and thanks,
Kendew
kendew
 
Posts: 30
Joined: 2014-10-12 19:59

Re: Bluetooth problems on NUC6CAYH

Postby pylkko » 2017-09-01 04:04

The sap error is unrelated ans can be ignored. You need to connect a Bluetooth device for it to be able to communicate with the computer. Read the man page for bluetoothctl and the attempt to make a connection pasting the output here.
User avatar
pylkko
 
Posts: 1174
Joined: 2014-11-06 19:02

Re: Bluetooth problems on NUC6CAYH

Postby kendew » 2017-09-01 22:20

OK. Not a lot in the man page, but here's what happens when trying to pair the device. Never am I asked for a key or the like, so perhaps I'm missing some software?
Code: Select all
$ bluetoothctl
[NEW] Controller 10:F0:05:0E:BE:82 Ao [default]
[NEW] Device FD:4B:35:77:89:98 K830
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046
   00010000-0000-1000-8000-011f2000046d
   Vendor specific
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046/char0047
   00010001-0000-1000-8000-011f2000046d
   Vendor specific
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046/char0047/desc0049
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017
   0000180f-0000-1000-8000-00805f9b34fb
   Battery Service
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018
   00002a19-0000-1000-8000-00805f9b34fb
   Battery Level
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018/desc001b
   00002908-0000-1000-8000-00805f9b34fb
   Report Reference
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018/desc001a
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c
   0000180a-0000-1000-8000-00805f9b34fb
   Device Information
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0015
   00002a50-0000-1000-8000-00805f9b34fb
   PnP ID
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0013
   00002a28-0000-1000-8000-00805f9b34fb
   Software Revision String
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0011
   00002a26-0000-1000-8000-00805f9b34fb
   Firmware Revision String
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char000f
   00002a24-0000-1000-8000-00805f9b34fb
   Model Number String
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char000d
   00002a29-0000-1000-8000-00805f9b34fb
   Manufacturer Name String
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008
   00001801-0000-1000-8000-00805f9b34fb
   Generic Attribute Profile
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008/char0009
   00002a05-0000-1000-8000-00805f9b34fb
   Service Changed
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008/char0009/desc000b
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 Trusted: no
[CHG] Device FD:4B:35:77:89:98 Trusted: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[CHG] Device FD:4B:35:77:89:98 Connected: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[DEL] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008/char0009/desc000b
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008/char0009
   00002a05-0000-1000-8000-00805f9b34fb
   Service Changed
[DEL] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008
   00001801-0000-1000-8000-00805f9b34fb
   Generic Attribute Profile
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char000d
   00002a29-0000-1000-8000-00805f9b34fb
   Manufacturer Name String
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char000f
   00002a24-0000-1000-8000-00805f9b34fb
   Model Number String
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0011
   00002a26-0000-1000-8000-00805f9b34fb
   Firmware Revision String
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0013
   00002a28-0000-1000-8000-00805f9b34fb
   Software Revision String
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0015
   00002a50-0000-1000-8000-00805f9b34fb
   PnP ID
[DEL] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c
   0000180a-0000-1000-8000-00805f9b34fb
   Device Information
[DEL] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018/desc001a
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[DEL] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018/desc001b
   00002908-0000-1000-8000-00805f9b34fb
   Report Reference
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018
   00002a19-0000-1000-8000-00805f9b34fb
   Battery Level
[DEL] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017
   0000180f-0000-1000-8000-00805f9b34fb
   Battery Service
[DEL] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046/char0047/desc0049
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[DEL] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046/char0047
   00010001-0000-1000-8000-011f2000046d
   Vendor specific
[DEL] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046
   00010000-0000-1000-8000-011f2000046d
   Vendor specific
[DEL] Device FD:4B:35:77:89:98 K830
[NEW] Device FD:4B:35:77:89:98 K830
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008
   00001801-0000-1000-8000-00805f9b34fb
   Generic Attribute Profile
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008/char0009
   00002a05-0000-1000-8000-00805f9b34fb
   Service Changed
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0008/char0009/desc000b
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c
   0000180a-0000-1000-8000-00805f9b34fb
   Device Information
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char000d
   00002a29-0000-1000-8000-00805f9b34fb
   Manufacturer Name String
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char000f
   00002a24-0000-1000-8000-00805f9b34fb
   Model Number String
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0011
   00002a26-0000-1000-8000-00805f9b34fb
   Firmware Revision String
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0013
   00002a28-0000-1000-8000-00805f9b34fb
   Software Revision String
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service000c/char0015
   00002a50-0000-1000-8000-00805f9b34fb
   PnP ID
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017
   0000180f-0000-1000-8000-00805f9b34fb
   Battery Service
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018
   00002a19-0000-1000-8000-00805f9b34fb
   Battery Level
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018/desc001a
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0017/char0018/desc001b
   00002908-0000-1000-8000-00805f9b34fb
   Report Reference
[NEW] Primary Service
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046
   00010000-0000-1000-8000-011f2000046d
   Vendor specific
[NEW] Characteristic
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046/char0047
   00010001-0000-1000-8000-011f2000046d
   Vendor specific
[NEW] Descriptor
   /org/bluez/hci0/dev_FD_4B_35_77_89_98/service0046/char0047/desc0049
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[CHG] Device FD:4B:35:77:89:98 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device FD:4B:35:77:89:98 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device FD:4B:35:77:89:98 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device FD:4B:35:77:89:98 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device FD:4B:35:77:89:98 UUIDs: 00001812-0000-1000-8000-00805f9b34fb
[CHG] Device FD:4B:35:77:89:98 UUIDs: 00010000-0000-1000-8000-011f2000046d
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: yes
[CHG] Device FD:4B:35:77:89:98 Appearance: 0x03c1
[CHG] Device FD:4B:35:77:89:98 Icon: input-keyboard
[CHG] Device FD:4B:35:77:89:98 Modalias: usb:v046DpB335d0009
[CHG] Device FD:4B:35:77:89:98 ServicesResolved: no
[CHG] Device FD:4B:35:77:89:98 Connected: no
[bluetooth]#
kendew
 
Posts: 30
Joined: 2014-10-12 19:59

Re: Bluetooth problems on NUC6CAYH

Postby pylkko » 2017-09-02 15:09

Ok. Attempt to make a connection pasting the output here.
User avatar
pylkko
 
Posts: 1174
Joined: 2014-11-06 19:02

Re: Bluetooth problems on NUC6CAYH

Postby kendew » 2017-09-02 20:18

Yes, what I posted above was my attempt to make a connection.
Thanks. Not hearing back I went through disabling the sap plugin as indicated in the link I offered earlier. Then I tried connecting the bluetooth device as before, but again no luck. Then I clicked a few buttons, and now this keyboard is working with bluetooth!!??
Of course I am happy it's working, but nervous because I don't really have a clue why and I want to know. I'm going to keep an eye on it, still if it continues to work after computer restart, but at least I have the knowledge that it can work, which is a big step. It is still listed as an unknown device.
Kendew
kendew
 
Posts: 30
Joined: 2014-10-12 19:59

Re: Bluetooth problems on NUC6CAYH

Postby pylkko » 2017-09-03 05:34

Uhm... what you have posted is your attempt to connect? No. if you just type "bluetoothctl" into a shell that is not going to connect to anything. Bluetooth requires that you pair and connect and possibly "trust" the device. If you do these processes using bluetoothctl you get error messages when things don't work and these can help you resolve the problem.

The sap server has no effect on anything, I have some machines where it is disabled and others where it s not. It only produces a benign error message in journalctl.

Bluetooth devices sometimes are slow and at other times just loose the connection for a short interval. It is possible that something like that happened in your case. What helps in these situations is being closer to the antenna/more line of sight.
User avatar
pylkko
 
Posts: 1174
Joined: 2014-11-06 19:02

Re: Bluetooth problems on NUC6CAYH

Postby kendew » 2017-09-20 17:45

I appreciate the help and suggestions. It's the first time I'm using a bluetooth keyboard. The man pages gave very little info on bluetoothctl but this page http://patkoscsaba.blogspot.com/2013/12/linux-tip-how-to-pair-your-bluetooth.html gave me a clue as he was dealing with bluetooth issues with 4.12 kernel. In particular, setting up default-agent as suggested on this page helped. As he did I also found no agent on:
Code: Select all
[bluetooth]# default-agent
No agent is registered
and so after registering
Code: Select all
[bluetooth]# agent on
Agent registered
I was able to connect the keyboard without problem, same situation as this writer.
However, journalctl still returns:
Code: Select all
 9月 21 02:05:47 Ao bluetoothd[477]: Failed to obtain handles for "Service Changed" characteristic
 9月 21 02:05:47 Ao kernel: random: crng init done
 9月 21 02:05:47 Ao bluetoothd[477]: Sap driver initialization failed.
 9月 21 02:05:47 Ao bluetoothd[477]: sap-server: Operation not permitted (1)

I really don't understand what the sap driver is, why initialization failed, and how this might relate to bluetooth functioning.
kendew
 
Posts: 30
Joined: 2014-10-12 19:59

Re: Bluetooth problems on NUC6CAYH

Postby pylkko » 2017-09-20 21:39

If you are not using a mobile phone, then you can ignore the sap driver. It is a SIM accessory profile module and it had to do with how phones can hand over control of the modem over Bluetooth (to a car, for example). If you search on the net you will find guides on how to disable the module in the Bluetooth service file
User avatar
pylkko
 
Posts: 1174
Joined: 2014-11-06 19:02


Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable