I have a Yocto/Open Embedded Linux build for a Gumstix Overo Y COM which I am trying to integrate bluetooth into (using Bluez4).
When I boot my image, the onboard bluetooth module (wilink 8) is unresponsive. Is the configuration I outline below sufficient? If not, what is missing?
The kernel, linux-firmware and bluez4 recipe append are from the meta-gumstix repo [fido] branch (https://github.com/gumstix/meta-gumstix) - one change I have made is the system uses sysvinit instead of systemd.
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/
Firmware append recipe:
meta-gumstix/recipes-kernel/linux-firmware_git.append
meta-gumstix/recipes-kernel/linux-firmware/linux-firmware/
Bluez4 recipe append:
meta-gumstix/recipes-connectivity/bluez/bluez4_4.101.bbappend
meta-gumstix/recipes-connectivity/bluez/files/
When I boot, this is all hcitool can tell me:
hcitool dev:
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.
If I start Bluez:
root@overo:~# dmesg | grep -i bluetooth
root@overo:~# bluetoothd -d
root@overo:~# rfcomm bind all
root@overo:~# dmesg | grep -i bluetooth
[ 62.131408] Bluetooth: Core ver 2.19
[ 62.131622] Bluetooth: HCI device and connection manager initialized
[ 62.132080] Bluetooth: HCI socket layer initialized
[ 62.132141] Bluetooth: L2CAP socket layer initialized
[ 62.132263] Bluetooth: SCO socket layer initialized
[ 62.190826] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 62.190856] Bluetooth: BNEP filters: protocol multicast
[ 62.190917] Bluetooth: BNEP socket layer initialized
[ 71.641448] Bluetooth: RFCOMM TTY layer initialized
[ 71.641540] Bluetooth: RFCOMM socket layer initialized
[ 71.641601] Bluetooth: RFCOMM ver 1.11
Then dbus tells me:
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:~#
(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
I would expect bluez to list an adapter such as /org/bluez/1309/hci0. As neither hcitool or bluez seem to be able to locate my bluetooth module, am I missing something in the setup / configuration?
I'm more than happy to edit this to include any extra information that you might find useful.
Thanks!
Edited with further info:
@parthiban-n - Bringing the adapter up doesn't work
root@overo:~# hciconfig hci0 up
Can't get device info: No such device
& I don't know where the adapter sits (I think this is the root problem - bluez doesn't seem to know anything about the hardware and doesn't have an adapter for it). Is this something that I can configure myself, or should bluez automatically recognise the module? I used bluez5 initially with the same results, before downgrading to bluez4 (I'm loath to change back as switching bluez version is a complete delete-cache & rebuild, around 6 hours!). I imagine that as hciconfig & hcitool can't communicate with the BT module the problem was unlikely to be with bluez, AFAIK hci**** don't use bluez for their operation.
@aksonlyaks - The module is not USB connected, it's an onboard combined WIFI/BT module - the Wilink8 WL1831MOD which seems to use a combined driver for WIFI & BT. The WIFI works fine, so I think it's OK from the driver side of things. Here's some output from /proc/modules & dmesg which looks good to me, but I've posted it up in case there is anything obviously missing:
root@overo:~# cat /proc/modules
rfcomm 34100 0 - Live 0xbf2d3000
bnep 10602 2 - Live 0xbf2cc000
bluetooth 300191 8 rfcomm,bnep, Live 0xbf270000
ipv6 367991 16 [permanent], Live 0xbf1ff000
ctr 3441 2 - Live 0xbf1fb000
ccm 7252 2 - Live 0xbf1f6000
ft6206 3532 0 - Live 0xbf1f2000 (O)
arc4 1688 2 - Live 0xbf1ee000
wl18xx 81650 0 - Live 0xbf1d1000
wlcore 177003 1 wl18xx, Live 0xbf198000
mac80211 478003 2 wl18xx,wlcore, Live 0xbf0fb000
cfg80211 408851 3 wl18xx,wlcore,mac80211, Live 0xbf06a000
rfkill 19564 4 bluetooth,cfg80211, Live 0xbf060000
wlcore_sdio 3947 0 - Live 0xbf058000
twl4030_madc 9173 0 - Live 0xbf052000
industrialio 27152 1 twl4030_madc, Live 0xbf045000
fpgaDrv352 13275 2 - Live 0xbf03e000 (O)
usb_f_ecm 8379 1 - Live 0xbf037000
pwm 6671 0 - Live 0xbf031000 (O)
fpgaCfgDrv 5623 0 - Live 0xbf02c000 (O)
g_ether 3375 0 - Live 0xbf027000
usb_f_rndis 21372 2 g_ether, Live 0xbf01c000
u_ether 14284 3 usb_f_ecm,g_ether,usb_f_rndis, Live 0xbf014000
libcomposite 46775 3 usb_f_ecm,g_ether,usb_f_rndis, Live 0xbf000000
I think wl18xx & wlcore are the main driver components for the WL1831MOD.
root@overo:~# dmesg | grep -i wl
[ 2.430389] twl 0-0048: PIH (irq 23) chaining IRQs 339..347
[ 2.430999] twl 0-0048: power (irq 344) chaining IRQs 347..354
[ 2.437225] twl_rtc 48070000.i2c:twl@48:rtc: Power up reset detected.
[ 2.437805] twl_rtc 48070000.i2c:twl@48:rtc: Enabling TWL-RTC
[ 2.442840] twl_rtc 48070000.i2c:twl@48:rtc: rtc core: registered 48070000.i2c:twl@48 as rtc0
[ 2.511505] twl4030_gpio twl4030-gpio: gpio (irq 339) chaining IRQs 355..372
[ 2.513275] gpiochip_add: registered GPIOs 492 to 511 on device: twl4030
[ 2.524597] twl4030_usb 48070000.i2c:twl@48:twl4030-usb: Initialized TWL4030 USB module
[ 2.531158] input: twl4030_pwrbutton as /devices/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:pwrbutton/input/input0
[ 2.534881] twl4030_keypad 48070000.i2c:twl@48:keypad: OF: linux,keymap property not defined in /ocp/i2c@48070000/twl@48/keypad
[ 2.547119] twl4030_keypad 48070000.i2c:twl@48:keypad: Failed to build keymap
[ 2.554748] twl4030_keypad: probe of 48070000.i2c:twl@48:keypad failed with error -2
[ 2.760864] twl_rtc 48070000.i2c:twl@48:rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[ 8.107849] twl4030_madc 48070000.i2c:twl@48:madc: clk disabled, enabling
[ 11.101715] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[ 11.224395] wlcore: loaded
[ 19.257476] wlcore: PHY firmware version: Rev 8.2.0.0.195
[ 19.375305] wlcore: firmware booted (Rev 8.8.0.0.13)
[ 23.282714] wlan0: authenticate with 30:b5:c2:66:4c:04
[ 23.306152] wlan0: send auth to 30:b5:c2:66:4c:04 (try 1/3)
[ 23.327819] wlan0: authenticated
[ 23.338958] wlan0: associate with 30:b5:c2:66:4c:04 (try 1/3)
[ 23.345367] wlan0: RX AssocResp from 30:b5:c2:66:4c:04 (capab=0x431 status=0 aid=5)
[ 23.390258] wlan0: associated[ 23.624877] wlcore: Association completed.
It looks like the driver comes up and then there are some wlan related messages, nothing specific to bluetooth operation or intialisation that I can see.