3) Skonfiguruj Koordynatora
- Start with the XBee ZigBee Coordinator AT radio you configured (read more about how to do that here) and mark it with an “A.”
- Insert the XBee into the XBee Explorer and connect it to your computer with a USB cable.
- If you don’t already have a terminal program that you prefer to use, download CoolTerm by Roger Meier. We recommend CoolTerm because it works on Windows, Mac, and Linux. Not only that, but it’s also free!
Zauważyć: To use the XBee Explorer, you may need to install FTDI drivers onto your computer, which will let your computer talk via serial to the board. Click here to download the drivers for your operating system.
- Open CoolTerm and click “Options”
- Choose the serial port that starts with “usbserial…” If you’re not sure which serial port to select, look at the list of available ports and then disconnect the XBee Explorer from your computer. Click “Re-Scan Serial Ports” and check which serial port disappeared. Reconnect your XBee Explorer, click “Re-Scan Serial Ports” and choose that port.
- Be sure Baudrate is set to 9600.
- Be sure Data Bits is set to 8.
- Be sure Parity is set to “none.”
- Be sure Stop Bits is set to 1.
- In the list on the left side of the options window, click “Terminal.”
- Be sure “Local Echo” is activated. This will allow you to see what you’re typing into the terminal.
- Click OK to save those settings and close the Options window.
- Click “Connect” on the toolbar.
- You should see “Connected” on the status bar at the bottom of the window.
- Type “+++” to enter command mode. You should see the reply “OK.”
- Here’s a chart of the commands settings we’re going to set:
- Type in each command followed by its parameter and hit enter.
- You can verify the setting by typing the command without a parameter.
- Your settings aren’t saved yet! Type ATWR to save the settings.
- Here’s how the terminal session might look, starting with the “+++” to enter command mode.
Zauważyć: By default, the XBee will automatically leave command mode if it does not receive any commands in a 10 second period.
|PAN ID||ATID||2001 (any address from 0 to FFFE will do)|
|Destination address high||ATDH||0013A200|
|Destination address low||ATDL||[see your recorded Router Address]|
+++ OK ATID 2001 OK ATDH 0013A300 OK ATDL 403B9E21 OK ATID 2001 ATDH 13A300 ATDL 403B9E21 ATWR OK
Zauważyć: You should get an OK response after issuing each command to set parameters, and another OK response when you write the changes to firmware. If you don’t get an OK response, most likely you took more than ten seconds to issue the command and you’ve dropped out of command mode. This can happen quite frequently when you’re starting out, but you’ll get better at it as you go along. The other common mistake is not issuing the ATWR command to save your changes, then losing your configuration when the radio is powered down.