这种蓝牙配置是否足够?

时间:2016-10-25 04:29:13

标签: linux bluetooth yocto bluez openembedded

我有一个用于Gumstix Overo Y COM的Yocto / Open Embedded Linux版本,我正在尝试将蓝牙集成到(使用Bluez4)。

当我启动图像时,板载蓝牙模块(wilink 8)没有响应。下面概述的配置是否足够?如果没有,缺少什么?

内核,linux-firmware和bluez4配方附加来自meta-gumstix repo [fido]分支(https://github.com/gumstix/meta-gumstix) - 我所做的一个改变是系统使用sysvinit而不是systemd。

  • 3.18内核包含所有补丁和defconfig:

    元gumstix /食谱内核/ LINUX / linux-gumstix_3.18.bb

    meta-gumstix / recipes-kernel / linux / linux-gumstix-3.18 /

  • 固件追加配方:

    元gumstix /食谱内核/ Linux的firmware_git.append

    meta-gumstix / recipes-kernel / linux-firmware / linux-firmware /

  • Bluez4食谱追加:

    元gumstix /配方的连通/的bluez / bluez4_4.101.bbappend

    meta-gumstix / recipes-connectivity / bluez / files /

当我启动时,这是hcitool可以告诉我的全部内容:

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.

如果我开始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

然后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:~# 

(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

我希望bluez能够列出适配器,例如/ org / bluez / 1309 / hci0。由于hcitool或bluez似乎都无法找到我的蓝牙模块,我是否在设置/配置中遗漏了一些内容?

我非常乐意对此进行编辑,以包含您可能认为有用的任何额外信息。

谢谢!

使用进一步信息编辑:

@ parthiban-n - 启动适配器不起作用

root@overo:~# hciconfig hci0 up
Can't get device info: No such device

&安培;我不知道适配器在哪里(我认为这是根本问题 - bluez似乎对硬件一无所知,也没有适配器)。这是我可以自己配置的东西,还是bluez会自动识别模块? 在降级到bluez4之前我最初使用bluez5具有相同的结果(我不愿改变回来,因为切换bluez版本是一个完整的删除缓存和重建,大约6小时!)。我想像hciconfig& hcitool无法与BT模块通信问题不太可能与bluez,AFAIK hci ****不使用bluez进行操作。

@aksonlyaks - 该模块不是USB连接,它是板载组合WIFI / BT模块--Willink8 WL1831MOD似乎使用WIFI&组合驱动器。 BT。 WIFI工作正常,所以我认为从驾驶员方面来说这是可以的。这是/ proc / modules&的一些输出。 dmesg对我来说很好看,但是我发布了它以防有任何明显缺失:

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

我认为wl18xx& wlcore是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.

看起来驱动程序出现了,然后有一些与wlan相关的消息,没有什么特定于我能看到的蓝牙操作或初始化。

0 个答案:

没有答案