HID 开发

藍牙HID

(1)Bluetooth HID devices支持:

          Input(从发数据给主), Output(主发数据给从),  Feature(双向传输)。

(2)HID建立Control Channel和Interrupt Channel两个通道,

        report可以在这两条channel上传输,

                在Control channel上传输的report称为synchronous reports   同步                                                    在Interrupt channel上传输的report称为asynchronous reports   异步

(3)Feature 同步传输经常会使用  GET_REPORT或者SET_REPORT requests。

(4)Mode 模型分为:

        Report Protocol Mode(报告模型)和Boot Protocol Mode(启动模型)。

        主设备至少支持一种,从设备则需要支持Report Protocol   Mode,并且Report Protocol Mode是Bluetooth HID Device的默认Mode。 

(5)消息的⼤⼩不能超过L2CAP蓝⽛逻辑链路控制和适配协议的MTU
(6)BLE HID服务UUID为0x1812(标准规范),数据存放在报告中,通过下⾯的各个特征 characteristic 来收发 HID 的报告数据。


 

2.1 notify介绍
  如果设备主动给手机发信息,则可以通过notification的方式,这种方式不用手机去轮询地读设备上的数据。notify的应用场景就是数据的实时上传。

2.2 notify实现
  实现notify需要的api函数是gatt_notification,使用方法
 

                // send notification
                lastNoti.handle = pRpt->handle;
                lastNoti.len = len;
                osal_memcpy(lastNoti.value, pData, len);
                GATT_Notification( gapConnHandle, &lastNoti, FALSE );

