简体   繁体   English

我如何在bluez中获得蓝牙rssi和链接质量值?

[英]how can i get bluetooth rssi and link quality value in bluez?

Is there anyone who knows how I can get bluetooth rssi and link quality values in bluez without any file and data transfered ? 有没有人知道我如何在不传输任何文件和数据的情况下获取蓝牙rssi和bluez中的链接质量值?

I am using bluez in linux to make some bluetooth program. 我在Linux中使用bluez制作一些蓝牙程序。 but I got a question about bluetooth rssi and lq.. although I don't trasmit or receive any file or data, I can get rssi ,lq value in linux using hci_read_rssi,hci_read_lq.. just through pairing and connection between two bluetooth devices 但是我有一个关于蓝牙rssi和lq的问题。尽管我不传输或接收任何文件或数据,但是我可以通过两个蓝牙设备之间的配对和连接,使用hci_read_rssi,hci_read_lq。在Linux中获得rssi,lq值。

my program is to transmit files at an odroid board based on linux to an android mobile phone and check rssi and lq value at The odroid board 我的程序是将基于Linux的odroid板上的文件传输到android手机,并在odroid板上检查rssi和lq值

actually It is possible I can get those values.. but I don't know how i can get rssi, lq eventhough Odroid board just sends a file 实际上,有可能我可以获取这些值..但是我不知道如何获得rssi,lq,即使Odroid板只是发送一个文件

please let me know if there is anyone who knows about that. 请让我知道是否有人知道这一点。

You can read the following link but to summarize you don't have to use pybluez: 您可以阅读以下链接,但总结起来不必使用pybluez:

install bluetooth by: 通过以下方式安装蓝牙:

sudo apt-get install --no-install-recommends bluetooth

You don't have to use pybluez, you can use the following to obtain rssi by the device mac address: 您不必使用pybluez,可以使用以下命令通过设备的mac地址获取rssi:

#!/bin/bash
echo "testing rssi /n"> logs1
while (true)
do
hcitool rssi [MAC Address]>> logs1
date +%S
date +%S>> logs1
sleep 0.25
done

if you son't know the mac you can use: 如果您不知道Mac,可以使用:

hcitool scan

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

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