I am trying to run a socket server on my Verdin mini that will send some measurement data to my PC.
I have very limited experience with containers, so I started following this simple example Docker Containers: IPC using Sockets — Part 1 | by Aniket Pingley, Ph. D | Techanic | Medium
When trying to run the first ipc_server.py code:
#!/usr/bin/env python3 # ipc_server.py import socket HOST = '0.0.0.0' # 0.0.0.0 is a non-routable meta-address that also specifies all IP # addresses on all interfaces on the system PORT = 9898 # Port to listen on (non-privileged ports are > 1023) with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() conn, addr = s.accept() with conn: print('Connected by', addr) while True: data = conn.recv(1024) if not data: break conn.sendall(data)
When trying to run this code over VSCode extension on the board, the debugger comes to the line s.accept() and then then never goes over it. The article also mentions that the port has to be exposed, which I did following this topic Expose Port in Docker by just adding 9898/tcp:9898 to the port field of the extension.
Is there something else I need to do in order to make this work? Also I don’t know if it makes any difference but my plan is to have this server run over RNDIS, as I said very little experience here so any help would be appreciated.