【问题标题】:Bluetooth interface control in C code ( Linux OS )C代码中的蓝牙接口控制(Linux OS)
【发布时间】:2016-08-28 15:50:45
【问题描述】:

一般我可以通过命令控制界面

 hciconfig hcix up/down 

我可以使用 c 代码来做到这一点吗?

有示例代码可以参考吗?

谢谢

【问题讨论】:

    标签: bluetooth bluez


    【解决方案1】:

    您可以将 c 代码用于 hciconfig 本身。只需下载BlueZ source 并打开 tools/hciconfig.c 并使用以下功能:-

    static void cmd_up(int ctl, int hdev, char *opt)
    {
        ...
    }
    

    static void cmd_down(int ctl, int hdev, char *opt) 
    {
        ... 
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-13
      • 2010-12-08
      • 1970-01-01
      • 2013-01-27
      相关资源
      最近更新 更多