Linux的蓝牙信号强度l2ping(无连接?) [英] Linux Bluetooth l2ping with signal strength (without connecting?)

查看:2227
本文介绍了Linux的蓝牙信号强度l2ping(无连接?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关在这里任何Linux的BlueZ / BT专家:

For any Linux BlueZ/BT experts here:

我正在寻找一种方式来平之称BT设备(即BDADDR),如果他们是在范围我想知道近似的信号强度。

I'm looking for a way to "ping" known BT devices (known BDADDR) and if they are in range I'd like to know the approximate signal strength.

我知道我可以先运行l2ping,然后建立与设备的连接,最后检查RSSI和链路质量,如果连接工作没有第一配对。

I know that I could first run l2ping, then establish a connection to the device and finally check the rssi or link quality if the connection worked without pairing first.

不过我要找的是获得的信号强度没有连接到该设备首先的一种方式。完美的将是从l2ping应答数据包的信号强度测量,但我不知道这是否是信息可在所有沿堆栈传递。

However what I'm looking for is a way of getting the signal strength without connecting to the device first. Perfect would be a signal strength measurement from the l2ping reply packet, but I don't know if that info is available at all and passed along the stack.

推荐答案

您可以查询扫描过程中获得的RSSI,无需连接到设备。下面是使用pybluez一个例子。您也可以直接在Linux上使用配合bluez c执行同样的事情。

You can obtain RSSI during inquiry scan, without connecting to devices. Here's an example using pybluez. You could also do the same thing directly from C using Bluez on linux.

查询-with-rssi.py

这篇关于Linux的蓝牙信号强度l2ping(无连接?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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