Quantcast

Where on earth is my bluetooth adapter?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Where on earth is my bluetooth adapter?

enki
I am attempting to setup bluetooth on an Overo Firestorm Y COM and having difficulties.  Using an open embedded build based on this 3.18 kernel with all patches and the defconfig.

  meta-gumstix/recipes-kernel/linux/linux-gumstix_3.18.bb
  meta-gumstix/recipes-kernel/linux/linux-gumstix-3.18/  
  - but using sysvinit, not systemd.

When I run my image, both bluez & the various hci tools cannot seem to see the bluetooth module


parallels@ubuntu:~$ hcitool dev
Devices:
root@overo:~# hcitool scan
Device is not available: No such device
root@overo:~# /usr/sbin/hciattach -n ttyO1 texas
Initialization timed out.

root@overo:~# dbus-send --system --dest=org.bluez --print-reply /org/bluez/1514/hci0 org.bluez.Adapter.SetProperty string:Discoverable variant:boolean:true
Error org.freedesktop.DBus.Error.UnknownObject: Method "SetProperty" with signature "sv" on interface "org.bluez.Adapter" doesn't exist


- can anyone suggest what I am missing?  
(I'm pretty new to Gumstix/OE and very willing to learn - please let me know if there's anything I can post up here to help)


(It looks pretty similar to this issue: http://gumstix.8.x6.nabble.com/Help-with-bluetooth-and-Overo-Y-COMs-td4971016.html 
I'm using the same board, kernel, firmware & bluez version, but where that seems to be resolved by bringing up wlan0 that doesn't help in my case - the snippets I've posted are from me ssh-ing onto the board using the wifi...)


Here's what I've done:

================

I've built an image which (hopefully) includes everything needed to get bluez4 working with the Wilink 8 BT module by specifying the following:

image.bb:
FIRMWARE_INSTALL = " \
  linux-firmware-wl18xx \
  wpa-supplicant \
  iw \
  bluez4 \
"

MODULE_INSTALL= " \
  kernel-module-rfkill \
  kernel-module-rfkill-gpio \
  kernel-module-rfkill-regulator \
  kernel-module-mac80211 \
  kernel-module-cdc-acm \
  kernel-module-libertas-sdio \
  kernel-module-rfcomm \
  kernel-module-mwifiex \
  kernel-module-wlcore \
  kernel-module-wlcore-sdio \
  kernel-module-wl18xx \
  kernel-module-arc4 \
  kernel-module-gpio-backlight \
  kernel-module-backlight \
  kernel-module-industrialio \
  kernel-module-twl4030-madc \
  kernel-module-ipv6 \
  kernel-module-g-ether \
  kernel-module-libcomposite \
  kernel-module-u-ether \
  kernel-module-usb-f-rndis \
  kernel-module-usb-f-ecm \
  kernel-module-ctr \
  kernel-module-ccm \
  kernel-module-bluetooth \
  kernel-module-rfcomm \
  kernel-module-hci-vhci \
  kernel-module-bnep \
  kernel-module-hidp \
  kernel-module-hci-uart \
 "

PYTHON_INSTALL = " \
  python-dbus \


layer.conf:

# Include bluetooth support
DISTRO_FEATURES_append += " bluez4"
IMAGE_INSTALL_append += " bluez4"

================


Using dbus:

root@overo:~# 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.2 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.0"
      string "org.bluez"
      string ":1.1"
      string ":1.2"
   ]

(root@overo:~# cat introspect_bt.py
#!/usr/bin/env python

import dbus
from xml.etree import ElementTree

def rec_intro(bus, service, object_path):
    print(object_path)
    obj = bus.get_object(service, object_path)
    iface = dbus.Interface(obj, 'org.freedesktop.DBus.Introspectable')
    xml_string = iface.Introspect()
    for child in ElementTree.fromstring(xml_string):
        if child.tag == 'node':
            if object_path == '/':
                object_path = ''
            new_path = '/'.join((object_path, child.attrib['name']))
            rec_intro(bus, service, new_path)

bus = dbus.SystemBus()
rec_intro(bus, 'org.bluez', '/org/bluez')
root@overo:~#
)
root@overo:~# python introspect_bt.py
/org/bluez
/org/bluez/1309
/org/bluez/1309/any

root@overo:~# dbus-send --system --dest=org.bluez --print-reply /org/bluez/1514/hci0 org.bluez.Adapter.SetProperty string:Discoverable variant:boolean:true
Error org.freedesktop.DBus.Error.UnknownObject: Method "SetProperty" with signature "sv" on interface "org.bluez.Adapter" doesn't exist

=================
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where on earth is my bluetooth adapter?

arun
Hi,

A few suggestions:

