Introduction
------------
This sample Python application shows how to send data in the application layer
(explicit) format asynchronously to a remote Zigbee device using the XBee
Python Library. Transmitting data asynchronously means the execution is not
blocked during the transmit request, but you cannot determine if the data was
successfully sent.
The application sends data in the application layer (explicit) format to a
remote Zigbee device on the network with a specific node identifier (name).
NOTE: This example uses the Zigbee device (ZigBeeDevice) class, but it can
be applied to any other protocol specific device class that supports
sending data in explicit format.
Requirements
------------
To run this example you will need:
* At least two Zigbee radios in API mode and their corresponding carrier
board (XBIB or equivalent).
* The XCTU application (available at www.digi.com/xctu).
Compatible protocols
--------------------
* DigiMesh
* Point-to-Multipoint
* Zigbee
Example setup
-------------
1) Plug the Zigbee radios into the XBee adapters and connect them to your
computer's USB or serial ports.
2) Configure the remote Zigbee device with the Node Identifier used by the
example to communicate with it and to receive data in application layer
(explicit) format. To do so follow these steps:
1) Launch the XCTU application.
2) Add the remote Zigbee module to XCTU, specifying its port settings.
3) Once the module is added, open the 'Configuration' working mode,
look for the 'NI' setting and configure it with 'REMOTE'
(without quotes).
Notice that by default the 'NI' setting has a blank space
configured, make sure that there is not a blank space before the
'REMOTE' text.
4) Look for the 'AO' setting and configure it with '1' (without
quotes)
3) Ensure that the modules are in API mode and on the same network.
For further information on how to perform this task, read the
'Configuring Your XBee Modules' topic of the Getting Started guide.
4) Set the port and baud rate of the sender (local) Zigbee radio in the
sample file.
If you configured the modules in the previous step with XCTU, you will
see the port number and baud rate in the 'Port' label of the device
on the left view.
Running the example
-------------------
First, build the application. Then, you need to setup XCTU to see the data
received by the remote Zigbee device in explicit format. Follow these steps to
do so:
1) Launch the XCTU application.
2) Add the remote Zigbee module to XCTU, specifying its port settings.
3) Switch to the 'Consoles' working mode and open the serial connection
so you can see the data when it is received.
Finally, launch the sample application, data in explicit format is sent to
the configured remote Zigbee device whose Node Identifier is 'REMOTE'. When
that happens, a line with the result of the operation is printed to the
standard output:
Sending data asynchronously to 0013A20040XXXXXX [A0 - A1 - 1554 - 1234] >> 48 65 6C 6C 6F 20 58 42 65 65 21 | Hello XBee!... Success
- Where 0013A20040XXXXXX is the 64-bit address of the remote Zigbee device
whose Node Identifier is 'REMOTE'.
Verify that in the XCTU console a new Explicit Rx Indicator frame has been
received by the remote Zigbee device. Select it and review the details, some
of the details will be similar to:
- Start delimiter: 7E
- Length: 00 1D
- Frame type: 91
- 64-bit source address: The XBee sender's 64-bit address.
- 16-bit source address: The XBee sender's 16-bit address.
- Source endpoint: A0
- Destination endpoint: A1
- Cluster ID: 15 54
- Profile ID: 12 34
- Receive options: 01
- RF data/Received data: 48 65 6C 6C 6F 20 58 42 65 65 21
Hello XBee!
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共172个文件
py:107个
txt:59个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:digi-xbee-1.4.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
Python库 | digi-xbee-1.4.1.tar.gz (172个子文件)
setup.cfg 38B
MANIFEST.in 138B
PKG-INFO 3KB
PKG-INFO 3KB
devices.py 487KB
firmware.py 303KB
filesystem.py 128KB
common.py 102KB
filesystem.py 102KB
socket.py 102KB
profile.py 83KB
reader.py 74KB
zdo.py 57KB
raw.py 48KB
status.py 42KB
xmodem.py 42KB
zigbee.py 39KB
devicecloud.py 35KB
xsocket.py 34KB
filesystem.py 30KB
sender.py 26KB
wifi.py 25KB
base.py 23KB
io.py 21KB
address.py 19KB
network.py 18KB
options.py 18KB
digimesh.py 16KB
recovery.py 16KB
factory.py 15KB
protocol.py 15KB
TransferTest.py 14KB
cellular.py 13KB
message.py 13KB
relay.py 12KB
atcomm.py 12KB
utils.py 12KB
serial.py 11KB
mode.py 10KB
comm_interface.py 8KB
exportutils.py 8KB
exception.py 8KB
hw.py 7KB
accesspoint.py 6KB
info.py 6KB
aft.py 6KB
UploadDownloadFileSample.py 4KB
NetworkModificationsSample.py 4KB
RemoteFirmwareUpdateSample_TEST.py 4KB
UploadDownloadFileSample.py 3KB
ReceiveBluetoothFileSample.py 3KB
FormatFilesystemSample.py 3KB
ReadXBeeProfilesSample.py 3KB
LocalFirmwareUpdateSampleDevice.py 3KB
ConnectToAccessPointSample.py 3KB
setup.py 3KB
IOSamplingSample.py 3KB
ReceiveExplicitDataPollingSample.py 3KB
RemoteFirmwareUpdateSample.py 3KB
RemoteDIOSample.py 3KB
ReceiveExplicitDataSample.py 3KB
LocalFirmwareUpdateSamplePort.py 3KB
ManageCommonParametersSample.py 3KB
SetAndGetParametersSample.py 3KB
ListDirectorySample.py 3KB
RemoteFilesystemUpdateSample.py 2KB
ListDirectorySample.py 2KB
FormatFilesystemSample.py 2KB
ReadXBeeProfileSample.py 2KB
DiscoverDevicesSample.py 2KB
RemoteADCSample.py 2KB
ConnectToEchoServerSample.py 2KB
TestProtocol.py 2KB
SocketTCPServerSample.py 2KB
ApplyXBeeProfileRemoteSample_TEST.py 2KB
SocketUDPServerSample.py 2KB
LocalDIOSample.py 2KB
ApplyXBeeProfileRemoteSample.py 2KB
LocalFirmwareUpdateSample.py 2KB
SendExplicitDataAsyncSample.py 2KB
SendExplicitDataSample.py 2KB
SendUDPDataSample.py 2KB
SendIPDataSample.py 2KB
LocalADCSample.py 2KB
SocketTCPClientSample.py 2KB
SendUserDataRelaySample.py 2KB
ReceiveModemStatusSample.py 2KB
SendDataAsyncSample.py 2KB
SendDataSample.py 2KB
ApplyXBeeProfileSample.py 2KB
SendBluetoothDataSample.py 2KB
ApplyXBeeProfileSample_TEST.py 2KB
ReceiveIPDataSample.py 2KB
SendBroadcastExplicitDataSample.py 2KB
PCClient.py 2KB
SendMicroPythonDataSample.py 2KB
RecoverSerialConnection.py 2KB
ReceiveUserDataRelaySample.py 2KB
ReceiveDataPollingSample.py 2KB
ReceiveMicroPythonDataSample.py 2KB
共 172 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功