Bluetooth concurrent connections

喜欢而已 提交于 2020-01-23 08:22:26

问题


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.

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.

My questions:

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.

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


回答1:


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

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.




回答2:


Have you read though this and the rest of the information available specifically for Android? http://developer.android.com/guide/topics/wireless/bluetooth.html

Aside: When I was in college we did trivia nights the old fashioned way (paper and pencil) but on the plus side you didn't have to worry about having expensive phone handsets in the hands of drunken college students! ;-)



来源:https://stackoverflow.com/questions/3707690/bluetooth-concurrent-connections

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!