| With wireless communication, sensor technology, integrated circuits and otherkey technology continues to mature. there are potentially growing number ofapplications in WSN field. WSN, as a new acquisition and processing of informationtechnology, has become the focus of today’s study on the forefront of emergingtechnology at home and abroad hotspot. WSN is a highly cross direction of emergingdiscipline and traditional disciplines. Wireless sensor nodes are generally storageresource-constrained and susceptible to external storage environment interference,Most ZigBee-based wireless sensor networks in the market at this stage use"half-open" protocol stacks such as Z_Stack developed by TI, and most protocolstacks are encapsulated, which makes its application subject to certain restrictions.This paper studies on the use of open-source system Contiki and protocol stackFreakZ to build wireless sensor networks, for data acquisition in system sent to themonitoring center in single-hop or multi-hop way.First, the paper describes basic concepts and characteristics of WSN andelaborates IEEE802.15.4and ZigBee protocol specification standard which applied tolow-speed and short distances wireless communications. Then introduces the designscheme of wireless sensor nodes, and have a comparative analysis of today’smainstream operating systems and network protocol stack for WSN both at home andabroad. the paper select the program of STM32processor and RF transceiverseparated hardware platform, and select a lightweight embedded multi-taskingoperating systems Contiki and open source stack FreakZ following ZigBee protocolstack specification as the software platform for building wireless sensor networksSecondly, the paper designed the WSN node hardware circuit, includingmicroprocessor, RF module the serial port, JTAG interface circuit etc. the RF moduleand the microprocessor bidirectional communicate with each other via SPI interface,and then implement the radio driver.In terms of software, the paper use open source embedded multitasking operatingsystems Contiki and open source wireless sensor network protocol stack FreakZ underIAR compiler. Analysis the kernel of Contiki system and describes its two keymechanisms; Have a detailed analysis of data transmission link and transmission inFreakZ protocol stack. Have a detailed description of steps of porting Contiki systemand FreakZ stack to the WSN node, and implement the driver program of SPI moduleand RF nodule to build wireless sensor networks, and achieve the wireless datatransmission and reception in the established wireless sensor network.Finally, the paper have tests in lab environment, software debugging andhardware debugging method is introduced. Experimental results show that usingFreakZ protocol stack under the Contiki operating system on the base of the existinghardware platform, the network nodes information and topology displayed on theHyperTerminal indicates the success of WSN networking by using FreakZ protocol. |