jeeva
Posts: 2
Joined: Sat Jan 09, 2016 6:11 pm

bluetoothd sap driver issue

Sat Jan 09, 2016 6:15 pm

Hello All,

I quite new to rpi world.. When I try to check the status of my bluetooth, I am getting the Sap driver initialization failed error as shown below. Could someone please help me resolve this issue?

Code: Select all

pi@raspberrypi:~ $ sudo service bluetooth status
* bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: active (running) since Sat 2016-01-09 17:46:27 UTC; 21min ago
     Docs: man:bluetoothd(8)
 Main PID: 1835 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           `-1835 /usr/lib/bluetooth/bluetoothd

Jan 09 17:46:27 raspberrypi bluetoothd[1835]: Bluetooth daemon 5.23
Jan 09 17:46:27 raspberrypi bluetoothd[1835]: Starting SDP server
Jan 09 17:46:27 raspberrypi bluetoothd[1835]: Bluetooth management interface 1.9 initialized
Jan 09 17:46:27 raspberrypi bluetoothd[1835]: Sap driver initialization failed.
Jan 09 17:46:27 raspberrypi bluetoothd[1835]: sap-server: Operation not permitted (1)
Jan 09 17:46:27 raspberrypi systemd[1]: Started Bluetooth service.
Thanks
Jeeva

Architek1
Posts: 1
Joined: Tue Jan 12, 2016 7:55 pm

Re: bluetoothd sap driver issue

Fri Jan 15, 2016 8:58 pm

I'm having the same problem. Did you solve this yet?

baltus
Posts: 1
Joined: Thu Jan 21, 2016 7:29 pm

Re: bluetoothd sap driver issue

Thu Jan 21, 2016 7:30 pm

Same problem here, any solution?

Ben44
Posts: 3
Joined: Mon Jan 25, 2016 7:00 pm

Re: bluetoothd sap driver issue

Mon Jan 25, 2016 7:16 pm

Hi,
I have the same problem. After reinstall too.

I seen persons on the web who solve similar errors of Sap driver initialization failed. And sap-server: Operation not permitted (1). But they have another error lines below...
I try theire solutions without success...

As jeeva I have nothing below sap-server: Operation not permitted (1).

My Bluetooth dongle is Asus BT400...

Help,please!

Ben44
Posts: 3
Joined: Mon Jan 25, 2016 7:00 pm

Re: bluetoothd sap driver issue

Wed Jan 27, 2016 5:38 pm

Nobody?
Ok, i will downgrade to WHEEZY... :(

User avatar
Douglas6
Posts: 5221
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: bluetoothd sap driver issue

Wed Jan 27, 2016 6:13 pm

I'm not seeing this issue on my Jessie Pi2B with a CSR dongle.

Is it a problem? The SAP server seems to be related to SIM cards, which most Pis don't have.

Ben44
Posts: 3
Joined: Mon Jan 25, 2016 7:00 pm

Re: bluetoothd sap driver issue

Thu Jan 28, 2016 4:12 pm

No problem on WHEEZY

Code: Select all

service bluetooth status
[ ok ] bluetooth is running.
After

Code: Select all

sudo apt-get install bluetooth bluez-utils blueman
I can see the bluetooth manager in the menubar. and my BT400 Inside.

bomby
Posts: 9
Joined: Sun Feb 07, 2016 7:34 pm

Re: bluetoothd sap driver issue

Mon Feb 08, 2016 2:34 pm

Hi, does anyone have any solution so far?

How do we contact the developer about such issues or does anyone has other workarounds beside downgrading?

Code: Select all

pi@raspberry:/etc/bluetooth $ sudo service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: active (running) since Mon 2016-02-08 05:37:23 SGT; 16h ago
     Docs: man:bluetoothd(8)
 Main PID: 347 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─347 /usr/lib/bluetooth/bluetoothd

Feb 08 05:37:21 raspberry bluetoothd[347]: Bluetooth daemon 5.23
Feb 08 05:37:23 raspberry bluetoothd[347]: Starting SDP server
Feb 08 05:37:23 raspberry systemd[1]: Started Bluetooth service.
Feb 08 05:37:23 raspberry bluetoothd[347]: Bluetooth management interface 1.9 initialized
Feb 08 05:37:23 raspberry bluetoothd[347]: Sap driver initialization failed.
Feb 08 05:37:23 raspberry bluetoothd[347]: sap-server: Operation not permitted (1)

Code: Select all

pi@raspberry:/etc/bluetooth $ bluetoothd -n -d
bluetoothd[8193]: Bluetooth daemon 5.23
bluetoothd[8193]: src/main.c:parse_config() parsing main.conf
bluetoothd[8193]: src/main.c:parse_config() discovto=0
bluetoothd[8193]: src/main.c:parse_config() pairto=0
bluetoothd[8193]: src/main.c:parse_config() auto_to=60
bluetoothd[8193]: src/main.c:parse_config() name=%h-%d
bluetoothd[8193]: src/main.c:parse_config() class=0x000100
bluetoothd[8193]: src/main.c:parse_config() Key file does not have key 'DeviceID'
D-Bus setup failed: Connection ":1.2" is not allowed to own the service "org.bluez" due to security policies in the configuration file
bluetoothd[8193]: Unable to get on D-Bus

User avatar
Douglas6
Posts: 5221
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: bluetoothd sap driver issue

Mon Feb 08, 2016 3:05 pm

What exactly is the problem? We'd need more information. I assume you're running Jessie, was it a clean install, or upgraded from Wheezy? What changes have you made from a plain-vanilla Bluetooth install and configuration? What are you trying to do with Bluetooth and what is not working, and how?

xinkaiwang
Posts: 2
Joined: Thu Jan 21, 2016 6:16 am

Re: bluetoothd sap driver issue

Sun Feb 21, 2016 6:50 am

Douglas6 wrote:What exactly is the problem? We'd need more information. I assume you're running Jessie, was it a clean install, or upgraded from Wheezy? What changes have you made from a plain-vanilla Bluetooth install and configuration? What are you trying to do with Bluetooth and what is not working, and how?
I run into this mysterious "sap-server: Operation not permitted (1)" issue. And here is more context:
1) Yes, I'm using jessie 2015-11-21
2) It is a clean install. use dd to write img to SD card.
3) What did I do?
I'm trying to use PS3 controller with my pi 2B, so I'm following http://booting-rpi.blogspot.ro/2012/08/ ... ry-pi.html
Everything seems works fine (except bluez-utils bluez-compat seems all replaced by bluez), until the step "sudo sixad --start" and press the PS button. I was being told it supposed to be vibration on the dual-shock, but nothing happened. I tried 2 PS3 controller, and I also tried 2 different BT adapter. No luck. So I started my debugging.
I use hciconfig to check my device seems to be fine.

Code: Select all

pi@pi:~ $ hciconfig -a
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 00:19:86:00:11:AD  ACL MTU: 1021:8  SCO MTU: 64:1
	DOWN 
	RX bytes:616 acl:0 sco:0 events:34 errors:0
	TX bytes:380 acl:0 sco:0 commands:34 errors:0
	Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH SNIFF 
	Link mode: SLAVE ACCEPT 

pi@pi:~ $ 
But when I check the service bluetooth status I see following:

Code: Select all

pi@pi:~ $ sudo service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: active (running) since Sun 2016-02-21 05:53:32 UTC; 47s ago
     Docs: man:bluetoothd(8)
 Main PID: 5507 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─5507 /usr/lib/bluetooth/bluetoothd

Feb 21 05:53:32 pi bluetoothd[5507]: Bluetooth daemon 5.23
Feb 21 05:53:32 pi bluetoothd[5507]: Starting SDP server
Feb 21 05:53:32 pi bluetoothd[5507]: Bluetooth management interface 1.9 initialized
Feb 21 05:53:32 pi bluetoothd[5507]: Sap driver initialization failed.
Feb 21 05:53:32 pi bluetoothd[5507]: sap-server: Operation not permitted (1)
Feb 21 05:53:32 pi systemd[1]: Started Bluetooth service.
pi@pi:~ $ 
in order to get more detailed error messages, I have to kill the bluetoothd manually and run bluetoothd with -d -n

Code: Select all

pi@pi:~ $ sudo bluetoothd -d -n
bluetoothd[5784]: Bluetooth daemon 5.23
bluetoothd[5784]: src/main.c:parse_config() parsing main.conf
bluetoothd[5784]: src/main.c:parse_config() Key file does not have key 'DiscoverableTimeout'
bluetoothd[5784]: src/main.c:parse_config() Key file does not have key 'PairableTimeout'
bluetoothd[5784]: src/main.c:parse_config() Key file does not have key 'AutoConnectTimeout'
bluetoothd[5784]: src/main.c:parse_config() Key file does not have key 'Name'
bluetoothd[5784]: src/main.c:parse_config() Key file does not have key 'Class'
bluetoothd[5784]: src/main.c:parse_config() Key file does not have key 'DeviceID'
bluetoothd[5784]: src/main.c:parse_config() Key file does not have key 'ReverseServiceDiscovery'
bluetoothd[5784]: src/gatt.c:gatt_init() Starting GATT server
bluetoothd[5784]: src/adapter.c:adapter_init() sending read version command
bluetoothd[5784]: Starting SDP server
bluetoothd[5784]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0517
bluetoothd[5784]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[5784]: src/plugin.c:add_plugin() Loading hostname plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading wiimote plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading autopair plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading policy plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading neard plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading sap plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading a2dp plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading avrcp plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading hog plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading health plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading gatt plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading scanparam plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading deviceinfo plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading alert plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading time plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading proximity plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading thermometer plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading heartrate plugin
bluetoothd[5784]: src/plugin.c:add_plugin() Loading cyclingspeed plugin
bluetoothd[5784]: src/plugin.c:plugin_init() Loading plugins /usr/lib/arm-linux-gnueabihf/bluetooth/plugins
bluetoothd[5784]: src/plugin.c:add_plugin() Loading sixaxis plugin
bluetoothd[5784]: profiles/health/hdp.c:hdp_manager_start() Starting Health manager
bluetoothd[5784]: profiles/input/suspend-dummy.c:suspend_init() 
bluetoothd[5784]: profiles/input/suspend-dummy.c:suspend_init() Created suspend-dummy FIFO on /run/hogsuspend
bluetoothd[5784]: profiles/network/manager.c:read_config() /etc/bluetooth/network.conf: Key file does not have key 'DisableSecurity'
bluetoothd[5784]: profiles/network/manager.c:read_config() Config options: Security=true
bluetoothd[5784]: plugins/neard.c:neard_init() Setup neard plugin
bluetoothd[5784]: plugins/sixaxis.c:sixaxis_init() 
bluetoothd[5784]: src/main.c:main() Entering main loop
bluetoothd[5784]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 2 op 0 soft 1 hard 0
bluetoothd[5784]: Bluetooth management interface 1.9 initialized
bluetoothd[5784]: src/adapter.c:read_version_complete() sending read supported commands command
bluetoothd[5784]: src/adapter.c:read_version_complete() sending read index list command
bluetoothd[5784]: src/adapter.c:read_commands_complete() Number of commands: 61
bluetoothd[5784]: src/adapter.c:read_commands_complete() Number of events: 34
bluetoothd[5784]: src/adapter.c:read_commands_complete() enabling kernel-side connection control
bluetoothd[5784]: src/adapter.c:read_index_list_complete() Number of controllers: 1
bluetoothd[5784]: src/adapter.c:read_index_list_complete() Found index 0
bluetoothd[5784]: src/adapter.c:index_added() index 0
bluetoothd[5784]: src/adapter.c:btd_adapter_new() System name: BlueZ 5.23
bluetoothd[5784]: src/adapter.c:btd_adapter_new() Major class: 0
bluetoothd[5784]: src/adapter.c:btd_adapter_new() Minor class: 0
bluetoothd[5784]: src/adapter.c:btd_adapter_new() Modalias: usb:v1D6Bp0246d0517
bluetoothd[5784]: src/adapter.c:btd_adapter_new() Discoverable timeout: 180 seconds
bluetoothd[5784]: src/adapter.c:btd_adapter_new() Pairable timeout: 0 seconds
bluetoothd[5784]: src/adapter.c:index_added() sending read info command for index 0
bluetoothd[5784]: src/adapter.c:read_info_complete() index 0 status 0x00
bluetoothd[5784]: src/adapter.c:clear_uuids() sending clear uuids command for index 0
bluetoothd[5784]: src/adapter.c:clear_devices() sending clear devices command for index 0
bluetoothd[5784]: src/attrib-server.c:btd_adapter_gatt_server_start() Start GATT server in hci0
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0001
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0004
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0006
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0007
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0008
bluetoothd[5784]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001800-0000-1000-8000-00805f9
bluetoothd[5784]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[5784]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0010
bluetoothd[5784]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001801-0000-1000-8000-00805f9
bluetoothd[5784]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[5784]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[5784]: profiles/audio/a2dp.c:media_server_probe() path /org/bluez/hci0
bluetoothd[5784]: plugins/hostname.c:hostname_probe() 
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0009, UUID 1803, 3 attributes
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0009
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x000a
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x000a
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x000b
bluetoothd[5784]: profiles/proximity/linkloss.c:link_loss_register() Link Loss service added
bluetoothd[5784]: profiles/proximity/reporter.c:register_tx_power() start_handle=0x000c
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x000c
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x000d
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x000e
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x000f
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0011, UUID 1802, 3 attributes
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0011
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0012
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0012
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0013
bluetoothd[5784]: profiles/proximity/immalert.c:imm_alert_register() Immediate Alert service added
bluetoothd[5784]: profiles/proximity/reporter.c:reporter_adapter_probe() Proximity Reporter for adapter 0x55181000
bluetoothd[5784]: profiles/time/server.c:time_server_init() path /org/bluez/hci0
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0014, UUID 1805, 6 attributes
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0014
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0015
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0015
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0016
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0017
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0018
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0018
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0019
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x001a, UUID 1806, 5 attributes
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x001a
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x001b
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x001b
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x001c
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x001d
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x001d
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x001e
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x001f, UUID 180e, 9 attributes
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x001f
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0020
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0020
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0021
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0022
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0023
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0023
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0024
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0025
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0025
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0026
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0027
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0028, UUID 1811, 13 attributes
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0028
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0029
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0029
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x002a
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x002b
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x002b
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x002c
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x002d
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x002e
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x002e
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x002f
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0030
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0030
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0031
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0032
bluetoothd[5784]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0033
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0033
bluetoothd[5784]: src/attrib-server.c:attrib_db_add_new() handle=0x0034
bluetoothd[5784]: profiles/network/manager.c:panu_server_probe() path /org/bluez/hci0
bluetoothd[5784]: profiles/network/server.c:server_register() Registered interface org.bluez.NetworkServer1 on path /org/bluez/hci0
bluetoothd[5784]: profiles/network/manager.c:gn_server_probe() path /org/bluez/hci0
bluetoothd[5784]: profiles/network/manager.c:nap_server_probe() path /org/bluez/hci0
bluetoothd[5784]: profiles/audio/avrcp.c:avrcp_controller_server_probe() path /org/bluez/hci0
bluetoothd[5784]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10003
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110f-0000-1000-8000-00805f9
bluetoothd[5784]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[5784]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[5784]: profiles/audio/avrcp.c:avrcp_target_server_probe() path /org/bluez/hci0
bluetoothd[5784]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10004
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
bluetoothd[5784]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[5784]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[5784]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[5784]: profiles/audio/a2dp.c:a2dp_sink_server_probe() path /org/bluez/hci0
bluetoothd[5784]: profiles/audio/a2dp.c:a2dp_source_server_probe() path /org/bluez/hci0
bluetoothd[5784]: profiles/sap/manager.c:sap_server_probe() path /org/bluez/hci0
bluetoothd[5784]: Sap driver initialization failed.
bluetoothd[5784]: sap-server: Operation not permitted (1)
bluetoothd[5784]: src/adapter.c:btd_adapter_unblock_address() hci0 00:00:00:00:00:00
bluetoothd[5784]: src/adapter.c:load_link_keys() hci0 keys 0 debug_keys 0
bluetoothd[5784]: src/adapter.c:load_ltks() hci0 keys 0
bluetoothd[5784]: src/adapter.c:load_irks() hci0 irks 0
bluetoothd[5784]: src/adapter.c:load_conn_params() hci0 conn params 0
bluetoothd[5784]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[5784]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[5784]: src/adapter.c:set_did() hci0 source 2 vendor 1d6b product 246 version 517
bluetoothd[5784]: src/adapter.c:adapter_register() Adapter /org/bluez/hci0 registered
bluetoothd[5784]: src/adapter.c:set_dev_class() sending set device class command for index 0
bluetoothd[5784]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[5784]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0
bluetoothd[5784]: src/adapter.c:load_ltks_complete() LTKs loaded for hci0
bluetoothd[5784]: src/adapter.c:load_irks_complete() IRKs loaded for hci0
bluetoothd[5784]: src/adapter.c:load_conn_params_complete() Connection Parameters loaded for hci0
bluetoothd[5784]: src/adapter.c:local_name_changed_callback() Name: BlueZ 5.23
bluetoothd[5784]: src/adapter.c:local_name_changed_callback() Short name: 
bluetoothd[5784]: src/adapter.c:local_name_changed_callback() Current alias: BlueZ 5.23
bluetoothd[5784]: src/attrib-server.c:attrib_db_update() handle=0x0006
bluetoothd[5784]: plugins/hostname.c:property_changed() static hostname: pi
bluetoothd[5784]: plugins/hostname.c:property_changed() pretty hostname: 
bluetoothd[5784]: plugins/hostname.c:update_name() name: pi
bluetoothd[5784]: src/adapter.c:adapter_set_name() name: pi
bluetoothd[5784]: src/adapter.c:adapter_set_name() alias: pi
bluetoothd[5784]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[5784]: plugins/hostname.c:property_changed() chassis: 
bluetoothd[5784]: src/adapter.c:local_name_changed_callback() Name: pi
bluetoothd[5784]: src/adapter.c:local_name_changed_callback() Short name: 
bluetoothd[5784]: src/adapter.c:local_name_changed_callback() Current alias: pi
bluetoothd[5784]: src/attrib-server.c:attrib_db_update() handle=0x0006
Any kinds of help are appreciated. Thanks a lot!

-xinkai

User avatar
Douglas6
Posts: 5221
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: bluetoothd sap driver issue

Sun Feb 21, 2016 4:34 pm

I'm afraid I have no experience with Bluetooth game controllers, so I don't know anything about the sixaxis stuff. My guess is that it's not currently working with Raspbian Jessie. Your hciconfig shows that your Bluetooth adapter is 'DOWN', and you won't get very far that way. What happens if you try to bring it up manually with

Code: Select all

sudo hciconfig hci0 up
and then

Code: Select all

hciconfig - a
again?

fourdee4d
Posts: 362
Joined: Mon Sep 17, 2012 10:31 pm
Location: East Midlands, UK

Re: bluetoothd sap driver issue

Thu Mar 03, 2016 5:57 pm

Code: Select all

root@DietPi:~# systemctl status bluetooth -l
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: active (running) since Thu 2016-03-03 17:51:42 GMT; 2min 2s ago
     Docs: man:bluetoothd(8)
 Main PID: 624 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─624 /usr/lib/bluetooth/bluetoothd

Mar 03 17:51:42 DietPi bluetoothd[624]: Bluetooth daemon 5.23
Mar 03 17:51:42 DietPi systemd[1]: Started Bluetooth service.
Mar 03 17:51:42 DietPi bluetoothd[624]: Starting SDP server
Mar 03 17:51:42 DietPi bluetoothd[624]: Bluetooth management interface 1.9 initi                                          alized
Mar 03 17:51:42 DietPi bluetoothd[624]: Sap driver initialization failed.
Mar 03 17:51:42 DietPi bluetoothd[624]: sap-server: Operation not permitted (1)
root@DietPi:~# systemctl status bluetooth -l
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: active (running) since Thu 2016-03-03 17:51:42 GMT; 2min 5s ago
     Docs: man:bluetoothd(8)
 Main PID: 624 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─624 /usr/lib/bluetooth/bluetoothd

Mar 03 17:51:42 DietPi bluetoothd[624]: Bluetooth daemon 5.23
Mar 03 17:51:42 DietPi systemd[1]: Started Bluetooth service.
Mar 03 17:51:42 DietPi bluetoothd[624]: Starting SDP server
Mar 03 17:51:42 DietPi bluetoothd[624]: Bluetooth management interface 1.9 initi
Mar 03 17:51:42 DietPi bluetoothd[624]: Sap driver initialization failed.
Mar 03 17:51:42 DietPi bluetoothd[624]: sap-server: Operation not permitted (1)
Not sure whats going on with the service as it is running. Seems to work fine with bluetoothctl:

Code: Select all

root@DietPi:~# bluetoothctl
[NEW] Controller B8:27:EB:24:F9:F1 DietPi [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:24:F9:F1 Discovering: yes
[NEW] Device D0:4F:7E:2C:B5:EF D0-4F-7E-2C-B5-EF
[NEW] Device A4:77:33:B5:B9:8D A4-77-33-B5-B9-8D
[NEW] Device FC:3D:93:58:D2:69 Wileyfox Swift
[bluetooth]#

Code: Select all

[bluetooth]# pair FC:3D:93:58:D2:69
Attempting to pair with FC:3D:93:58:D2:69
[CHG] Device FC:3D:93:58:D2:69 Connected: yes
DietPi.com - Lightweight justice for your Raspberry Pi. Optimized, simplified linux for everyone
DietPi's web hosting is powered by MyVirtualServer.com

jdcharlton
Posts: 3
Joined: Thu Mar 17, 2016 2:22 pm

Re: bluetoothd sap driver issue

Thu Mar 17, 2016 3:00 pm

I get similar results with the systemctl status bluetooth -l command as follows:
# systemctl status bluetooth -l
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Thu 2016-03-17 10:12:33 EDT; 7s ago
Docs: man:bluetoothd(8)
Main PID: 3222 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─3222 /usr/lib/bluetooth/bluetoothd

Mar 17 10:12:33 raspberrypi bluetoothd[3222]: Bluetooth daemon 5.23
Mar 17 10:12:33 raspberrypi systemd[1]: Started Bluetooth service.
Mar 17 10:12:33 raspberrypi bluetoothd[3222]: Starting SDP server
Mar 17 10:12:33 raspberrypi bluetoothd[3222]: Bluetooth management interface 1.9 initialized
Mar 17 10:12:33 raspberrypi bluetoothd[3222]: Sap driver initialization failed.
Mar 17 10:12:33 raspberrypi bluetoothd[3222]: sap-server: Operation not permitted (1)
# bluetoothctl
[NEW] Controller 00:15:83:E5:11:60 raspberrypi [default]

Using the bluetoothctl command I can see the device I am looking for and connect to it. But when I use the hciconfig/hcitool commands I get the following and no bluetooth devices are found:
root@raspberrypi:/etc/bluetooth# hciconfig hci0 up
root@raspberrypi:/etc/bluetooth# hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:E5:11:60 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING INQUIRY
RX bytes:36370 acl:18 sco:0 events:2256 errors:0
TX bytes:14006 acl:17 sco:0 commands:1340 errors:3
Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'raspberrypi'
Class: 0x000300
Service Classes: Unspecified
Device Class: LAN Access, Uncategorized
HCI Version: 4.0 (0x6) Revision: 0x22bb
LMP Version: 4.0 (0x6) Subversion: 0x22bb
Manufacturer: Cambridge Silicon Radio (10)

root@raspberrypi:/etc/bluetooth# hcitool scan
Scanning ...
root@raspberrypi:/etc/bluetooth#

Also the /etc/bluetooth/hcid.conf is ignored but /etc/bluetooth/main.conf is read and used by bluetoothd. I get similar results with no devices found when I use the c function:
num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags);

no error occurs but num_rsp is zero. So the bluetoothd daemon seems to work even though the sap-server error occurs but the hciconfig and hcitool and c bluez library don't recognize the same bluetooth devices as the bluetoothctl is able to connect to. I am working on a bluetooth sensor and need to communicate with it in c so any pointers are welcome.

User avatar
Douglas6
Posts: 5221
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: bluetoothd sap driver issue

Thu Mar 17, 2016 11:59 pm

What type of device are you trying to scan? It's not a BLE device by any chance?

jdcharlton
Posts: 3
Joined: Thu Mar 17, 2016 2:22 pm

Re: bluetoothd sap driver issue

Fri Mar 18, 2016 12:11 pm

Yes it is a BLE Device and I did try:
hcitool lescan
which did work. Is there an equivalent c function call for BLE or flag settings for:
num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags);

I am new to the ble api so will do some more testing and reading. The SAP error doesn't seem to be a problem but I would like to get rid of that since I have no need for sap-server.

User avatar
Douglas6
Posts: 5221
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: bluetoothd sap driver issue

Fri Mar 18, 2016 2:21 pm

Yes, BLE is a whole different animal. Bluetoothctl will scan and connect to both BLE and classic devices, but communicating is completely different. You'll need to study up on GATT services, and find a C library that will do BLE connections and GATT.

I believe there is a bluetoothd flag to disable SAP, but the harmless message doesn't bother me.

User avatar
Douglas6
Posts: 5221
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: bluetoothd sap driver issue

Fri Mar 18, 2016 8:30 pm

Douglas6 wrote:I believe there is a bluetoothd flag to disable SAP, but the harmless message doesn't bother me.
You might try adding this flag to the ExecStart= line in bluetooth.service: '--noplugin=sap'
Last edited by Douglas6 on Fri Mar 18, 2016 11:52 pm, edited 1 time in total.

jdcharlton
Posts: 3
Joined: Thu Mar 17, 2016 2:22 pm

Re: bluetoothd sap driver issue

Fri Mar 18, 2016 9:09 pm

Thank you. That worked I added the line to bluetooth.service:

ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap

and no more sap-server error:
root@raspberrypi:/etc/default# systemctl daemon-reload
root@raspberrypi:/etc/default# systemctl start bluetooth
root@raspberrypi:/etc/default# systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Fri 2016-03-18 17:04:23 EDT; 6s ago
Docs: man:bluetoothd(8)
Main PID: 5872 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─5872 /usr/lib/bluetooth/bluetoothd --noplugin=sap

Mar 18 17:04:23 raspberrypi bluetoothd[5872]: Bluetooth daemon 5.23
Mar 18 17:04:23 raspberrypi bluetoothd[5872]: Starting SDP server
Mar 18 17:04:23 raspberrypi bluetoothd[5872]: Excluding (cli) sap
Mar 18 17:04:23 raspberrypi bluetoothd[5872]: Bluetooth management interface...d
Mar 18 17:04:23 raspberrypi systemd[1]: Started Bluetooth service.
Hint: Some lines were ellipsized, use -l to show in full.

User avatar
Douglas6
Posts: 5221
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: bluetoothd sap driver issue

Fri Mar 18, 2016 11:48 pm

Yeah, 'ExecStart='. My bad.

flowerdog
Posts: 3
Joined: Wed Jun 08, 2016 8:14 pm

Re: bluetoothd sap driver issue

Fri Jun 10, 2016 5:55 pm

this is all expected behaviour, when using ps3 controllers using sixad stops the bluetooth service

look here: https://github.com/RetroPie/RetroPie-Setup/issues/1181

Return to “Troubleshooting”