蓝牙并发连接 [英] Bluetooth concurrent connections

查看:161
本文介绍了蓝牙并发连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关在我的大学一个巨星,我们正在规划一个知识竞赛。

蜂鸣器轮,我想写2应用程式Android(我们有一些手机),一个用于测验主,另一个参赛者

参赛者将通过蓝牙连接到主测验

For a fest at my college, we are planning a quiz contest.
For the buzzer round, I was thinking of writing 2 app for android (we have a few handsets), one for the quiz master and the other for the contestants
The contestants will be connected to the quiz master through bluetooth.

阅读问题后,竞猜大师点击在他/她的应用按钮,在选手的应用按钮X秒启用。只要选手点击他/她的按钮,测验主人的应用程序会闪烁的选手的名字。

After reading the question, the quiz-master clicks a button in his/her app, the button in the contestant apps will be enabled for X seconds. As soon as a contestant clicks his/her button, the quiz master's app will flash the name of that contestant.

我的问题:

它甚至有可能有多个连接和蓝牙接受他们的并发(或复用)消息()在UNIX / C相似,选择一些东西()?

Is it even possible to have multiple connections and accept concurrent (or multiplexed) messages from them in bluetooth (something similar to select() in unix/c)?

如果可能的话,我应该在哪里寻找任何的例子吗?什么样的问题,我会面对试图制定这种(我知道的可靠性是个问题在这里),以及如何避免呢?

If possible, where should I look for any examples? What kind of problems will I face trying to develop this (I know reliability is an issue here) and how to avoid them?

我已经在笔记本电脑前尝试这样做,失败了。但是,也许我给-起得很早。请帮助。

I had tried this on laptops before and failed. But maybe I gave-up very early. Please help.

编辑:

我放弃行动的项目(太多连接滴)。我保持的问题,虽然开放


I gave-up the project (too many connection drops). I'm keeping the question open though.

推荐答案

蓝牙支持微微网,其中一个(测验)主可最多的 7奴隶

Bluetooth supports piconets, in which a single (quiz) master can communicate with up to 7 slaves.

因此​​,在蓝牙的水平,这应该是可行的。我是对事不对人的说,如果有可能采用Android的蓝牙API来实现:S,虽然

So, at the Bluetooth level, this should be doable. I'm not the person to say if it's possible to implement using Android's Bluetooth API:s, though.

这篇关于蓝牙并发连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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