Describe the bug
I ran the TCP IP communication example, but server-client communication does not work.
The port you are trying to communicate with is opened, but no values can be sent from the server to the client.
When I try to send a value from the server, an error occurs saying the connection has been lost.
Thanks for letting me know what I'm missing.
Desktop (please complete the following information):
OS: ubuntu 22.04
mycobot 320 pi (please complete the following information):
Describe the bug I ran the TCP IP communication example, but server-client communication does not work. The port you are trying to communicate with is opened, but no values can be sent from the server to the client. When I try to send a value from the server, an error occurs saying the connection has been lost. Thanks for letting me know what I'm missing.
Desktop (please complete the following information):
mycobot 320 pi (please complete the following information):
Additional context
Server.py terminal result er@er:~/pymycobot/demo$ sudo python3 Server.py ip: 192.168.0.18 port: 9000 Binding succeeded! waiting connect!------------------ <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.0.18', 9000), raddr=('192.168.0.28', 56616)> ('192.168.0.28', 56616) waiting data-------- 2024-08-28 16:19:16,237 - INFO - get command: [254, 254, 2, 32, 250] 2024-08-28 16:19:16,348 - INFO - return datas: [] waiting data-------- 2024-08-28 16:19:16,545 - INFO - get command: [254, 254, 15, 34, 3, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 250] waiting data-------- 2024-08-28 16:19:16,568 - INFO - get command: [254, 254, 2, 32, 250] 2024-08-28 16:19:16,680 - INFO - return datas: [] waiting data-------- close disconnect! waiting connect!------------------
Client.py terminal result choi@choi:~/pymycobot/demo$ python3 Client.py 2024-08-28 17:19:16,207 - INFO - Attempting to connect to server... 2024-08-28 17:19:16,207 - DEBUG - _write: ['0xfe', '0xfe', '0x2', '0x20', '0xfa'] 2024-08-28 17:19:16,508 - DEBUG - _read : 2024-08-28 17:19:16,508 - WARNING - No angles received from server. 17:19:16.508 WARN [main] No angles received from server. 2024-08-28 17:19:16,508 - DEBUG - _write: ['0xfe', '0xfe', '0xf', '0x22', '0x3', '0xe8', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x14', '0xfa'] 2024-08-28 17:19:16,509 - INFO - Sent angles to server: [10, 0, 0, 0, 0, 0] with speed 20. Sent angles 2024-08-28 17:19:16,509 - DEBUG - _write: ['0xfe', '0xfe', '0x2', '0x20', '0xfa'] 2024-08-28 17:19:16,810 - DEBUG - _read : 2024-08-28 17:19:16,810 - WARNING - Connection lost. 17:19:16.810 WARN [main] Connection lost.
i run this code server https://github.com/elephantrobotics/pymycobot/blob/main/demo/Server.py client(simple demo) https://docs.elephantrobotics.com/docs/mycobot-320-pi-en-test/10-ApplicationBasePython/10.1_320_PI-ApplicationPython/3_TCPIP.html