0

I am running a python code on a wipy board (micropython environment) and a python code on an embedded linux system. The wipy board is connected to the linux system with wifi. I was wondering how to create bi-directional communication for passing data between the two independent scripts

I have looked into both threading and multiprocessing but I do not know if either would be appropriate for this use so I am just looking for a conceptual answer so I can find someplace to start

Kunal Shah
  • 610
  • 6
  • 17
  • 1
    Might want to look at socket https://docs.python.org/3/library/socket.html or https://docs.micropython.org/en/latest/esp8266/tutorial/network_tcp.html – minterm Dec 10 '18 at 22:21

1 Answers1

2

Threading and multiprocessing has nothing to do with your problem. Threading and multiprocessing is all about running multiple programs or part of programs on the same system. What you want is to use the network to send/receive messages. Please read the WiPy documentation:

About your WIFI connections

About TCP sockets

The part about the TCP sockets should be exactly what you need. The part about WIFI connections will tell you how to adjust the WIFI settings of your board.

The same goes for your embedded Linux system. Look for documentation on your system and check for the chapter about sockets. I would open a server on one of these devices (or both) and use the other devices to connect to the server and get the information the system needs. It might be a good idea to use the device with more resources as the server.

Community
  • 1
  • 1