[ZYNQ] Webcam problems encountered in development

The environment used in this article:
Development board: ZYNQ7020 core board-linux
camera: Gewu Youxin network camera

word is cheap show me the code

1. Why write this article?

^^^^Why write this article? Just today, when I took the equipment to test, I discovered this problem when the project was about to start. After half a day of on-site testing, after the network camera was connected to the development board, the temperature data of the camera could not be obtained. That was an embarrassment. I planned to install it tomorrow, but I came back overnight to modify the program. For your own use only. . .

2. Specific problems + solutions

1. Problem

^^^^ The camera is directly connected to the development board, and data acquisition cannot be achieved. Afterwards, the development board manually sets the IP to 192.168.1.25, and the camera configuration to 192.168.1.179. Both are fixed IPs, and data acquisition is still not possible, but the development board can ping the camera. Manually set the IP command as follows:

ifconfig eth0  192.168.1.25

After setting, use the ifconfig command to see that eth0the IP has been obtained, but it still cannot work normally.

2. Solution - set static IP

^^^^ Through the test, it is found that the development board is connected to the router after power-on, and the IP is assigned and then connected to the camera. At this time, the program works normally. After the development board is powered on, it is impossible to directly connect the camera to obtain data. Therefore, after consulting the information, it is found that the IP cannot be set directly on the command line, and the configuration file must be modified.
^^^^ At first I thought it would be enough to set the IP manually, but later I found out that it is not possible, a subnet mask is required, and a series of things need to be configured, which is also the fundamental difference between the IP assigned by the router and the IP manually.

2.1. Modify the configuration file

^^^^ Next is the ultimate law of static IP.
Enter the following folder:
insert image description here
^^^^ Modify interfacesthe configuration file as follows:
insert image description here
shield the original dhcp to dynamically obtain IP, and then manually configure it as a fixed IP.

2.2. Power on

^^^^ After power on, you can directly see that the development board is automatically assigned an IP:
insert image description here

3. Summary

^^^^To sum up, the problems this time:
1. Did not seriously test the functions of the terminal in the actual scene, and used it with the router. Careless.
2. Insufficient understanding of network knowledge, just think that IP is the same, and I don’t know if there are other knowledge to learn.

Guess you like

Origin blog.csdn.net/qq_37280428/article/details/125089247