如何设置bluez的模式? [英] How to set bluez mode?

查看:938
本文介绍了如何设置bluez的模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些<一个href=\"http://stackoverflow.com/questions/16151360/use-bluez-stack-as-a-peripheral-advertiser\">threads对于如何申请的bluez为iBeacon显示或BLE外设。

There are some threads for how to apply bluez as ibeacon or BLE peripheral.

但是当我使用 BLE扫描仪 (Android上的一个BLE中央应用程序),它揭示bluz外设作为双模式。

But when I use ble scanner (a BLE central application on Android), that reveal the bluz peripheral as dual mode.

我应该怎么做的bluez禁用经典模式?

How should I do to disable the classic mode in bluez?

推荐答案

既然你指的是线程,你可能使用hcitool来设置广告数据和选项。

Since you are referring to that thread, you probably use hcitool to set the advertisement data and options.

您需要设置BR / EDR支持的标志更改为标志字段0那2位(见第三部分的蓝牙核心Spezification,第12页的增刊)。

You need to set change the Flag for BR/EDR support to 0. Thats Bit 2 of the Flags field (See Part A Supplement of the Bluetooth Core Spezification, p.12).

所以原来0x1A的变化和Ox16:

So the original 0x1A changes to 0x16:

修改

sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00

sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 16 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00

运行的 btmon 的另一个外壳在执行命令可以让你看到什么事情完全是。

Running btmon on another shell while executing the commands allows you to observe whats going on exactly.

这篇关于如何设置bluez的模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