"feff": "GN Netcom",
    "fefe": "GN ReSound A/S",
    "fefd": "Gimbal, Inc.",
    "fefc": "Gimbal, Inc.",
    "fefb": "Stollmann E+V GmbH",
    "fefa": "PayPal, Inc.",
    "fef9": "PayPal, Inc.",
    "fef8": "Aplix Corporation",
    "fef7": "Aplix Corporation",
    "fef6": "Wicentric, Inc.",
    "fef5": "Dialog Semiconductor GmbH",
    "fef4": "Google",
    "fef3": "Google",
    "fef2": "CSR",
    "fef1": "CSR",
    "fef0": "Intel",
    "feef": "Polar Electro Oy",
    "feee": "Polar Electro Oy",
    "feed": "Tile, Inc.",
    "feec": "Tile, Inc.",
    "feeb": "Swirl Networks, Inc.",
    "feea": "Swirl Networks, Inc.",
    "fee9": "Quintic Corp.",
    "fee8": "Quintic Corp.",
    "fee7": "Tencent Holdings Limited",
    "fee6": "Seed Labs, Inc.",
    "fee5": "Nordic Semiconductor ASA",
    "fee4": "Nordic Semiconductor ASA",
    "fee3": "Anki, Inc.",
    "fee2": "Anki, Inc.",
    "fee1": "Anhui Huami Information Technology Co.",
    "fee0": "Anhui Huami Information Technology Co.",
    "fedf": "Design SHIFT",
    "fede": "Coin, Inc.",
    "fedd": "Jawbone",
    "fedc": "Jawbone",
    "fedb": "Perka, Inc.",
    "feda": "ISSC Technologies Corporation",
    "fed9": "Pebble Technology Corporation",
    "fed8": "Google",
    "fed7": "Broadcom Corporation",
    "fed6": "Broadcom Corporation",
    "fed5": "Plantronics Inc.",
    "fed4": "Apple, Inc.",
    "fed3": "Apple, Inc.",
    "fed2": "Apple, Inc.",
    "fed1": "Apple, Inc.",
    "fed0": "Apple, Inc.",
    "fecf": "Apple, Inc.",
    "fece": "Apple, Inc.",
    "fecd": "Apple, Inc.",
    "fecc": "Apple, Inc.",
    "fecb": "Apple, Inc.",
    "feca": "Apple, Inc.",
    "fec9": "Apple, Inc.",
    "fec8": "Apple, Inc.",
    "fec7": "Apple, Inc.",
    "fec6": "Kocomojo, LLC",
    "fec5": "Realtek Semiconductor Corp.",
    "fec4": "PLUS Location Systems",
    "fec3": "360fly, Inc.",
    "fec2": "Blue Spark Technologies, Inc.",
    "fec1": "KDDI Corporation",
    "fec0": "KDDI Corporation",
    "febf": "Nod, Inc.",
    "febe": "Bose Corporation",
    "febd": "Clover Network, Inc.",
    "febc": "Dexcom, Inc.",
    "febb": "adafruit industries",
    "feba": "Tencent Holdings Limited",
    "feb9": "LG Electronics",
    "feb8": "Facebook, Inc.",
    "feb7": "Facebook, Inc.",
    "feb6": "Vencer Co, Ltd",
    "feb5": "WiSilica Inc.",
    "feb4": "WiSilica Inc.",
    "feb3": "Taobao",
    "feb2": "Microsoft Corporation",
    "feb1": "Electronics Tomorrow Limited",
    "feb0": "Nest Labs Inc.",
    "feaf": "Nest Labs Inc.",
    "feae": "Nokia Corporation",
    "fead": "Nokia Corporation",
    "feac": "Nokia Corporation",
    "feab": "Nokia Corporation",
    "feaa": "Google",
    "fea9": "Savant Systems LLC",
    "fea8": "Savant Systems LLC",
    "fea7": "UTC Fire and Security",
    "fea6": "GoPro, Inc.",
    "fea5": "GoPro, Inc.",
    "fea4": "Paxton Access Ltd",
    "fea3": "ITT Industries",
    "fea2": "Intrepid Control Systems, Inc.",
    "fea1": "Intrepid Control Systems, Inc.",
    "fea0": "Google",
    "fe9f": "Google",
    "fe9e": "Dialog Semiconductor B.V.",
    "fe9d": "Mobiquity Networks Inc",
    "fe9c": "GSI Laboratories, Inc.",
    "fe9b": "Samsara Networks, Inc",
    "fe9a": "Estimote",
    "fe99": "Currant, Inc.",
    "fe98": "Currant, Inc.",
    "fe97": "Tesla Motor Inc.",
    "fe96": "Tesla Motor Inc.",
    "fe95": "Xiaomi Inc.",
    "fe94": "OttoQ Inc.",
    "fe93": "OttoQ Inc.",
    "fe92": "Jarden Safety & Security",
    "fe91": "Shanghai Imilab Technology Co.,Ltd",
    "fe90": "JUMA",
    "fe8f": "CSR",
    "fe8e": "ARM Ltd",
    "fe8d": "Interaxon Inc.",
    "fe8c": "TRON Forum",
    "fe8b": "Apple, Inc.",
    "fe8a": "Apple, Inc.",
    "fe89": "B&O Play A/S",
    "fe88": "SALTO SYSTEMS S.L.",
    "fe87": "Qingdao Yeelink Information Technology Co., Ltd. ",
    "fe86": "HUAWEI Technologies Co., Ltd. ",
    "fe85": "RF Digital Corp",
    "fe84": "RF Digital Corp",
    "fe83": "Blue Bite",
    "fe82": "Medtronic Inc.",
    "fe81": "Medtronic Inc.",
    "fe80": "Doppler Lab",
    "fe7f": "Doppler Lab",
    "fe7e": "Awear Solutions Ltd",
    "fe7d": "Aterica Health Inc.",
    "fe7c": "Stollmann E+V GmbH",
    "fe7b": "Orion Labs, Inc.",
    "fffe": "Alliance for Wireless Power (A4WP)",
    "fffd": "Fast IDentity Online Alliance (FIDO)"

USB HID 设备类协议入门-百合电子工作室

如何成为一个HID设备(模拟键盘) - 莫回头 - 博客园

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值