At present, the Internet of Things ( IOT ) is developing rapidly. This paper introduces a wireless multi-band WSN gateway that can monitor the operation of wireless sensor subnet nodes in multiple frequency bands through Ethernet or mobile communication network.
1 System overall structure
The system designed in this paper uses wireless sensor network nodes of four frequency bands in the perception layer. Each frequency band subnet is connected to the network layer through a multi-band gateway device. Users can monitor field data through the monitoring terminal, which can be either a fixed PC or a mobile 3G device. At the same time, the gateway also has good scalability and can access WSN networks of multiple frequency bands at the same time. The block diagram of the multi-band WSN gateway system is shown in Figure 1 .
Figure 1 Multi-band WSN gateway system structure diagram
2 Gateway Hardware System Design
The gateway's main control unit uses an ARM9 chip S3C2440A with a main frequency of 400 MHz and external expansion of 64 MB SDRAM and 64 MB NAND Flash . The microprocessor's peripheral data controller ( PDC ) provides a DMA channel for serial peripherals , allowing them to read and write data with on-chip and off-chip memories without passing through the processor.
The 3G network access end of the gateway uses a USB interface to achieve communication with the 3G network; the wireless sensor network subnet access ends are 2.4 GHz subnet access module, 780 MHz subnet access module, 470 MHz subnet access module and 433 MHz subnet access module, and each subnet module communicates with the gateway main control unit through a serial port. The structural block diagram of the entire gateway of the Ethernet control part is shown in Figure 2 .
Figure 2 Structural block diagram of the entire gateway of the Ethernet control part
2.1 Multi - band wireless sensor network subnet access part
Since the S3C2440A chip itself has only 3 channels of serial ports. The subnet access modules of the 4 frequency bands all use serial communication interfaces. The ARM9 chip itself cannot meet the needs of this system, so it is necessary to use peripheral expansion chips and design serial port expansion circuits to meet the needs of the system. This design uses TI 's TL16C554A chip to expand 4 full-function serial ports through parallel data lines and address lines . [page]
The TL16C554A chip has an 8 -bit data width. The D0 to D7 pins of the TL16C554A are directly connected to the ARM9 chip, and the read and write signals are directly connected. The INA , INTB , INTC , and INTD pins of the TL16C554A are respectively connected to the INT0 , INT2 , INT3 , and INT4 pins of the main control chip , so that each extended channel serial port can work independently through interrupts.
The address lines A0 to A3 of S3C2440A are directly connected to A0 to A3 of TL16C554A , and nGCS2 of S3C2440A is used as the chip select signal of decoder 74LS139 . The input end of 74LS139 is connected to address lines A4 to A5 respectively . According to the decoder decoding, the address allocation is realized, and then the address mapping is performed through the ARM chip. The physical address of the external 4- channel serial port is
Channel A - 0x10000000 to 0x10000008
Channel B - 0x10000010 to 0x10000018
Channel C - 0x10000020 to 0x100000028
Channel D —— 0x10000030 ~ 0x10000038 .
The main control chip can access external registers by accessing these addresses, that is, the internal register addresses of the TL16C554A chip. The interface circuit of the multi-band subnet access part is shown in Figure 3 .
Figure 3 Multi-band subnet access interface circuit
2.2 3G network access interface
The 3G network access part uses Huawei ET128 wireless network card with USB interface . The access interface uses USB - HUB chip AU9254A21 , which is a single-chip USB hub controller. AU92 54A21 uses 12MHz passive crystal oscillator to provide independent clock for chip operation. The interface circuit of 3G network access part is shown in Figure 4 .
Figure 4 3G network access interface circuit
2.3 Ethernet access part
The principle of the gateway sending data packets through the Ethernet port is: the processor first stores the data to be sent into the internal memory, provides the first address and data length of the sending buffer, and then executes the sending command, and DM9000A sends the data to the physical link in the TCP / IP protocol format.
Because the Ethernet signal level is different from the Ethernet controller signal level, a network transformer needs to be added between the controller and the RJ-45 interface in the hardware circuit implementation. The network transformer uses TRC9016 . The electrical signal is converted by the network transformer and then connected to the Ethernet through the RJ-45 interface to complete the data transmission process. DM9000A mainly completes the mutual conversion between data packets and digital electrical signals.
3. Gateway Software System Design
The software environment of the gateway uses an embedded Linux system. The transplanted Linux 2.6.24 source code already includes drivers for Ethernet controller DM9000A , USB interface chip and other chips. Therefore, the software part only needs to design the driver for the serial port expansion chip TL16C554A and the application program under the Linux environment.
3.1 Implementation of the driver for the serial port expansion chip TL16C554A
The Linux 2.6.24 kernel provides a unified device driver model. The registration process of multi-serial port device drivers is shown in Figure 5 .
3.2 Management and configuration of PPP under Linux
After modifying and transplanting the general driver code according to the hardware interface of the gateway, customize and compile the kernel image file required by the gateway through relevant configuration. The cross compiler version used for kernel compilation is arm-linux-gcc3.4.1 . Use the makemenuconfig ARCH=arm command to enter the kernel configuration graphical interface, select options related to PPP ( Point-to-Point , point -to-point protocol), and add system support for PPP function. The interface is shown in Figure 6. After the configuration is completed, save the settings and exit the kernel configuration graphical interface. Use the command: makeuImage ARCH=arm CROSS_COMPILE=arm-linux- . After the compilation is completed, the kernel image file uImage will be generated under the arch / arm / boot path of the source code package , as shown in Figure 7. [page]
3.3 Embedded Linux Network Programming
In this design, the Internet is accessed through the TD - SCDMA network . After a node in the WSN subnet is powered on, the gateway assigns it a 16- bit short address to identify itself in the subnet, and then periodically sends the data it collects. After the gateway receives the data transmitted by the sensor node, it converts the IEEE 802.15.4 protocol to the Ethernet protocol. In order to provide a transparent interface to the network device and distinguish the source of the serial port data, a unified data frame format needs to be formulated. Therefore, after the protocol conversion, the slip frame header is added and sent to the ARM through the serial port device .
After parsing the slip frame header, ARM passes it to the upper layer and MAC layer, parses the Ethernet header, and then passes it to the adaptation layer, which compresses or fragments the complete IPv6 data. The data finds the network to be sent based on neighbor discovery at the IPv6 layer, and performs routing forwarding. After adding the corresponding MAC header at the MAC layer, it is sent to the TD - SCDMA communication network through the TD module. In this way, data forwarding from the subnet to the TD network is completed.
3.3.1 Introduction to PPP protocol
PPP is a link layer protocol designed to provide a link connection for data packet transmission between two entities. This link has full-duplex operation, flow and error control, and transmits data packets in sequence. Through dial-up or dedicated line mode, the client and the server can establish a point-to-point connection to transmit data.
3.3.2 Establishing a dial - up connection
In Linux system, PPP can be used to connect a host to a PPP server and access the network resources connected to the server, just like directly connecting to the network. There are mainly the following steps to establish a PPP connection to the Internet: The first step is to call the session program. Then the session program sends AT commands to the 3G module to complete dialing, identity authentication, configuration and other tasks. Finally, the client's pppd program shakes hands with the server's pppd program to establish a connection and transfer data to each other. The flow chart of the multi-band gateway establishing a network connection is shown in Figure 8 .
3.4 Application design
Since the data comes from the serial ports of the four frequency band subnet aggregation nodes, the gateway application program collects the data of the multi-band subnet aggregation nodes using the multi-device reading mechanism select ( I / O multiplexing mechanism) in the Linux system to monitor multiple serial ports. The process of multi-serial port data collection is shown in Figure 9 .
Figure 9 Flow chart of multi-serial port data collection
4 Example Test
Figure 10 is a screenshot of the Linux system information displayed by the hyperterminal after PPP dial-up is successful . The dial-up target host computer address is 222.182.101.220 . It can be seen from the figure that PPP dial - up is successful and the IPv4 address 10.81.185.15 allocated by the TD network is obtained. The remote server IP is 192.200.1.21 .
Figure 10 Screenshot of Linux system information displayed in HyperTerminal after PPP dial-up is successful
Conclusion
With the era of Internet of Things, TD - SCDMA will promote the Internet of Things to effectively exert the great power of seamless communication. This solution makes full use of the public network resources of the Internet and wireless communication, organically combines wireless sensor network technology, embedded technology, and TD - SCDMA communication, successfully designs the WSN / TD gateway, realizes the integration of wireless sensor network and TD - SCDMA network, and has achieved good results in practical applications.
EndFragment
Previous article:EFM32 application solution: digital multimeter
Next article:Moving object detection system based on embedded Linux
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- The waveform of TLV62569 is unstable when it is unloaded and presents a sawtooth shape. Solution
- [STM32WB55 review]——by cruelfox
- Please tell me how to use the IS pin of BTS7960
- Share a summary of CNC power supply solutions, very detailed
- DIY flapping-wing aircraft, focusing on the mechanical structure and flight control system principles (including open source materials)
- Hongmeng Development Board Neptune (Part 2) - Development Environment
- Main steps when configuring the EMIFA module using CSL
- Hi guys!
- ST MEMS Creative Competition Post 4 - Robotic Arm Control
- Detailed explanation of the national standard GB/T 17626 for EMC testing