How to capture the front-end IPC package on the VCN
Summary:capture the front-end IPC package on the VCN,Parse the image uploaded by IPC to VCN
1. capture the package:
Use the tcpdump command to capture the package of the front-end device on the server. The command is as follows:
tcpdump –i any host device IP –s 0 –w Storage path
Ensure that the capture period has a front-end capture(Face, passing, etc)
2. Filter image package:
Use wireshark to filter packets from port 9554. The filter conditions are:tcp.port == 9554

3. Save the filtered package and analyze the image file:
1. After filtering in the previous step, select a record and right click Follow TCP Stream
2. Save the filtered file, note that you want to save it as a binary file, select Raw, save as

3. The saved file suffix can use .bin. The binary file is garbled with ordinary tools. Use an editor that supports hexadecimal format, such as 010Editor, Notepad++ (requires plugin installation)
4. Parse the image:
1. Analyze the starting position of the image in the binary file. The jpg image is opened with a normal editor. Generally, there is a JFIF identifier in front. According to this identifier, it is possible to determine how many images are captured in the packet, and the approximate start of the image in the packet can be analyzed. Position, generally there is a hexadecimal identifier FF D8 before JFIF, which is the starting identifier, and FF D8 is the starting position of the image. As shown below:

2. Analyze the end of the picture in the binary. Find FF D9 between the two JFIFs. This is the end of the picture, as shown below.

3. Copy the sign that just found the beginning and end of the image, copy it to the hex editor, save it as a jpg file, which is a complete jpg image. This is only for the jpg format uploaded in the smart camera. Other image formats can refer to the method. The picture starts and ends at a different location.