title: Is this bluetooth configuration sufficient?
body: <p>I have a Yocto/Open Embedded Linux build for a Gumstix Overo Y COM which I am trying to integrate bluetooth into (using Bluez4).</p>
  
  <p>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?</p>
  
  <p>The kernel, linux-firmware and bluez4 recipe append are from the meta-gumstix repo [fido] branch (<a href="https://github.com/gumstix/meta-gumstix" rel="nofollow">https://github.com/gumstix/meta-gumstix</a>) - one change I have made is the system uses sysvinit instead of systemd.</p>
  
  <ul>
  <li><p>3.18 kernel with all patches and the defconfig:</p>
  
  <p>meta-gumstix/recipes-kernel/linux/linux-gumstix_3.18.bb</p>
  
  <p>meta-gumstix/recipes-kernel/linux/linux-gumstix-3.18/ </p></li>
  <li><p>Firmware append recipe:</p>
  
  <p>meta-gumstix/recipes-kernel/linux-firmware_git.append</p>
  
  <p>meta-gumstix/recipes-kernel/linux-firmware/linux-firmware/ </p></li>
  <li><p>Bluez4 recipe append: </p>
  
  <p>meta-gumstix/recipes-connectivity/bluez/bluez4_4.101.bbappend</p>
  
  <p>meta-gumstix/recipes-connectivity/bluez/files/ </p></li>
  </ul>
  
  <p>When I boot, this is all hcitool can tell me:</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>If I start Bluez:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Then dbus tells me:</p>
  
  <pre><code>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 -&gt; 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
  </code></pre>
  
  <p>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?</p>
  
  <p>I'm more than happy to edit this to include any extra information that you might find useful.</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>Edited with further info:</p>
  
  <p>@parthiban-n - 
  Bringing the adapter up doesn't work </p>
  
  <pre><code>root@overo:~# hciconfig hci0 up
  Can't get device info: No such device
  </code></pre>
  
  <p>&amp; 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 &amp; rebuild, around 6 hours!).  I imagine that as hciconfig &amp; 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.</p>
  
  <hr>
  
  <p>@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 &amp; BT.  The WIFI works fine, so I think it's OK from the driver side of things.  Here's some output from /proc/modules &amp; dmesg which looks good to me, but I've posted it up  in case there is anything obviously missing:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I think wl18xx &amp; wlcore are the main driver components for the WL1831MOD.</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>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.</p>