[oe] Bluetooth agent can't get default adapter

Ankur Tyagi ankur.tyagi85 at gmail.com
Thu Dec 17 22:40:49 UTC 2015


Hi,

I am trying to use WL1835 bluetooth with AM335x EVM. Software is meta-arago
daisy.

When I run bluetooth agent, I get error  "Can't get default adapter"

Following is the sequence of commands:

root at am335x-evm:~# bluetoothd

root at am335x-evm:~# hciconfig hci0 up

[  944.008593] (stc):  chnl_id list empty :4
[  944.012749] (stk) : st_kim_start(stk) :ldisc_install = 1uim:poll broke
due to event 10(PRI:2/ERR:8)

uim:read 1 from install

uim:@ st_uart_config
uim: signal received, opening /dev/ttyS1
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done
[  944.180311] (stc): st_tty_open
uim:Speed changing to 3000000, 1
uim:@ set_custom_baud_rate
(stk) :line discipline installeduim:Installed N_TI_WL Line displine
[  944.194437] (stk) :TIInit_11.8.32.bts
uim:begin polling...
(stk) :change remote baud rate command in firmware
[  944.214516] (stk) :skipping the wait event of change remote baud[
 944.928331] (stc): add_channel_to_table: id 4
[  944.932771] (stc): add_channel_to_table: id 2
[  944.937149] (stc): add_channel_to_table: id 3

root at am335x-evm:~# hcitool scan
Scanning ...
        00:02:72:E3:0F:7F       RS232 Dongle Slave

root at am335x-evm:~# agent hci0 00:02:72:E3:0F:7F
Can't get default adapter
No such adapter

root at am335x-evm:~# dmesg | grep Bluetooth
[    3.475348] Bluetooth: Core ver 2.18
[    3.483613] Bluetooth: HCI device and connection manager initialized
[    3.663793] Bluetooth: HCI socket layer initialized
[    3.668731] Bluetooth: L2CAP socket layer initialized
[    3.814838] Bluetooth: SCO socket layer initialized
[   16.667945] Bluetooth: st_register failed -22

dbus is running and service file is also present

root at am335x-evm:~# cat /usr/share/dbus-1/system-services/org.bluez.service
[D-BUS Service]
Name=org.bluez
Exec=/bin/false
User=root
SystemdService=dbus-org.bluez.service

root at am335x-evm:~# cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration
1.0//EN"
 "<a href="http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
www.freedesktop.org/.../busconfig.dtd"></a>
<busconfig>
  <!-- ../system.conf have denied everything, so we just punch some holes
-->
  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>
    <allow send_interface="org.bluez.PasskeyAgent"/>
  </policy>

  <policy context="default">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>
  </policy>

</busconfig>


When I run bluetoothd, I can see org.bluez in dbus list

root at am335x-evm:~# dbus-send --system --dest=org.freedesktop.DBus
--type=method_call --print-reply /org/freedesktop/DBus
org.freedesktop.DBus.ListNames
method return sender=org.freedesktop.DBus -> dest=:1.4 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.4"
      string ":1.0"
      string "org.bluez"
   ]

But when I query default adapter, I don't get a response

root at am335x-evm:~# dbus-send --system --print-reply --dest=org.bluez /
org.bluez.Manager.ListAdapters
method return sender=:1.0 -> dest=:1.5 reply_serial=2
   array [
   ]

What's missing to get it working ? Any help is appreciated

Thanks
Ankur



More information about the Openembedded-devel mailing list