首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > Wireless >

bulez移栽 hcid进程起不来

2012-12-30 
bulez移植 hcid进程起不来最近移植BULEZ 碰到问题我已经开启了1079 messageb2212 Sdbus-daemon --system

bulez移植 hcid进程起不来
最近移植BULEZ 碰到问题
我已经开启了1079 messageb  2212 S    dbus-daemon --system 
但是运行hcid -n 仍然显示为:
hcid[1089]: Bluetooth HCI daemon
hcid[1089]: Unable to get on D-Bus



hcid.conf内容为
# HCI daemon configuration file.
#

# HCId options
options {
        # Automatically initialize new devices
        autoinit yes;

        # Security Manager mode
        #   none - Security manager disabled
        #   auto  - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        security user;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # Default PIN code for incoming connections
        passkey "123";
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "BlueZ (%d)";

        # Local device class
        class 0x000100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy 
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy


        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park;
}

我在dbus system.d目录下 bleuetooth.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"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
  </policy>

  <policy at_console="true">
    <allow send_path="/"/>
    <allow send_path="/org/bluez"/>

    <allow send_destination="org.bluez.Manager"/>
    <allow receive_sender="org.bluez.Manager"/>

    <allow send_destination="org.bluez.Adapter"/>
    <allow receive_sender="org.bluez.Adapter"/>

    <allow send_destination="org.bluez.Device"/>
    <allow receive_sender="org.bluez.Device"/>

    <allow send_destination="org.bluez.Service"/>
    <allow receive_sender="org.bluez.Service"/>

    <allow send_destination="org.bluez.Database"/>
    <allow receive_sender="org.bluez.Database"/>

    <allow send_destination="org.bluez.Security"/>
    <allow receive_sender="org.bluez.Security"/>
  </policy>

</busconfig>
[解决办法]
我跟你碰到了类似的问题,正常情况下我不用hcid -f /etc/bluetooth/hcid.conf命令,直接
运行hcid -d -n能正常启动hcid进程,但是就是没法配对,从外部用手机来配对的时候竟然输入hcid.conf配置文件里面的密码不正确
提示
hcid[994]: pin_code_request (sba=00:02:5B:00:A5:A5, dba=5C:57:C8:CA:6B:52)
hcid[994]: call_passkey_agent(): no agent available

但是如果在运行hcid -d -n之前使用了hcid -f /etc/bluetooth/hcid.conf就会出现和你一样的
hcid[1089]: Unable to get on D-Bus
[解决办法]
我用3.36版的也不行啊,我想直接在hcid文件夹里面的security.c里把自己的PIN码写进去,这个可能可以。但是我没有做,我就换成用2.25的就可以配对啦。

热点排行