8150
and 8196
) seemed to me the most suspicious.
8150
did not answer me, but the MJPG stream was transmitted via port 8196
.
8150
, installed the laptop's IP 10.10.1.1
and turned its WiFi into access point mode. Having connected to it from the phone, I tried to start the tank control program. As I expected, she connected to the port, which I listened to, but immediately flew out, it turned out she could not connect to the video transmission port. Having added the imitation of video transmission in my program, the program still started. After analyzing the data obtained from the management program, the management teams revealed that there were not so many.
0x31
) - left caterpillar0x32
) - right track0x33
) - tower (raise / lower the camera)0x30
) - stop (stop motion)0x31
) - forward / up (for camera)0x32
) - back / down0x31 0x31 0x32 0x31
.
8150
and 8196
from the local interface to WiFi and connected it to the home router. Now it was possible to connect to the tank from the local network.
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // socket.Connect(IPAddress.Parse("192.168.10.15"), 8150); // 3 / // socket.Send( new byte[] { 49, 49, 50, 49, 51, 48 }); // 1 Thread.Sleep(1000); // socket.Send( new byte[] { 49, 50, 50, 50, 51, 48 }); Thread.Sleep(1000); // socket.Send( new byte[] { 49, 50, 50, 49, 51, 48 }); Thread.Sleep(1000); // socket.Send( new byte[] { 49, 49, 50, 50, 51, 48 }); Thread.Sleep(1000); // socket.Send( new byte[] { 49, 48, 50, 48, 51, 49 }); Thread.Sleep(1000); // socket.Send( new byte[] {49, 48, 50, 48, 51, 48}); socket.Disconnect();
Source: https://habr.com/ru/post/178003/