- rfkill list should output something like this:
root@overo:~# rfkill list
0: phy0: wlan
        Soft blocked: no
        Hard blocked: no
1: hci0: bluetooth
        Soft blocked: no
        Hard blocked: no

- I am not very familiar with sysvinit but on systemd, you need a uart rules file before you do a hciattach:
root@overo:~# cat /etc/udev/rules.d/99-bluetooth-via-uart.rules
SUBSYSTEM!="net", GOTO="bluetooth_via_uart_rules_end"

ATTRS{device}=="0x4076", ATTRS{vendor}=="0x0097", DRIVERS=="wl1271_sdio", TAG+="systemd" ENV{SYSTEMD_WANTS}="bluetooth-ttyO1-wilink.service"

LABEL="bluetooth_via_uart_rules_end"

- Have you tried with a stock gumstix image? Please try this [1] to verify if your hardware is good. The stock image uses bluez5 and you can check bluetooth by doing something like this:
root@overo:~# bluetoothctl 
[NEW] Controller 78:A5:04:2D:BE:27 overo [default]
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 78:A5:04:2D:BE:27 Powered: yes

- You can try building your own yocto image for gumstix by following the instructions at [2] 

Let me know if you have any questions.


- Arun

On Mon, Nov 7, 2016 at 4:55 PM, enki [via Gumstix] <[hidden email]> wrote:
I am attempting to setup bluetooth on an Overo Firestorm Y COM and having difficulties.  Using an open embedded build based on this 3.18 kernel with all patches and the defconfig.

  meta-gumstix/recipes-kernel/linux/linux-gumstix_3.18.bb
  meta-gumstix/recipes-kernel/linux/linux-gumstix-3.18/  
  - but using sysvinit, not systemd.

When I run my image, both bluez & the various hci tools cannot seem to see the bluetooth module


parallels@ubuntu:~$ hcitool dev
Devices:
root@overo:~# hcitool scan
Device is not available: No such device
root@overo:~# /usr/sbin/hciattach -n ttyO1 texas
Initialization timed out.

root@overo:~# dbus-send --system --dest=org.bluez --print-reply /org/bluez/1514/hci0 org.bluez.Adapter.SetProperty string:Discoverable variant:boolean:true
Error org.freedesktop.DBus.Error.UnknownObject: Method "SetProperty" with signature "sv" on interface "org.bluez.Adapter" doesn't exist


- can anyone suggest what I am missing?  
(I'm pretty new to Gumstix/OE and very willing to learn - please let me know if there's anything I can post up here to help)


(It looks pretty similar to this issue: http://gumstix.8.x6.nabble.com/Help-with-bluetooth-and-Overo-Y-COMs-td4971016.html 
I'm using the same board, kernel, firmware & bluez version, but where that seems to be resolved by bringing up wlan0 that doesn't help in my case - the snippets I've posted are from me ssh-ing onto the board using the wifi...)


Here's what I've done:

================

I've built an image which (hopefully) includes everything needed to get bluez4 working with the Wilink 8 BT module by specifying the following:

image.bb:
FIRMWARE_INSTALL = " \
  linux-firmware-wl18xx \
  wpa-supplicant \
  iw \
  bluez4 \
"

MODULE_INSTALL= " \
  kernel-module-rfkill \
  kernel-module-rfkill-gpio \
  kernel-module-rfkill-regulator \
  kernel-module-mac80211 \
  kernel-module-cdc-acm \
  kernel-module-libertas-sdio \
  kernel-module-rfcomm \
  kernel-module-mwifiex \
  kernel-module-wlcore \
  kernel-module-wlcore-sdio \
  kernel-module-wl18xx \
  kernel-module-arc4 \
  kernel-module-gpio-backlight \
  kernel-module-backlight \
  kernel-module-industrialio \
  kernel-module-twl4030-madc \
  kernel-module-ipv6 \
  kernel-module-g-ether \
  kernel-module-libcomposite \
  kernel-module-u-ether \
  kernel-module-usb-f-rndis \
  kernel-module-usb-f-ecm \
  kernel-module-ctr \
  kernel-module-ccm \
  kernel-module-bluetooth \
  kernel-module-rfcomm \
  kernel-module-hci-vhci \
  kernel-module-bnep \
  kernel-module-hidp \
  kernel-module-hci-uart \
 "

PYTHON_INSTALL = " \
  python-dbus \


layer.conf:

# Include bluetooth support
DISTRO_FEATURES_append += " bluez4"
IMAGE_INSTALL_append += " bluez4"

================


Using dbus:

root@overo:~# 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.2 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.0"
      string "org.bluez"
      string ":1.1"
      string ":1.2"
   ]

