This retrieves serial number of the controller ( 01020304050607 in this case). It works, and I get some response to my command: $. nd("at", frame='A', command='MY', parameter=None) Zbee = ZigBee(serial_port, callback=print_data) Serial_port=serial.Serial('/dev/ttyUSB0', 9600) I found python xbee and wrote a simple python script to communicate with the USB stick: #!/usr/bin/python ![]() ![]() First, we are going to ask the XBee module for it current. Steps to Configuration the XBee While in the CoolTerm App. We will assign an XBee as 'a', and the other as 'b'. We are going to configure each XBee module one at a time. In other words, I am looking for the way to configure mesh network and to communicate with sensors/actuators. Test XBee Modules Since two XBee modules are required, and each Xbee module need to have it own configuration data. All rights reserved.I would like to use Digi XStick2 ZB (connected via USB and visible as serial interface on /dev/ttyUSB0) as a ZigBee controller for a bunch of ZigBee sensors and actuators (temperature and humidity, contact sensor, water leakage, power plug.). Test XBee Modules Since two XBee modules are required, and each Xbee module need to have it own configuration data. Reset the XBee unit if not supporting AT mode Use XBee Explorer (USB adapter) to initialize XBee. The following video demonstrates how to send messages with the XCTU console: Download CoolTerm for AT command mode Ensure XBee AT mode. For example, if XBee 1 has a MY address of 0x1234, and XBee 2 has an equivalent destination address of 0x1234, then XBee 2 can send data to XBee 1. You can also open the console of RECEIVER_2 and see that the messages are being received. You will see that its red RSSI LED also blinks every second because it has successfully joined the network. You can also open the console of RECEIVER_1 and see that the messages are being received. This means that the module is successfully receiving the messages. You will see that the red RSSI LED of the board where RECEIVER_1 is attached blinks every second. To start sending this message every second, in the Send sequence box:.Add a new packet with the message "Hello!".The background changes to green to indicate that the connection is open. Open the serial connection of the radio module: Select the XBee in the Radio Modules section, and click the Open serial connection button.If SENDER is not already there, add it to XCTU so it is listed in the Radio Modules list.XCTU loads a list of consoles in the working area-one for each module of the devices list, sorted in a tabbed format. There are 8 different baud rates you can set it to. This working mode of XCTU allows you to communicate with the radio modules in the devices list. XBee: +++ (Puts XBee into command mode for configuring) ATRE (Resets the XBee to the factory settings) ATBD5 (Sets the Baud Rate to 38400, ie. To send broadcast messages, open XCTU if it is not already running on the computer where SENDER is connected. Here is an easy way to capture the Arduino serial monitor output as a text file, link the file to Excel, and configure Excel to refresh the connection automatically without additional user intervention.Before sending messages between the modules, disconnect RECEIVER_2.Use the XCTU console or any serial port terminal application such as CoolTerm or TeraTerm (for Windows only) to configure SENDER to send a broadcast message every second.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |