Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
UART communication board, XBee interface, USB interface
Zigbee network needs minimum a coordinator and a router. Since the Core2530 (B) module has a built-in Bootloader in default setting, you can download the firmware to the module directly via the serial port.
Notes: In the Zigbee network experiment, you may need to apply two pieces of Core2530 (B) modules, and two pieces of XBee USB Adapter baseboards.
1. Coordinator
2. Router
3. End Device
1. Introduction
The built-in Bootloader enable users to download the program to the module directly via a serial port without using the CC Debugger. However, the CC Debugger is required in the course of programming the Bootloader into the module. For more detailed information, please refer to the Section How to program Bootloader.
The Bootloaders available for this module: bootloader.hex.
For easier understanding, we call the module with the bootloader.hex as module A in this document.
The module A will execute the valid program immediately, if any, in the Flash memory, after powered up. Otherwise, its LED1 will keep blinking indicating that there is no program in the Flash memory and you can download a new one via the serial port in this case.
The module A with bootloader.hex is suitable for independent application, since it can run the program directly without any external key-press trigger.
2. CC debugger driver installation
3. How to program Bootloader
In this section, we will illustrate how to build a Zigbee network by applying two groups of Core2530 (B) + XBee USB Adapter, one works as a coordinator and the other one works as a router. For easier understanding, we call the coordinator as Group A and the router as Group B.
The operations presented below can be done directly by UART serial communication.
Broadcast communication mode
Description: Under this mode, a device can broadcast messages to all the other devices in the Zigbee network.
Format: Data to be sent
EXAMPLE: To broadcast the message "Hello Waveshare" throughout the network from a device, the relative operations are as follow: Enter the message to be broadcasted into the character string input box, and click the button Send:
All the other devices, including routers and coordinators, will receive this message in their character string receiving boxes.
|
Point to Point communication
Description: It is the communication between any two nodes in the same network.
Format: P2P Target address Data to be sent
EXAMPLE: To send the message "Hello World " from the module A to the module B, the relative operations are as follow: Read the short addresses of the module A and the module B by the command AT+GETADDR Enter the command AT+GETADDR into the character string input box:
Then, you may get the addresses of the module A and the module B:
On the module A, apply P2P command to send the message to the module B:
Except the module B, other nodes and routers in the network will not receive the message:
|
Point to Multipoint communication
Description: A node sends data to the specified nodes in the same network.
Format: O2M Quantity of target address Target address 1 Target address 2 … Data to be sent
EXAMPLE: To send the message "Hello World" from the module A to the module B and the module C, the relative operations are as follow: Read the short addresses of the module A, the module B and the module C by the command AT+READ_ADDR Enter the command AT+GETADDR into the character string input box:
Then, you may get the addresses of the module A, the module B and the module C:
On the module A, apply O2M command to send the message to the module B and the module C:
Except the module B and the module C, other nodes and routers in the network will not receive the message:
|
ZBSCOMM is the PC software for Core2530/XCore2530/Core2530 (B) developed by Waveshare. With ZBSCOMM, you can easily configure the module settings and read the current configurations of the module via your PC. Of course, you can control the module by AT command as well, if you do not want to use the PC for configuration.
Table 1: Restart the module
Command | AT+RESTART |
Inputted parameters | None |
Return value | RESTART OK |
Remarks | When the message "RESTART OK" is returned, the module will restart |
Table 2: Restore the factory settings
Command | AT+RESET |
Return value | SETUART OK SETCHN OK SETPANID OK |
Remarks | The settings listed below will be effective after the module restarts. Factory settings: PANID : 0xFFFF (random) CHANNEL: 11/2405MHz UART: 0 (select COM port 0) Baud rate: 38400 Flow control: 0 (None) |
Table 3: Serial port information configuration
Command | AT+SETUART Serial port number Baud rate Flow control (The command parameters are separated by spaces) |
Function | Set the serial port number, Baud rate and flow control |
Inputted parameters | Serial port number: it should be set to "0" to select COM Port 0 for configuration Baud rate: 9600-115200 Flow control: it should be set to "0" to turn off flow control |
Return value | Success: SETUART OK Failure: SETUART ERR |
Remarks | Factory settings: UART: 0 (select COM Port 0) Baud rate: 38400 Flow control: 0 (None) |
EXAMPLE: To set the serial Baud rate, you only need to enter "AT+SETUART 0 38400 0" into the character string input box, and click the button Send. The new settings will be effective after the module restarts. The relative operations are as follow: Enter "AT+SETUART 0 38400 0" into the character string input box:
Then, you may receive "SETUART OK" in the character string receiving box:
|
Table 4: Channel setting
Command | AT+SETCHN Channel |
Function | Set the communication channel of the Zigbee network |
Inputted parameters | Channel: range from 11 to 26 |
Return value | Success: SETCHN OK Failure: SETCHN ERR |
Remarks | In a network, all the modules should be set to a same channel for networking. By default, the communication channel is allocated by the system automatically. Factory setting: 11/2405MHz |
Table 5: Set the PAN ID
Command | AT+SETPANID PAN ID |
Function | Zigbee protocol use a 16-bit PANID to identify the network |
Inputted parameters | PANID: range from 0x0000 to 0x3FFE |
Return value | Success: SETPANID OK Failure: SETPANID ERR |
Remarks | If PANID=0xFFFF: the device will build up or join an optimum network. If PANID≠0xFFFF: the device will build up or join a network with a given PANID. Normally, PANID comes up after determining the communication channel |
Table 6: Read all the configuration information
Command | AT+GETCFG |
Function | Read all the configuration information |
Inputted parameters | None |
Return value | UART: serial parameters (Baud rate, Flow control) PANID: Local area network identifier ADDR: the short address of the device FADDR: the short address of the parent device CHANNEL: the communication channel of the module |
Table 7: Read the serial configuration information
Command | AT+GETUART |
Function | Read the serial configuration information |
Inputted parameters | None |
Return value | Serial port number: 0/1 (serial port 0/serial port 1) Serial Baud rate: 9600-115200 Flow control: 0/1(None/flow control) |
Table 8: Read the current communication channel information
Command | AT+GETCHN |
Function | Read the current communication channel information of the module |
Inputted parameters | None |
Return value | CHANNEL: channel value |
Table 9: Read the current PAN ID of the module
Command | AT+GETPANID |
Function | Read the current PAN ID of the module |
Inputted parameters | None |
Return value | Success: PANID=0xxxx; Failure: PANID=0xFFFE |
Table 10: Read the short address of the device
Command | AT+GETADDR |
Function | Read the short address of the device |
Inputted parameters | None |
Return | ADDR=0xXXXX; |
Remarks | Short address length: 16 bits This command is used in P2P or O2M communication |
Table 11: Read the short address of the parent node
Command | AT+GETFADDR |
Function | Read the short address of the parent node |
Inputted parameters | None |
Return value | FADDR=0xXXXX; |
Remarks | Short address length: 16 bits |
Table 12: Read the IEEE address of the device
Command | AT+GETIEEE |
Function | Read the IEEE address of the device |
Inputted parameters | None |
Return | IEEE=xx xx xx xx xx xx xx xx |
Remarks | The IEEE of the device is a 64-bit address |
Table 13: Read the IEEE address of the parent node
Command | AT+GETFIEEE |
Function | Read the IEEE address of the parent node |
Inputted parameters | None |
Return value | MY_FIEEE=xx xx xx xx xx xx xx xx |
Remarks | The IEEE of the parent node is a 64-bit address |