并发线程传入和放大器

并发线程传入和放大器

本文介绍了并发线程传入和放大器;传出蓝牙连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有多个并发线程

他们中有些人正试图通过创建一个的BluetoothSocket 使用 BluetoothDevice类,通过设备MAC连接到从设备-地址。这些线程使用socket.connect,并有2秒在每次运行之间的延迟。

Some of them are trying to connect to a slave device by creating a BluetoothSocket using BluetoothDevice, through device mac-address. These threads the use socket.connect, and there is a delay of 2 seconds in between each run.

通用UUID。

问题的关键是,如果这些线程不并发然后他们每个人工作得很好,但如果他们正在运行的同时,传入连接从来没有收到。

The point is if these threads are not concurrent then each of them works fine, but in case they are running parallel, the incoming connections are never recieved.

任何帮助将AP preciated

Any help will be appreciated

推荐答案

BT搜索模式无法发送和放并存;接收模式。所以你不能把你的设备以监听连接,并在同一时间从其它设备发送和接收数据。
编辑:您可以从一个国家转移到另一个,但可以在同时在同一时间不能停留

Bt discovery mode can't coexist with send&receive mode. So you can't put your device to listen for connections and at the same time send and receive data from other devices.Edited: You can move from one state to another, but can't stay in both at the same time.

这篇关于并发线程传入和放大器;传出蓝牙连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 06:32