Abstract: Due to the increasing requirements for data transmission in the field of vehicle monitoring, this paper designs a 3G vehicle video transmission module, and gives the hardware and software design of the system. The hardware part focuses on the design of video capture, 3G transmission and other parts. The software part introduces the driver design of the U6100 module, 3G network access program design and video transmission program design. Finally, through the analysis of RTP data packets and the observation of the client video, it is proved that the design has achieved good results.
This article refers to the address: http://
Keywords: vehicle terminal; video transmission; 3G wireless network; U6100
Due to the continuous development of 3G wireless network technology and embedded technology, the rapid development of video surveillance has been promoted, especially in the field of automotive monitoring. The 3G wireless network covers a wide area and can be flexibly accessed. Compared with the previous wireless video communication technologies such as GPRS and CDMA, the transmission speed is much faster, but the practical application of 3G technology in the field of automobile monitoring is not perfect. DM365 supports H.264 video coding technology to ensure high-quality transmission of video data under limited network bandwidth. Shanghai Longshang's U6100 module can be integrated into any 3G mobile device and can be connected to high-speed networks such as HSDPA, HSUPA, and UMTS. Therefore, we designed the car video transmission module with TI's DM365 as the core and Shanghai Longshang's U6100 as the transmission module.
1 3G car video transmission module hardware design
The video transmission module designed in this paper is applied in the vehicle monitoring equipment, so when we carry out the design of the scheme and the choice of hardware, the transmission requirements of the video are the first to bear the brunt. In view of the good compatibility between the software and hardware of the DM36X series, the Davinci platform facilitates the algorithm expansion, so the TMS320DM365 chip is used to build the 3G vehicle video transmission system.
The hardware platform of this module is mainly composed of the following parts: video capture and processing part, local storage and display part, 3G video transmission part, power part. The hardware frame diagram of the video transmission module of the vehicle terminal is shown in Figure 1.
1.1 Video Capture and Processing Section
The video capture part consists of a PAI/NTSC pan/tilt camera and a video codec chip TVP5151. The PTZ camera needs to be controlled by RS485. Since there are only two serial interfaces (UART) on the DM365, they are already occupied (one is used to connect the serial port debugging and one is connected to the GPS module). Therefore, we use the USB port of the USB HUB to perform the secondary conversion. First, the LP2303 is used to convert to 232, and the MAX485 is used to convert to 485 for the control of the PTZ.
The TVP5151 and the processor are interfaced with the I2C bus to convert the input analog signal into a digital signal.
The video processing part uses TI's DM365 HD video processor. DM365 supports H.264 video coding technology, which guarantees high-quality video data transmission under the condition of 3G wireless network transmission.
1.2 Local storage and display section
The DM365 provides a dedicated external memory interface that includes a Flash interface and an SDRAM interface to connect to external memory. In the design of this vehicle terminal, we use Samsung's 1GB capacity, 8-bit data line K9F 8G08UOB NAND Flash chip and 128MB capacity, 16-bit data line K4T1G164QE DDR SDRAM chip.
In order to make the operation of the vehicle terminal more user-friendly, we chose a 5.7-inch TFT-LCD touch screen panel from Taiwan Jingcai Optoelectronics Co., Ltd. for display. The panel has a high resolution of 640X480. It supports the I2C bus or SPI bus. Considering the actual situation of the upper layer driver, the I2C bus is used to connect with the main chip.
1.3 3G video transmission part
The U6100 module is selected for the 3G transmission part. The maximum transmission rate of uplink and downlink under the 3G network platform can reach 384Kbps, which meets the design requirements of the vehicle transmission module. The circuit design of the 3G transmission part is shown in Figure 2.
The U6100's power supply requirements are 3.6 to 4.2 V, and we supply it with 3.8 V. The U6100 provides 6 SIM card interfaces to connect SIM cards, which are compatible with various 3G formats. The U6100 provides a standard RS232 interface, USB_DM and USB_DP, which can be directly connected to the user's CPU. Since this design requires 4 USB ports, we use a USB expansion chip to expand the DM365 with only one USB port into 4, and use the DP1 and DM1 to connect to the U6100. The power supply USB VBUS is filtered by a 5 V power supply. KPD_PWR_N is the power switch of U6100. It is effective when it is pulled low. We ground directly through a 0 ohm resistor, so the U6100 is in the working mode by default when it is turned on. EXT_RET_IN is the reset signal of U6100. It is reset when it is pulled low. We control it through the GPIO port of DM365.
2 software design of car video transmission module
The software design part of the video transmission module is mainly divided into the design of the driver and the design of the application. I mainly talk about the drive design including U6100 module, 3G network access program design and video transmission program design. Since the Linux 2.6.18 system has better openness, security, and portability than other versions, the entire software development of the system is performed on the platform.
2.1 Drive Design of U6100 Module
The loading of the driver module is divided into static and dynamic. This system uses dynamic loading. The loading process of the U6100 module is as follows: 1) First, make sure that the cross-compilation tool for compiling the driver and compiling the kernel is the same (the system uses arm_v5t_le_gcc); 2) modify the driver's Makefile, add the kernel source directory and build tools. After the make is compiled, the .ko file is generated; 3) the generated .ko file is copied to the /module/ of the vehicle terminal; 4) the module is loaded with the insmod command, and 3 files are generated in the directory /dev/tts. Device node USB1-USB3; At this point, the 3G wireless module is successfully loaded.
2.2 3G network access program design
After the 3G wireless module is successfully loaded, it must access the network. The in-vehicle device is connected to the network through dial-up. The most common is to use the PPP (Point-to-Point Protocol) protocol. The dialing of the PPP protocol is mainly divided into three phases. After completion, a complete PPP link is established. After as shown in Figure 3.
Although the U6100 module supports both CDMA2000 for Telecom and WCDMA for China Unicom, China Unicom's WCDMA network is relatively stable and fast, so we choose Unicom's WCDMA network. In LINUX, the programs related to WCDMA network access are pppd and chat. The pppd program is responsible for the initialization of the 3G module and the incoming dialing. In the initialization part, the chat program is called to send the AT command, and the main interactive dialing parameters and the dialed user information are set, and then the pppd program performs the network dialing. The specific process of the U6100 dial-up access network is as follows: 1) Write the pppd dialing script wcdma3, the session creation and disconnection calling scripts chat-wcdma-connect and chat-wcdma-disconnect files; 2) add kernel options, compile and support PPP protocol The kernel; 3) port the compiled pppd file and the chat file to the /etc/ppp/peers of the file system of the vehicle terminal; 4) input the dialing command pppd callwcdma3 in the terminal to connect; 5) use the ifconfig query to appear A print message of the network interface ppp0 appears, indicating that the WCDMA3G network has been successfully connected.
2.3 video transmission program design
The car video transmission system has high requirements for video transmission delay and packet loss rate. RTP/RTCP is a better solution for real-time video transmission. It has an open source code RTP library, so the system uses real-time transmission protocol. RTP is used in conjunction with the real-time transport control protocol RTCP for 3G transmission.
The transmission process of the RTP data packet is shown in Figure 4(a). The H.264 video stream read from the cache is first packaged into an RTP packet, which is sent to the server in turn. The unit type structure of the RIP load has three types: a single NAL unit package, an aggregation package, and a slice unit. Here, in order to avoid video data being split at the network layer, we use a single NAL packet and a slice packet mode, and set one NAL unit to 1 Kbyte. If it is less than 1K bytes, it is directly encapsulated into an RTP packet to send. If the length of the data unit is longer than 1K bytes, it is transmitted as a FU-A packet, and needs to be divided into several NAL packets smaller than 1K bytes, including the first packet, the intermediate packet, and the tail packet. Then, the RTP header is encapsulated according to the format of the RTP packet, and then sent to the 3G network through the U6100 module. The corresponding RTP packet receiving process is shown in Figure 4(b).
3 test results
3G video transmission is carried out in the built-in vehicle terminal environment, and RTP packet analysis experiments are performed using Wireshake software. As shown in Figure 5, the black shaded is the 847th RTP packet captured, which is transmitted from the address 10.13.1 4.77 of the 3G network to our device server 101.69.255.130. See that the size of all RTP packets does not exceed the maximum value of the set packet 1040. After many tests, the packet loss rate is within 4%, which meets the requirements. The video seen on the client is also very clear, the video is smooth, and the wireless transmission rate can reach 25 frames/s, as shown in Figure 6.
4 Conclusion
The 3G vehicle video transmission module designed in this paper is an important part of the vehicle monitoring system. The video picture transmitted through the 3G network is clear, which is beneficial to the remote monitoring center to monitor and schedule the vehicle in real time, in line with the current requirements of vehicle transmission.
Cummins 401-999KW Diesel Generator
Cummins 401-999Kw Diesel Generator,Cummins Shanghai Genset,Cummins Shanghai Power Generator,999Kw Diesel Generator
Shanghai Kosta Electric Co., Ltd. , https://www.ksdpower.com