• 蓝牙调试工具hcitool的使用实例【转】


    本文转载自:http://blog.csdn.net/kangear/article/details/37961769

     这个工具据说是基于BlueZ的,但是Android4.2以后不再采用BlueZ取而代之的是BlueDroid,具体详见《Android 4.2蓝牙介绍-Android中的Bluetooth》。但是一般解决方案中都是两手准备,在正常使用的时候是BlueDroid,而在调试的硬件时候还可以方便的使用基于BlueZ的hcittool。BlueDroid不利于调试硬件,这是我在公元20140719时的观点。

    # hcitool                                                      

    hcitool - HCI Tool ver 4.93

    Usage:

            hcitool [options] <command> [command parameters]

    Options:

            --help  Display help

            -i dev  HCI device

    Commands:

            dev     Display local devices

            inq     Inquire remote devices

            scan    Scan for remote devices

            name    Get name from remote device 

            info    Get information from remote device

            spinq   Start periodic inquiry

            epinq   Exit periodic inquiry

            cmd     Submit arbitrary HCI commands

            con     Display active connections

            cc      Create connection to remote device

            dc      Disconnect from remote device

            sr      Switch master/slave role

            cpt     Change connection packet type

            rssi    Display connection RSSI

            lq      Display link quality

            tpl     Display transmit power level

            afh     Display AFH channel map

            lp      Set/display link policy settings

            lst     Set/display link supervision timeout

            auth    Request authentication

            enc     Set connection encryption

            key     Change connection link key

            clkoff  Read clock offset

            clock   Read local or remote clock

            lescan  Start LE scan

            lewladd Add device to LE White List

            lewlrm  Remove device from LE White List

            lewlsz  Read size of LE White List

            lewlclr Clear LE White list

            lecc    Create a LE Connection

            ledc    Disconnect a LE Connection

            lecup   LE Connection Update

    For more information on the usage of each command use:

            hcitool <command> --help


    功能:获取本设备接口和MAC地址

    功能:获取远程设备mac地址clock offset以及class.

    功能:扫描远程设备

    功能:获取指定MAC地址远程设备的名字

    功能:获取远程设备的详情

    功能:???

    功能:???

    功能:向蓝牙设备输入命令

    功能:查看当前连接信息

    功能:???

    功能:???

    功能:???

    功能:查看远程设备的信号增益(强度)

    功能:查看支持的POLICY

    功能:远程设备的xxx等级

    功能:xxxx

    功能:xxx

     
    2
  • 相关阅读:
    LeetCode: 18. 4Sum
    LeetCode:15. 3Sum
    Leetcode:1. Two Sum
    tensorflow placeholder
    Tensorflow变量
    13.git的简单使用
    13.Django1.11.6文档
    12.python进程协程异步IO
    12.Flask-Restful
    12.Django思维导图
  • 原文地址:https://www.cnblogs.com/zzb-Dream-90Time/p/7615940.html
Copyright © 2020-2023  润新知