(root@overo:~# cat introspect_bt.py
#!/usr/bin/env python

import dbus
from xml.etree import ElementTree

def rec_intro(bus, service, object_path):
    print(object_path)
    obj = bus.get_object(service, object_path)
    iface = dbus.Interface(obj, 'org.freedesktop.DBus.Introspectable')
    xml_string = iface.Introspect()
    for child in ElementTree.fromstring(xml_string):
        if child.tag == 'node':
            if object_path == '/':
                object_path = ''
            new_path = '/'.join((object_path, child.attrib['name']))
            rec_intro(bus, service, new_path)

bus = dbus.SystemBus()
rec_intro(bus, 'org.bluez', '/org/bluez')
root@overo:~#
)
root@overo:~# python introspect_bt.py
/org/bluez
/org/bluez/1309
/org/bluez/1309/any

root@overo:~# dbus-send --system --dest=org.bluez --print-reply /org/bluez/1514/hci0 org.bluez.Adapter.SetProperty string:Discoverable variant:boolean:true
Error org.freedesktop.DBus.Error.UnknownObject: Method "SetProperty" with signature "sv" on interface "org.bluez.Adapter" doesn't exist

=================


If you reply to this email, your message will be added to the discussion below:
http://gumstix.8.x6.nabble.com/Where-on-earth-is-my-bluetooth-adapter-tp4971147.html
To start a new topic under Gumstix, email [hidden email]
To unsubscribe from Gumstix, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where on earth is my bluetooth adapter?

enki
Thanks arun,

- rfkill list outputs:
root@overo:~# rfkill list
0: phy0: wlan
        Soft blocked: no
        Hard blocked: no

Only the Wifi adapter is listed, no bluetooth adapter


- I am not great with either sysvinit or systemd, but as I understand it that udev rule is just running the systemd service "bluetooth-ttyO1-wilink.service" , which in turn is just issuing:

/usr/sbin/hciattach -n ttyO1 texas

at  service start.  When I try the same from the command line, it times out:

Initialization timed out.

Presumably, as indicated earlier by rfkill, the system can’t find an adapter to associate with ttyO1.


- I have tried with a stock gumstix image and it works fine.  I am running this side by side with my image for reference.  Switching SD cards between boards confirms that the hardware on each board is good.


- The image I’m using is customised from that at https://github.com/gumstix/meta-gumstix , it’s already been in development for a while, so starting again from scratch to get the bluetooth working isn’t really an option.  



I have noticed that if I run lsmod, the reference Gumstix image (working bluetooth) lists the following:

bluetooth             300351  22 bnep,hci_uart,rfcomm

where my image (after starting bluetoothd & rfcomm) looks like this:

bluetooth 300191 8 rfcomm,bnep, Live 0xbf270000

mine has no hci_uart kernel module loaded, although it is in my image.bb file (as included in my original message).  Could this be an indication of which step I am missing in bringing up my bluetooth?

Thanks!


From: "arun [via Gumstix]" <[hidden email]>
Date: Tuesday, 8 November 2016 12:27 pm
To: Matthew Toner <[hidden email]>
Subject: Re: Where on earth is my bluetooth adapter?

Hi,

A few suggestions:

- rfkill list should output something like this:
root@overo:~# rfkill list
0: phy0: wlan
        Soft blocked: no
        Hard blocked: no
1: hci0: bluetooth
        Soft blocked: no
        Hard blocked: no

- I am not very familiar with sysvinit but on systemd, you need a uart rules file before you do a hciattach:
root@overo:~# cat /etc/udev/rules.d/99-bluetooth-via-uart.rules
SUBSYSTEM!="net", GOTO="bluetooth_via_uart_rules_end"

ATTRS{device}=="0x4076", ATTRS{vendor}=="0x0097", DRIVERS=="wl1271_sdio", TAG+="systemd" ENV{SYSTEMD_WANTS}="bluetooth-ttyO1-wilink.service"

LABEL="bluetooth_via_uart_rules_end"

- Have you tried with a stock gumstix image? Please try this [1] to verify if your hardware is good. The stock image uses bluez5 and you can check bluetooth by doing something like this:
root@overo:~# bluetoothctl 
[NEW] Controller 78:A5:04:2D:BE:27 overo [default]
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 78:A5:04:2D:BE:27 Powered: yes

- You can try building your own yocto image for gumstix by following the instructions at [2] 

Let me know if you have any questions.


- Arun

On Mon, Nov 7, 2016 at 4:55 PM, enki [via Gumstix] <[hidden email]> wrote:
I am attempting to setup bluetooth on an Overo Firestorm Y COM and having difficulties.  Using an open embedded build based on this 3.18 kernel with all patches and the defconfig.

  meta-gumstix/recipes-kernel/linux/linux-gumstix_3.18.bb
  meta-gumstix/recipes-kernel/linux/linux-gumstix-3.18/  
  - but using sysvinit, not systemd.

