1, ZigBee module MANETs physical map
2, module wiring
VCC connection 3.3V, GND connected to GND, TXD then RXD, RXD connected TXD. Note that the module can not be connected VCC 5V.
3, the configuration module
We use the Bluetooth module is mainly the same as his assistant configure the serial port, and then let him direct communication through the serial port and microcontroller on it!
Specific configuration table as follows:
Note that after each configured, must send a package to restart, then takes effect!
DETAILED baud rate - table reading:
4, the presentation module configuration
Note that the initial module baud rate is 115200
1) query IP address of the sending FE 05 90 21 00 00 01 FF
return
Can refer to available configuration table, the IP address of the module 0x1122
2) read the new baud rate transmission FE 05 90 21 00 00 04 FF
Returns
The baud rate is the baud rate corresponding to the reading table is 0x08 115200
3) reads the network ID and the channel can send relevant code look, if it is to use the ad hoc network, then the network ID and the channel must be the same, or can not communicate, IP address, each of the modules must not the same, the wave this special rate requires you to look at communication and microcontroller master!
4) modify the IP address of the sending FE 07 90 21 00 00 11 03 00 FF
Returns:
the configuration was successful
5) change the baud rate of 9600 send FE 06 90 21 00 00 14 02 FF
Returns:
the configuration was successful
Finally, the modified configuration to play must restart the packet transmission: FE 05 90 21 00 00 10 FF this module does not return a value, it can be seen that the green light module around 2S
5, verify the configuration is successful View IP View baud rate (serial port baud rate modification assistant 9600)
IP Address: Return to 0x0003 successfully address configuration
baud rate, 9600 may not have been garbled communication, indicating 9600 baud rate configuration successful! Of course, we can continue to test:
you can see there is no problem! Note that the configuration is complete must be verified, otherwise there is a problem you do not know in what appears! After configuration, you can look up a local area network using two zigbee communication about!
Data transmission process example
want to transfer data and what data to put the data part length change it, but must pass in accordance with this format, no side not be sent out, if there is a plurality of transmitting modules, receiving a module, it is necessary to change what the purpose of each transmission module sends the port, because if many regard the module sends data to the same port with a module, data can cause confusion, but also influential.
6, data Escape