Chinaunix首页 | 论坛 | 博客
  • 博客访问: 438711
  • 博文数量: 78
  • 博客积分: 2030
  • 博客等级: 大尉
  • 技术积分: 1002
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-28 15:25
文章分类

全部博文(78)

文章存档

2012年(1)

2011年(1)

2010年(4)

2009年(12)

2008年(60)

我的朋友

分类: LINUX

2008-10-28 16:23:24

替代BlueZ里的blueZ-pin工具集,需要修改如下几个地方:
[1] /etc/bluetooth
     将pin中的BlueZ改为0000(便于手机输入)
     hcid.conf中 修改pin_helper这一行为
     pin_helper /home/hddnwpu/blueZ/bluepass;
     其中bluepass是自己写的一个程序
     #include

 int main(int argc, char* argv[])
{
        printf("PIN:0000");
        return 0;
}

[2] bluez-utils中hcid目录下的security.c
         if (read_default_pin_code() < 0) {
    874                 strcpy((char *) hcid.pin_code, "0000");
    875                 hcid.pin_len = 4;
    876         }
       hcid.h中38行改为自己的路径
        #define HCID_PIN_HELPER  "/home/hddnwpu/blueZ/bluepass"

要让/etc/bluetooth下的hcid.conf生效的话,要使用这个命令。
hcid -f /etc/bluetooth/hcid.conf

 

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