I want to collect accelerometer data on my android phone and communicate it to my laptop over wifi.
A py script collects data on the phone with python for sl4a and another py script recieves data on the laptop. Both devices are on the same wifi network.   
The principle looks pretty straightforward, but I have no clue on how to communicate between the two devices. Who should be server, who sould be client?
I'm not looking for a way to collect accelerometer data or somebody to write my script, I just can't find info on my wifi issues on the web.
Can anybody provide any help?
Thanks in advance
you mentioned two questions in your statement, 1 how to communicate via the same wifi network, 2 which one should be the server.
1, i have tried communicating two nodes using socket and multiproceseing manager, theyre really helpful for you to communicate that kind of over-network communication. you can communicate two nodes using manager or socket, but socket also provides helps for you to get the ip of node over the network, while the manager simplify the whole process.
2, if i were you, i would choose laptop as server as you would listen for certain port, bind port receiving data. One of the reason to choose laptop as server is that it would be more convenient if you want to add more smartphones to collect data
I do not know well about sl4a, but i did some projects communicating via network, heres just suggestion, hope it would be helpful and not too late for you.
sl4a python communicate with pc over wifi