Chinaunix首页 | 论坛 | 博客
  • 博客访问: 310856
  • 博文数量: 92
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 960
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-21 19:38
文章分类

全部博文(92)

文章存档

2010年(71)

2009年(21)

我的朋友

分类: 嵌入式

2010-05-19 17:06:37

Bluez移植_ 内核及根文件系统配置

USB蓝牙内核配置:

[*]   Networking support à

 <*>      Bluetooth subsystem support à

 <*>      L2CAP protocol supportà

<*>      SCO supportà

<*>      RFCOMM protocol supportà

<*>      RFCOMM TTY protocol supportà

<*>      BNEP protocol supportà

<*>      Multican filter supportà

<*>      Protocol filter supportà

<*>      HIDP protocol supportà

    Bluetooth device drivers à

              <*>HCI USB driver

 

根文件系统配置:

通过NFSbluez-utils-3.36生成的binsbin下载到开发板/usr/sbin中:

[root@TX2440A sbin]# cp -a /mnt/opt/libs/sbin/* .

[root@TX2440A sbin]# cp -a /mnt/opt/libs/bin/* .

 

通过NFSbluez-libs-3.36生成的lib下载到开发板/usr/lib中:

[root@TX2440A lib]# cp /mnt/opt/libs/lib/lib* .

 

/etc/init.d/目录下编写蓝牙脚本文件bluetooth

#!/bin/sh

# bluetooth    Bluetooth subsystem starting and stopping

# chkconfig: - 25 90

# description: Bluetooth subsystem

# Source function library.

#. /etc/rc.d/init.d/functions

# Source Bluetooth configuration.

#. /etc/sysconfig/bluetooth

 

prog="Bluetooth"

bluezbin="usr/sbin"

UART_CONF="/etc/bluetooth/uart"

USB_CONF="/etc/bluetooth/usb"

 

 

start()

{

        echo -n $"Starting $prog: "

        $bluezbin/hcid

 

       if [ -x $bluezbin/sdpd ]; then

              $bluezbin/sdpd

       fi

 

       if [ -x $bluezbin/hciconfig ]; then

              $bluezbin/hciconfig hci0 up

              echo "hciconfig up"

       fi

   

       if [ -x $bluezbin/hcitool ]; then

              $bluezbin/hcitool dev

       fi

 

        echo -n "start ok!"

}

 

stop()

{

        echo -n $"Shutting down $prog: "

       killproc hcid

 

       if [ -x $bluezbin/sdpd ]; then

              killproc sdpd

       fi

 

        echo

}

 

# See how we were called.

case "$1" in

  start)

       start

        ;;

  stop)

       stop

        ;;

  restart|reload)

       stop

       start

       ;;

  *)

        echo $"Usage: $0 {start|stop|restart|reload}"

        exit 1

esac

exit 0

 

 

阅读(1403) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~