Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
440 views
in Technique[技术] by (71.8m points)

bash - How do I feed rssi values from hcitool to a python script?

I made a simple bash script that detects the RSSI value using hcitool. My question is how do I return that value to a python script? Thanks for your help

Here is the code for the bash script

#!/bin/bash
while:
do
hcitool rssi xx:xx:xx:xx:xx:xx
done

EDIT I looked into this even more and found someone saying to use grep and then awk to extract the value of RSSI. I did more research and I still could not understand how you would do this.

Here is the link to the site I found this information on:

https://github.community/t/bash-bluetooth-ble-connectivity-using-hcitools-help-how-to-return-rssi-of-unpaired-device/11327

question from:https://stackoverflow.com/questions/65863374/how-do-i-feed-rssi-values-from-hcitool-to-a-python-script

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...