-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.json
1 lines (1 loc) · 8.25 KB
/
content.json
1
[{"title":"Linux 下连接蓝牙设备","date":"2020-04-12T08:14:48.000Z","path":"posts/1977779135/","text":"使用蓝牙过程 启动蓝牙; 扫描可用的蓝牙设备; 连接蓝牙设备(经过测试,在使用蓝牙鼠标不需要连接,扫描后直接与之配对即可); 配对蓝牙设备。 蓝牙管理工具:bluetoothctl此处以连接蓝牙鼠标为例说明: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117$ sudo -i# 启动蓝牙管理工具# bluetoothctl[NEW] Controller 4C:34:88:94:D7:C4 yinkai-ThinkPad-X250 [default][NEW] Device D0:16:B4:4D:47:9D Yinkai-Honor10[bluetooth]# helpAvailable commands: list List available controllers show [ctrl] Controller information select <ctrl> Select default controller devices List available devices paired-devices List paired devices power <on/off> Set controller power pairable <on/off> Set controller pairable mode discoverable <on/off> Set controller discoverable mode agent <on/off/capability> Enable/disable agent with given capability default-agent Set agent as the default one set-scan-filter-uuids [uuid1 uuid2 ...] Set scan filter uuids set-scan-filter-rssi [rssi] Set scan filter rssi, and clears pathloss set-scan-filter-pathloss [pathloss] Set scan filter pathloss, and clears rssi set-scan-filter-transport [transport] Set scan filter transport set-scan-filter-clear Clears discovery filter. scan <on/off> Scan for devices info [dev] Device information pair [dev] Pair with device trust [dev] Trust device untrust [dev] Untrust device block [dev] Block device unblock [dev] Unblock device remove <dev> Remove device connect <dev> Connect device disconnect [dev] Disconnect device list-attributes [dev] List attributes select-attribute <attribute> Select attribute attribute-info [attribute] Select attribute read Read attribute value write <data=[xx xx ...]> Write attribute value notify <on/off> Notify attribute value register-profile <UUID ...> Register profile to connect unregister-profile Unregister profile version Display version quit Quit program[bluetooth]# showController 4C:34:88:94:D7:C4 Name: yinkai-ThinkPad-X250 Alias: yinkai-ThinkPad-X250 Class: 0x000000 Powered: yes Discoverable: yes Pairable: yes UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb) UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) UUID: OBEX File Transfer (00001106-0000-1000-8000-00805f9b34fb) UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) UUID: OBEX Object Push (00001105-0000-1000-8000-00805f9b34fb) UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) UUID: IrMC Sync (00001104-0000-1000-8000-00805f9b34fb) UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb) UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) UUID: Vendor specific (00005005-0000-1000-8000-0002ee000001) UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb) UUID: Phonebook Access Server (0000112f-0000-1000-8000-00805f9b34fb) UUID: Message Access Server (00001132-0000-1000-8000-00805f9b34fb) Modalias: usb:v1D6Bp0246d0525 Discovering: no# 查看可用的蓝牙设备[bluetooth]# devices Device D0:16:B4:4D:47:9D Yinkai-Honor10# 重启蓝牙设备[bluetooth]# power off Changing power off succeeded[CHG] Controller 4C:34:88:94:D7:C4 Powered: no[CHG] Controller 4C:34:88:94:D7:C4 Discovering: no[bluetooth]# power onChanging power on succeeded[CHG] Controller 4C:34:88:94:D7:C4 Powered: yes# 扫描可用的蓝牙设备[bluetooth]# scan onDiscovery started[CHG] Controller 4C:34:88:94:D7:C4 Discovering: yes[NEW] Device CF:D0:F4:9B:8D:F7 M720 Triathlon[NEW] Device 22:22:58:10:EB:91 M8S PRO L[NEW] Device C8:28:32:0D:AB:5E MI BT18 BLE[CHG] Device CF:D0:F4:9B:8D:F7 RSSI: -59[CHG] Device CF:D0:F4:9B:8D:F7 RSSI: -48# 停止扫描[bluetooth]# scan off[CHG] Device C8:28:32:0D:AB:5E RSSI is nil[CHG] Device 22:22:58:10:EB:91 RSSI is nil[CHG] Device CF:D0:F4:9B:8D:F7 RSSI is nilDiscovery stopped# 再次查看可用的蓝牙设备[bluetooth]# devices Device D0:16:B4:4D:47:9D Yinkai-Honor10Device CF:D0:F4:9B:8D:F7 M720 TriathlonDevice 22:22:58:10:EB:91 M8S PRO LDevice C8:28:32:0D:AB:5E MI BT18 BLE# 配对蓝牙设备(设备地址)[bluetooth]# pair CF:D0:F4:9B:8D:F7Attempting to pair with CF:D0:F4:9B:8D:F7[CHG] Device CF:D0:F4:9B:8D:F7 Connected: yes[CHG] Device CF:D0:F4:9B:8D:F7 Paired: yesPairing successful[CHG] Device CF:D0:F4:9B:8D:F7 Modalias: usb:v046DpB015d0009[DEL] Device 22:22:58:10:EB:91 M8S PRO L[DEL] Device C8:28:32:0D:AB:5E MI BT18 BLE[M720 Triathlon]# exit","tags":[{"name":"bluetoothctl","slug":"bluetoothctl","permalink":"https://yinkai0619.github.io/tags/bluetoothctl/"},{"name":"蓝牙","slug":"蓝牙","permalink":"https://yinkai0619.github.io/tags/%E8%93%9D%E7%89%99/"}]},{"title":"Markdown语法介绍","date":"2020-04-12T08:09:26.000Z","path":"posts/2392901311/","text":"一、标题这是一级标题这是二级标题这是三级标题这是四级标题这是五级标题这是六级标题二、字体这是加粗的文字这是倾斜的文字`这是斜体加粗的文字这是加删除线的文字 三、分割线 四、引用 这是引用的内容 这是引用的内容 这是引用的内容 五、图片六、代码单行代码多行代码1print('Hello World') 语法说明插入程序代码的方式有两种:使用反引号 `(~ 键)、使用缩进(Tab)。 插入行内代码,即插入一个单词或者一句代码的情况,使用 code 这样的形式插入。 插入多行代码,分别使用三个反引号(```)包裹多行代码。或者使用缩进。 行内代码在一般的段落文字中,可以使用反引号来标记或插入代码区段。示例:C语言里的函数 scanf() 怎么使用? create database DATABASE_NAME; 多行代码在需要高亮的代码块的前一行及后一行使用三个反引号 ```(~ 键),同时第一行反引号后面,输入码块所使用的语言,实现代码高亮。比如高亮 python3 代码块: 1234 #!/usr/bin/env python3class PrintHello: print(\"Hello, World!\"); 缩进式插入多行代码注意: 缩进式插入前方必须有空行; 缩进 4 个空格或是 1 个制表符; 一个代码区块会一直持续到没有缩进的那一行(或是文件结尾)。代码: 12345#include <stdio.h>`int main(void)`{ printf(\"Hello world\\n\");} 七、超链接八、表格九、列表:无序列表语法:无序列表用 - + * 任何一种都可以 列表内容 列表内容 列表内容 注意:- + * 跟内容之间都要有一个空格 有序列表语法: 数字加点 列表内容 列表内容 列表内容 注意:序号跟内容之间要有空格 列表嵌套上一级和下一级之间敲三个空格即可: 一级无序列表内容 二级无序列表内容 三级无序列表内容 十、流程图","tags":[{"name":"Markdown","slug":"Markdown","permalink":"https://yinkai0619.github.io/tags/Markdown/"}]},{"title":"Hello Hexo","date":"2020-04-11T09:36:45.000Z","path":"posts/2708806665/","text":"Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new \"My New Post\" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment","tags":[{"name":"Hexo","slug":"Hexo","permalink":"https://yinkai0619.github.io/tags/Hexo/"}]},{"title":"Web Service","date":"2016-05-14T09:09:49.000Z","path":"posts/895680827/","text":"","tags":[{"name":"Linux","slug":"Linux","permalink":"https://yinkai0619.github.io/tags/Linux/"},{"name":"Socket","slug":"Socket","permalink":"https://yinkai0619.github.io/tags/Socket/"},{"name":"Web","slug":"Web","permalink":"https://yinkai0619.github.io/tags/Web/"},{"name":"URI","slug":"URI","permalink":"https://yinkai0619.github.io/tags/URI/"},{"name":"URL","slug":"URL","permalink":"https://yinkai0619.github.io/tags/URL/"}]}]