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!



  • 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



  • 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...



  • @livius

    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?



  • @livius

    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)



  • @binux
    i do not worked with this version but i suppose it should work
    but better try to update you firmware - current is 1.10.2.b1



  • @livius

    (sysname='WiPy', nodename='WiPy', release='1.7.5.b2', version='v1.8.6-694-g25826866 on 2017-06-29', machine='WiPy with ESP32')



  • @binux
    and os.uname()?
    And OSError - 1 i suppose is releated to memory alloc problem..



  • 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 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 about Wipy1, Wipy2 or Wipy3?



Pycom on Twitter