views:

53

answers:

1

I am working on a few devices that need to send raw data to an android device wirelessly (wifi). The android devices needs to be able to support multiple devices so I figured a server is best. Is there a way to have the android device act as kind of a router/server access node by producing its own LAN network?

Any pointers appreciated, ~Aedon

+2  A: 

Version 2.2 supports running as an accesspoint, which sounds like what you're after.

I believe this was possible in earlier versions if you had gained root access.

awoodland
Thank you that. To receive the data just set up a socket to listen to the port? Is it that simple?
AedonEtLIRA
Probably you want to do it using multicast sockets, but yes it is that simple.
awoodland
ok cool. Thanks
AedonEtLIRA
!re there any tutorials on interfacing with it yet?
AedonEtLIRA
Official doc is: http://developer.android.com/reference/java/net/MulticastSocket.html be sure to have the permission for your app too. I can't find a great tutorial on it, but several games use it so it clearly does work.
awoodland
Kk thanks again. How would the server work, extend ServerSocketChannel?
AedonEtLIRA
Nmv it would seem that I would just use Datastream channel and it would act kind of as a server.
AedonEtLIRA