简体   繁体   English

从蓝牙远程快门检测事件以控制Python中的音频记录

[英]Detecting events from a bluetooth remote shutter to control audio recording in Python

I need to use a bluetooth remote shutter as the ones that come with many selfie sticks in order to make a push-to-talk button for starting and stopping audio recordings in Python. 我需要使用蓝牙遥控快门作为许多自拍杆附带的快门,以便创建一键通按钮以开始和停止Python中的音频录制。 I have tried using pyBluez module (vs 0.21), but the most I have got is to detect the device and its address, but I cannot see which are its services, or how to create a client-server connection with it. 我尝试使用pyBluez模块(vs 0.21),但是我得到的最多是检测设备及其地址,但是我看不到它是哪个服务,或者如何用它创建客户端-服务器连接。 Checking the bluetooth connector status, I can see that it detects the device as "i Shutter" and its type as keyboard. 检查蓝牙连接器的状态,可以看到它检测到设备为“ i Shutter”,其类型为键盘。 The device is already paired. 设备已配对。 In case, it is relevant I'm using Ubuntu 14.04 and Python 2.7. 万一有关系,我正在使用Ubuntu 14.04和Python 2.7。

Most of the selfie sticks use HID profile (confirmed as "type keyboard"), and send a Volume Up button press (keyboard report or consumer report). 大多数自拍杆使用HID配置文件(确认为“类型键盘”),并发送“调高音量”按钮(键盘报告或消费者报告)。 You will need to listen for this key, and not RFCOMM data. 您将需要侦听此密钥,而不是RFCOMM数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM