Tuesday, 1 October 2013

Bluetooth- exchanging data without using server/client relationship

Bluetooth- exchanging data without using server/client relationship

I'm making an app using bluetooth, and I realized it'd be pretty neat to
exchange data between 2 running devices via bluetooth. However, as far as
I know most Bluetooth devices use a traditional server/client
architecture, so the information exchange is one sided, ie, client
requests data from server, server sends it, but not the other way around.
To get around this problem, I tried to make each device have a server
instance as well as a client instance, so that the client can hook up the
the server in the other device. However this does not seem efficient as
this requires 2 channels of communication instead of one.
Then I tried going to Bluetooth website, and they suggested "role
switching", that is, when server wants some data from client, server makes
itself a client and client becomes a server, so the role is reversed. I
don't quite like it either, because why can't 2 devices play the same role
and exchange data at the same time? What kind of connection is this called
then?
I have not had experience in networking so my question might seem naive,
but I'd like to have someone point out the answer, or tell me what
information/which chapters of textbook I'm missing so I can wiki it.

No comments:

Post a Comment