When I run my image, both bluez & the various hci tools cannot seem to see the bluetooth module


parallels@ubuntu:~$ hcitool dev
Devices:
root@overo:~# hcitool scan
Device is not available: No such device
root@overo:~# /usr/sbin/hciattach -n ttyO1 texas
Initialization timed out.

root@overo:~# dbus-send --system --dest=org.bluez --print-reply /org/bluez/1514/hci0 org.bluez.Adapter.SetProperty string:Discoverable variant:boolean:true
Error org.freedesktop.DBus.Error.UnknownObject: Method "SetProperty" with signature "sv" on interface "org.bluez.Adapter" doesn't exist


- can anyone suggest what I am missing?  
(I'm pretty new to Gumstix/OE and very willing to learn - please let me know if there's anything I can post up here to help)


(It looks pretty similar to this issue: http://gumstix.8.x6.nabble.com/Help-with-bluetooth-and-Overo-Y-COMs-td4971016.html 
I'm using the same board, kernel, firmware & bluez version, but where that seems to be resolved by bringing up wlan0 that doesn't help in my case - the snippets I've posted are from me ssh-ing onto the board using the wifi...)


Here's what I've done:

================

I've built an image which (hopefully) includes everything needed to get bluez4 working with the Wilink 8 BT module by specifying the following:

image.bb:
FIRMWARE_INSTALL = " \
  linux-firmware-wl18xx \
  wpa-supplicant \
  iw \
  bluez4 \
"

MODULE_INSTALL= " \
  kernel-module-rfkill \
  kernel-module-rfkill-gpio \
  kernel-module-rfkill-regulator \
  kernel-module-mac80211 \
  kernel-module-cdc-acm \
  kernel-module-libertas-sdio \
  kernel-module-rfcomm \
  kernel-module-mwifiex \
  kernel-module-wlcore \
  kernel-module-wlcore-sdio \
  kernel-module-wl18xx \
  kernel-module-arc4 \
  kernel-module-gpio-backlight \
  kernel-module-backlight \
  kernel-module-industrialio \
  kernel-module-twl4030-madc \
  kernel-module-ipv6 \
  kernel-module-g-ether \
  kernel-module-libcomposite \
  kernel-module-u-ether \
  kernel-module-usb-f-rndis \
  kernel-module-usb-f-ecm \
  kernel-module-ctr \
  kernel-module-ccm \
  kernel-module-bluetooth \
  kernel-module-rfcomm \
  kernel-module-hci-vhci \
  kernel-module-bnep \
  kernel-module-hidp \
  kernel-module-hci-uart \
 "

PYTHON_INSTALL = " \
  python-dbus \


layer.conf:

# Include bluetooth support
DISTRO_FEATURES_append += " bluez4"
IMAGE_INSTALL_append += " bluez4"

================


Using dbus:

root@overo:~# 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.2 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.0"
      string "org.bluez"
      string ":1.1"
      string ":1.2"
   ]

(root@overo:~# cat introspect_bt.py
#!/usr/bin/env python

import dbus
from xml.etree import ElementTree

def rec_intro(bus, service, object_path):
    print(object_path)
    obj = bus.get_object(service, object_path)
    iface = dbus.Interface(obj, 'org.freedesktop.DBus.Introspectable')
    xml_string = iface.Introspect()
    for child in ElementTree.fromstring(xml_string):
        if child.tag == 'node':
            if object_path == '/':
                object_path = ''
            new_path = '/'.join((object_path, child.attrib['name']))
            rec_intro(bus, service, new_path)

bus = dbus.SystemBus()
rec_intro(bus, 'org.bluez', '/org/bluez')
root@overo:~#
)
root@overo:~# python introspect_bt.py
/org/bluez
/org/bluez/1309
/org/bluez/1309/any

root@overo:~# dbus-send --system --dest=org.bluez --print-reply /org/bluez/1514/hci0 org.bluez.Adapter.SetProperty string:Discoverable variant:boolean:true
Error org.freedesktop.DBus.Error.UnknownObject: Method "SetProperty" with signature "sv" on interface "org.bluez.Adapter" doesn't exist

=================


If you reply to this email, your message will be added to the discussion below:
http://gumstix.8.x6.nabble.com/Where-on-earth-is-my-bluetooth-adapter-tp4971147.html
To start a new topic under Gumstix, email [hidden email]
To unsubscribe from Gumstix, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://gumstix.8.x6.nabble.com/Where-on-earth-is-my-bluetooth-adapter-tp4971147p4971148.html
To unsubscribe from Where on earth is my bluetooth adapter?, click here.
NAML
Loading...