Letting two WiPy talk to each other
-
Hello,
I'm currently failing to have two WiPy talk to each and another over WiFi.
I am connecting one WiPy to the hotspot of another wipy.The server wipy the has a socket listening to port ('',9999). The in my loop I accept new connections with socket.accept().
The other wipy then tries to connect its socket to that adress.However this is failing and I was looking for some good examples online. Sadly I found only this example on Github which does not work for me.
Can anyone get me started so the two wipys can talk to each other?
Thank you!
-
@binux said in Letting two WiPy talk to each other:
However this is failing
Have you some error message?
And what is your firmware?os.uname()?
And by Wipy - are you talking aboutWipy1,Wipy2orWipy3? -
Hi livius,
I'm using the WiPy 2 (I guess - didn't know there was a third one).
I have no error message. I was trying the example I linked above. Basically my "server" startsup and blocks while going in listening. Meanwhile my "client" tries to connect the IP. At some point the client stops with a OS error -1 (timeout I guess)Nothing else is happening...
-
@binux
andos.uname()?
And OSError - 1 i suppose is releated to memory alloc problem.. -
(sysname='WiPy', nodename='WiPy', release='1.7.5.b2', version='v1.8.6-694-g25826866 on 2017-06-29', machine='WiPy with ESP32')
-
@binux
i do not worked with this version but i suppose it should work
but better try to update you firmware - current is1.10.2.b1 -
i got them updated now. No change. I now also use the code above 1:1 -> I still get the OSError: -1 at the point of socket.connect(addr)
-
I just tried to connect the WiPy server with Putty and this worked. So the issue seems to be at the other side -> client wise, but I can't figure out what it is. Any other ideas?
-
I got the problem solved. It looks like the IP adress 192.168.4.1 creates the issue.
I got them connected to a seperate hotspot and with the new IP adresses it worked...
-
Hello @binux I know this is a slightly old thread, but i wondered if you could perhaps share your code please? I am trying to do something similar - I would like to run two pytracks accelerometer at or as near the same time so I can record vibrations at two positions and unless trying to reset both at the same time I am unsure how to do so, I thought your code may help!
Thanks
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login