[英]BLE android multiple sensors
I actually have the project to develop an android application BLE which can connect and read multiple sensor (My version should be able to connect up to 7 devices, but I want to connect only 2 in the first time). 我实际上有一个项目来开发一个可以连接和读取多个传感器的android应用程序BLE(我的版本应该能够连接多达7个设备,但我想第一次只连接2个设备)。
I read a lot of informations about that and have a knowledges of the global working-way (one thread by connection, queue of requests, etc) but I'm really not familiar with the JAVA language. 我阅读了很多有关此方面的信息,并了解了全局工作方式(通过连接建立一个线程,请求队列等),但是我实际上并不熟悉JAVA语言。 I found arround a billion of topics with this subject but all of them are a bit old, so here is my questions : 我发现与此主题相关的主题多达十亿个,但是它们都有些陈旧,所以这是我的问题:
Regards, John 问候,约翰
There is no easy-to-use open sources libraries for BLE Android at the moment, almost of them are also not updated. 目前,没有适用于BLE Android的易于使用的开源库,其中大多数也未更新。
I also spent a long time to look for a good example and library, but all of them are one-device connection only. 我也花了很长时间寻找一个好的示例和库,但是它们全都是单设备连接。 Finally, I went with this library. 最后,我去了这个图书馆。
https://github.com/RobotPajamas/Blueteeth https://github.com/RobotPajamas/Blueteeth
You can use this to connect with multiple devices easily. 您可以使用它轻松地与多个设备连接。 However, to get data from all of them, it is a little bit harder. 但是,要从所有这些对象中获取数据,会有些困难。
This is also not maintained currently but it is the best one for me. 目前也未保持此状态,但这对我来说是最好的。 You can take a look at sample-app
for more details. 您可以查看sample-app
了解更多详细信息。
I do connect to several sensors but I just do it by connecting one after one, collect the data and disconnect then connect the next on etc... This is just working well. 我确实连接了多个传感器,但我只是通过一个接一个地连接,收集数据并断开连接,然后再连接另一个等来完成此工作。 Isn't this OK for you? 这样不好吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.