LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   BlueZ-4.101 RFCOMM issue and missing daemons (https://www.linuxquestions.org/questions/linux-software-2/bluez-4-101-rfcomm-issue-and-missing-daemons-4175574633/)

austinr1028 03-11-2016 03:04 PM

BlueZ-4.101 RFCOMM issue and missing daemons
 
I'm setting up BlueZ-4.101 to run on my 3.3 linux kernel. I've run into a few issues with development involving pairing with another device.

The first issue is RFCOMM. I'm trying to use the command
Code:

# rfcomm connect 0
Can't connect RFCOMM socket: Operation now in progress

to pair with a target bluetooth device. I can use hcitool inq and see the device, but am unable to connect using rfcomm.

After further inspection, I see that /dev/rfcomm0 (or any rfcomm node) does not exist after using the command
Code:

# rfcomm bind all
. I've looked through various threads and am unsure why this is.

This investigation led to me seeing that I am missing some bluetooth scripts that should possibly be running. I'm not quite sure if I should or should not have these scripts based on my kernel/bluez version. For example, the only daemon that I have is bluetoothd which I start on boot. I do not have any of the following scripts even installed:
  • bluetooth-agent
  • bluez-simple-agent
  • /etc/bluetooth/hcid.conf (not a script - but still missing)

To me, this feels like I have something possibly configured incorrectly in the kernel/filesystem. However, I've checked and made sure that I have full support for Bluetooth, including:

Kernel:
  • BT_RFCOMM_TTY
  • BT_RFCOMM
  • BT
  • BT_BNEP_PROTO_FILTER
  • BT_BNEP_MC_FILTER
  • BT_BNEP

Filesystem:
  • BR2_PACKAGE_BLUEZ_UTILS
  • BR2_PACKAGE_BLUEZ_UTILS_COMPAT

I've tried to solve this for days and could use a little guidance. If more information is needed let me know.

Relevant information:

/etc/bluetooth/rfcomm.conf:
Code:

#
# RFCOMM configuration file.
#

rfcomm0 {
        bind yes;
        device 30:21:XX:XX:XX:XX;
        channel 1;
        comment "speaker";
}

Configuration
Code:

# hciconfig -a:
hci0:  Type: BR/EDR  Bus: UART
        BD Address: C8:3E:99:XX:XX:XX  ACL MTU: 1021:4  SCO MTU: 180:4
        UP RUNNING
        RX bytes:485 acl:0 sco:0 events:21 errors:0
        TX bytes:111 acl:0 sco:0 commands:21 errors:0
        Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x001f00
        Service Classes: Unspecified
        Device Class: Invalid Device Class!
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0x235d
        Manufacturer: Texas Instruments Inc. (13)


austinr1028 03-11-2016 03:11 PM

Regarding the missing /etc/bluetooth/hcid.conf file, I see now that this thread addresses that. The other issues still persist however.

austinr1028 03-14-2016 03:05 PM

Updating with another log file, as I'm still having trouble but have more information.

Some things that I've noticed but am not sure what to think of:
  • /etc/bluetooth/input.conf - Does not exist, this seems ok to me as I don't have any defined inputs (other bt devices)
  • Failed to open RFKILL control device - This seems troubling, but selecting CONFIG_BT in kernel also selects RFKILL so I'm a bit confused
  • /etc/bluetooth/serial.conf 0 Does not exist. Unsure if this is important, searching online didn't reveal much
  • Unable to load keys to adapter_ops - Unsure why default keys need to be loaded, seems to be a misunderstanding on my end
  • I keep seeing dba as 00:00:00:00:00:00 throughout the log, this seems wrong to me, assuming dba = device bluetooth address

Code:

#bluetoothd -d -n
bluetoothd[742]: Bluetooth daemon 4.101
bluetoothd[742]: src/main.c:parse_config() parsing main.conf
bluetoothd[742]: src/main.c:parse_config() discovto=0
bluetoothd[742]: src/main.c:parse_config() pairto=0
bluetoothd[742]: src/main.c:parse_config() pageto=8192
bluetoothd[742]: src/main.c:parse_config() auto_to=60
bluetoothd[742]: src/main.c:parse_config() name=%h-%d
bluetoothd[742]: src/main.c:parse_config() class=0x000100
bluetoothd[742]: src/main.c:parse_config() Key file does not have key 'DeviceID'
bluetoothd[742]: Starting SDP server
bluetoothd[742]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[742]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading serial plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading service plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading hciops plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading mgmtops plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading formfactor plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading storage plugin
bluetoothd[742]: src/plugin.c:add_plugin() Loading adaptername plugin
bluetoothd[742]: src/plugin.c:plugin_init() Loading plugins /usr/lib/bluetooth/plugins
bluetoothd[742]: plugins/service.c:register_interface() path /org/bluez/742/any
bluetoothd[742]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/742/any
bluetoothd[742]: network/manager.c:read_config() Config options: Security=true
bluetoothd[742]: Parsing /etc/bluetooth/input.conf failed: No such file or directory
bluetoothd[742]: plugins/hciops.c:hciops_init()
bluetoothd[742]: plugins/hciops.c:hciops_setup()
bluetoothd[742]: Failed to open RFKILL control device
bluetoothd[742]: src/main.c:main() Entering main loop
bluetoothd[742]: plugins/hciops.c:init_known_adapters()
bluetoothd[742]: plugins/hciops.c:init_device() hci0
bluetoothd[742]: Listening for HCI events on hci0
bluetoothd[742]: plugins/hciops.c:init_conn_list() hci0
bluetoothd[742]: HCI dev 0 up
bluetoothd[742]: plugins/hciops.c:device_devup_setup() hci0
bluetoothd[742]: plugins/hciops.c:read_local_version_complete() Got version for hci0
bluetoothd[742]: src/adapter.c:btd_adapter_ref() 0xb6f4cf00: ref=1
bluetoothd[742]: plugins/hciops.c:hciops_read_bdaddr() hci0
bluetoothd[742]: src/sdpd-database.c:sdp_init_services_list()
bluetoothd[742]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[742]: plugins/hciops.c:update_service_classes() hci0 value 0
bluetoothd[742]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[742]: plugins/hciops.c:update_service_classes() hci0 value 0
bluetoothd[742]: plugins/service.c:register_interface() path /org/bluez/742/hci0
bluetoothd[742]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/742/hci0
bluetoothd[742]: network/manager.c:network_server_probe() path /org/bluez/742/hci0
bluetoothd[742]: src/adapter.c:btd_adapter_ref() 0xb6f4cf00: ref=2
bluetoothd[742]: network/server.c:server_register() Registered interface org.bluez.NetworkServer on path /org/bluez/742/hci0
bluetoothd[742]: serial/manager.c:proxy_probe() path /org/bluez/742/hci0
bluetoothd[742]: src/adapter.c:btd_adapter_ref() 0xb6f4cf00: ref=3
bluetoothd[742]: serial/proxy.c:proxy_register() Registered interface org.bluez.SerialProxyManager on path /org/bluez/742/hci0
bluetoothd[742]: Parsing /etc/bluetooth/serial.conf failed: No such file or directory
bluetoothd[742]: src/adapter.c:btd_adapter_ref() 0xb6f4cf00: ref=4
bluetoothd[742]: plugins/adaptername.c:adaptername_probe() Setting name '(none)-0' for device 'hci0'
bluetoothd[742]: plugins/hciops.c:hciops_set_name() hci0, name (none)-0
bluetoothd[742]: plugins/hciops.c:update_ext_inquiry_response() hci0
bluetoothd[742]: Could not get the contents of DMI chassis type
bluetoothd[742]: plugins/hciops.c:hciops_unblock_device() hci0 dba 00:00:00:00:00:00
bluetoothd[742]: plugins/hciops.c:hciops_load_keys() hci0 keys 0 debug_keys 0
bluetoothd[742]: Unable to load keys to adapter_ops: Function not implemented (38)
bluetoothd[742]: plugins/hciops.c:hciops_get_conn_list() hci0
bluetoothd[742]: src/manager.c:btd_manager_register_adapter() Adapter /org/bluez/742/hci0 registered
bluetoothd[742]: src/adapter.c:btd_adapter_ref() 0xb6f4cf00: ref=5
bluetoothd[742]: plugins/hciops.c:hciops_set_dev_class() hci0 major 1 minor 0
bluetoothd[742]: plugins/hciops.c:hciops_disable_cod_cache() hci0 cache_enable 1
bluetoothd[742]: plugins/hciops.c:hciops_disable_cod_cache() hci0 current_cod 0x000000 wanted_cod 0x000100
bluetoothd[742]: plugins/hciops.c:write_class() hci0 class 0x000100
bluetoothd[742]: Adapter /org/bluez/742/hci0 has been enabled
bluetoothd[742]: plugins/hciops.c:hciops_set_discoverable() hci0 discoverable 0
bluetoothd[742]: plugins/hciops.c:hciops_set_pairable() hci0 pairable 1
bluetoothd[742]: plugins/hciops.c:hciops_stop_inquiry() hci0
bluetoothd[742]: src/adapter.c:btd_adapter_unref() 0xb6f4cf00: ref=4
bluetoothd[742]: plugins/hciops.c:read_local_ext_features_complete() hci0 status 0
bluetoothd[742]: plugins/hciops.c:read_tx_power_complete() hci0 status 0
bluetoothd[742]: plugins/hciops.c:update_ext_inquiry_response() hci0
bluetoothd[742]: plugins/hciops.c:update_ext_inquiry_response() hci0
bluetoothd[742]: plugins/hciops.c:read_local_name_complete() hci0 status 0
bluetoothd[742]: plugins/hciops.c:update_ext_inquiry_response() hci0
bluetoothd[742]: plugins/hciops.c:read_simple_pairing_mode_complete() hci0 status 0
bluetoothd[742]: plugins/hciops.c:update_ext_inquiry_response() hci0
bluetoothd[742]: plugins/hciops.c:read_scan_complete() hci0 status 0
bluetoothd[742]: plugins/hciops.c:hciops_set_limited_discoverable() hci0 limited 0
bluetoothd[742]: src/adapter.c:adapter_mode_changed() old 0x00 new 0x02
bluetoothd[742]: src/adapter.c:set_mode_complete()


praneetkaur 12-19-2017 06:46 AM

Audio support with bluez4.101
 
Hi,
I would like to know if you were able to get anything working on bluez4.101 since I am also exploring bluez4.101. I am particularly looking into audio streaming capabilities using bluez4.101.

--
Praneet

austinr1028 12-19-2017 06:56 AM

I ended up doing a whole OS upgrade and using BlueZ 5.46 and kernel 4.12.0. Things are generally working well with that setup.


All times are GMT -5. The time now is 04:03 AM.