XBEE模块API帧说明

合集下载

Xbee3 ZigBee模块组网和通信测试

Xbee3 ZigBee模块组网和通信测试

XBee3 ZigBee组网和通信测试本文介绍下xbee3zigbee模块组网和通信测试的过程以及参数设置。

首先,确保您的电脑上已经安装好Digi的开发工具XCTU,请下载对应您的电脑操作系统的最新版本。

将两个Digi的XBee ZigBee模块通过开发底板和电脑连接起来,打开XCTU,用左上角的带有放大镜图标的查找按钮来查询连接到电脑上的模块,并把它添加到XCTU左侧的无线模块列表中。

在XCTU软件中,默认是位于配置窗口中,点击左边模块,便会读取模块相关的参数,在配置窗口中展现出来。

XCTU的参数区域的上方,有一排常用的按钮,分别是读取(read),写入(write)参数,加载默认参数(default),升级固件(update),配置导入导出(profile)。

首次使用,建议用Update按钮更新一下到最新固件,在firmware version中选择最上方最新的固件,确定是ZigBee协议的固件,去掉“强制模块保留当前配置”的选项,然后点update按钮。

这样就恢复模块到出厂的设置。

如果您的模块已经是最新固件,请用参数区上方的“Default”按钮加载模块的默认参数,并按“Write”写入模块,使模块恢复出厂的配置,确保不会因为之前使用时的不恰当参数影响通信效果。

写入默认值后,再按“Read”按钮重新加载一下参数到XCTU右侧的参数栏上。

点击左侧另一个模块,用同样的方式恢复一下模块的出厂设置。

在配置模式下,如果仅对某个参数进行读取和写入,可以使用对应参数右方的刷新和写入按钮。

两个ZigBee模块要相互通信,必须在同一个网络中,所以我们需要将一个模块配置成协调器,另一个模块配置成路由器并加入到协调器的网络中。

注意模块默认的NJ为254S,所以在5份钟内会关闭允许加入,为了避免加入窗口被关闭,可以把NJ改为FF,也就是永远允许加入。

以下两个模块简称A和B。

A模块:CE=1 配置为协调器,DL=FFFF,NJ=FFFFB模块:不改任何参数将A模块的CE改为1,就把模块配置成协调器了,这时模块会生成一个网络号为ID指定值的ZigBee网络,默认ID=0,因此协调器会生成一个随机64bit的网络号的ZigBee网络。

Xbee模块API指令技术文档(第1版by宋涛).doc

Xbee模块API指令技术文档(第1版by宋涛).doc

Xbee模块API指令技术文档——by 宋涛2008-11-19参数和固件烧录:xbee模块使用API指令必须先将Module烧录入API参数和固件(另一种为AT,在AT指令时烧录)。

方法为在X-CTU软件的Modem Configuration 选项卡内的Modem项选中XB24-B,Fuction Set 内选中Znet 2.5 Coordinator API或者Znet 2.5 Router/End Device API选项(根据该module 要扮演的角色决定,在烧录AT情况下,选择类似的选项。

),Version选项不用选择,会自动调整。

然后在Modem Parameters and Firmware下点击write进行烧录。

强烈建议在write前先勾选中always update firmware选项。

注意:1.烧录完成前,如是模块状态是AT指令状态下,不能先勾选上PC settings里面的Enable API。

如果模块状态是API指令状态下,必须先勾选上PC settings里面的Enable API。

否则,烧录会失败。

2.烧录完成后,如果PC settings里面的Enable API项没有选中,必须勾选上,如果要使用逃脱字,则需要勾选上ATAP=2项。

3.当前烧录版本是针对当前实验室版本,如果版本变化,烧录过程会有部分调整。

4.Modem Configuration里面Read为读取当前module参数状况,主要用于调试中网络不通时,检查modules之间参数设置是否正确时使用。

Restore为重置module的状态为最近一次烧录入firmware后的初始状态。

API Operations:注意:1.xbee目前的各个版本之间的API Operation是有区别的,该文档以Znet2.5版本为准。

2.该文档对API Operation的讲述以在实验过程中常遇到的指令为主,若本文档中未包含的API frame,请参见《XBee™ ZNet 2.5/XBee-PRO™ ZNet 2.5 OEM RF Modules》。

XBee 900M HP模块S3B调试文档

XBee 900M HP模块S3B调试文档

XBee 900M HP模块S3B调试文档(DM点对点设置)/support/utilities/40003002_C.exe新版XCTU 下载地址:XCTU v. 6.2.0, Windows x86/x64/support/utilities/40003026_C.exe硬件:XBee PRO S3B 900M HP固件:Digi Meshe Version:8071点对点设置:BD波特率(6-57600) DH,DL目标地址对应目标SH,SLHP和ID为点对点设置可选项,只需配对模块HP/ID保持一致即可。

出厂默认串口参数 9600 8 N 1Test/Query 模块参数Modem Configuration界面Read读取模块默认配置设置模块BD波特率,DH,DH对应目标地址,(HP/ID可选项)设置完成后Write保存写入参数以57600波特率再次读取参数,确认设置OK配对模块(COM 17)同样方式读取默认配置,设置参数.设置DH/DL(目标模块SH/SL)及BD波特率57600检查Write后以57600 8 N 1读取模块参数读取配对模块参数设置,确认DH/DH互指,确认BD波特率.Terminal界面对发数据确认互通Range Test界面生成128butes测试数据包,对发测试Start开始对发测试Stope停止收发测试,确认丢包率及通信质量,信号强度RSSI可勾选参考.新版XCTU6.2.0Add添加XBee模块COM3模块波特率BD已设置为57600,(出厂默认9600)COM3模块添加完成重新打开XCTU 6.2.0添加COM 17XBee模块左侧点击模块图标,即可右侧显示模块参数,已更改的参数为蓝条,如DH/DL,及BD值.点击插头状图标,连接串口数据对发测试生成数据包,发包测试测试结果Tx Rx数据统计自动发送设置,发送间隔,发送数量设置.。

DIGI XBEE RPO模块API帧说明

DIGI XBEE RPO模块API帧说明

DIGI XBEE RPO模块API帧说明注明1:[1]到[6]需测试XBEE PRO模块验证其结果。

[1]发送选项0x08不被支持。

[2]发送API帧,最大RF数据负载不是72字节,由A T指令中NP命令查看。

[3]64bit目标地址可以设为0,作为协调器地址。

[4]最大广播半径是32。

[5]在节点识别指示器(0x95)中,A T指令中NO命令可以被用包含DD参数。

[6]14)节点识别指示器帧的结构需确定。

注明2:nBytes代表字段的大小是可变的。

注明3:API帧中的转义字符(Escape Characters),AT指令中AP命令参数等于2时。

UART帧的收发就需要注意以下方面:当发出或者到一个串口的数据帧时,特殊数据值必须进行转义,这样的帧就不会与数据帧序列干扰。

为了转义干扰数据字节,插入0x7D,其后的字节与0x20异或。

需要转义的数据字节有:0x7E,0x7D,0x11,0x13。

转义字符不参于检验和运算。

DIGI XBEE RPO模块API不同类型帧的详细说明:API Frame Names ValuesModem Status 0x8AAT Command0x08AT Command - Queue Parameter Value 0x09AT Command Response 0x88Remote Command Request 0x17Remote Command Response 0x97ZigBee Transmit Request 0x10Explicit Addressing ZigBee Command Frame0x11ZigBee Transmit Status 0x8BZigBee Receive Packet (AO=0) 0x90ZigBee Explicit Rx Indicator (AO=1) 0x91ZigBee IO Data Sample Rx Indicator0x92XBee Sensor Read Indicator (AO=0) 0x94Node Identification Indicator (AO=0) 0x951)MODEM状态帧(RF模块状态信息从模块发出)(什么条件产生此帧)API标志符:0x8AAPI帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x8A(1Byte)Identifier specific Data(1Byte)---返回modem具体状态0=Hardware reset1=Watchdog timer reset2=Associated3=Disassociated4=Synchronization lost(Beacon-enabled only)5=Coordinator realignment6=coordinator startedChecksum:0xFF-( Frame Data各个元素的和)(1Bytes)返回头部2)AT命令帧(使用API帧允许对所有模块参数寄存器进行查询或者设定)API标志符:0x08API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x08(1Byte)Identifier specific Data(n Bytes)---[Frame ID] + [AT command] + [Parameter Value] [Frame ID]:1Byte, Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no response is sent.[AT command]:2 Bytes, Command Name - Two ASCII characters that identify the AT Command.[Parameter Value]:n Bytes, If present, indicates the requested parametevalue to set theGiven register.If no characters present, register is queried.Checksum:0xFF-( Frame Data各个元素的和)(1Bytes)返回头部3)AT命令-队列参数值帧(使用API帧允许模块参数可以被排列或者设定)(相对“AT命令”类型,新的参数被排队而不被应用,直到“AT命令”类型,或者AC命令发出).API标志符:0x09API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x09(1Byte)Identifier specific Data(n Bytes)---[Frame ID] + [AT command] + [Parameter Value] [Frame ID]:1Byte, Identifies the UART data frame for the host to correlate with a subsequent ACK(ackno wledgement).If set to ‘0’, no response is sent.[AT command]:2Bytes, Command Name - Two ASCII characters that identify the AT Command. [Parameter Value]:n Bytes,If present, indicates the requested parametevalue to set the given register.If no characters present, register is queried.返回头部4)AT命令反馈帧(对AT命令的反馈,一些命令将会反馈多个帧)API标志符:0x88API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x88(1Byte)Identifier specific Data(n Bytes)---[ Frame ID]+[ AT Command]+[ Status]+[ Value][Frame ID]: 1Byte,Identifies the UART data frame being reported.Note: If Frame ID = 0 inAT Command Mode, no AT Command Response will be given.[ATCommand]:2Bytes,Command Name -Two ASCII characters that identify the AT Command. [Status]:1Byte0 = OK1 = ERROR2 = Invalid Command3 = Invalid Parameter[Value]: nByte,The HEX (non-ASCII) value of the requested register.返回头部5)远程AT命令请求帧(允许远程对模块参数寄存器进行查询或者设定)API标志符:0x17API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x17(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [64-bit-Destination-Address] + [16-bit DestinationNetwork Address] + [Command Options] + [Command Name]+[Command Data] [FrameID]: 1Byte,Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no AT Command Response will be given.[64-bit-Destination-Address]:8Bytes,Set to match the 64-bit address of the destination, MSB first,LSB last. Broadcast =0x000000000000FFFF.[16-bit-Destination-Network-Address]:2Bytes,Set to match the 16-bit network address of the destination, MSBfirst, LSB last. Set to 0xFFFE for broadcast TX, or if the networkaddress is unknown.[Command Options]: 1Byte,0x02 - Apply changes on remote. (If not set, AC command must be Sent before changes will take effect.)All other bits must be set to 0.[Command Name]:2Bytes, Name of the command[Command Data]: nBytes,If present, indicates the requested parameter value to set the given register. If no characters present,the register is queried.返回头部6)远程命令反馈(相对于远程AT命令请求)API标志符:0x97API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x97(1Byte)Identifier specific Data(n Bytes)---[Frame ID] + [64-bit Responder Address] + [16-bit Responder Network Address] + [AT Command]+[Status] + [Value][Frame ID]: 1Byte, Identifies the UART data frame being reported.Matches the Frame ID of the Remote Command Request the remote is responding to.[64-bit Responder Address]: 8Bytes,Indicates the 64-bit address of the remote module that is responding to the Remote A T Command request[16-bit Responder Network Address]: 2Bytes,Set to the 16-bit network address of the remote.Set to 0xFFFE if unknown.[AT Command]:2Bytes,Command Name -Two ASCII characters that identify the AT Command. [Status]:1Byte0 = OK1 = ERROR2 = Invalid Command3 = Invalid Parameter[Value]: n Bytes,The HEX (non-ASCII) value of the requested register.返回头部7)Zigbee发送请求帧(TX请求消息将使模块发出RF包)TX包帧API标志符:0x10API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x10(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [64-bit-Destination-Address] + [16-bit DestinationNetwork Address] + [Broadcast Radius] + [Options] + [ RF Data][FrameID]: 1Byte,Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no AT Command Response will be given.[64-bit-Destination-Address]:8Bytes,Set to match the 64-bit address of the destination, MSB first,LSB last. Broadcast =0x000000000000FFFF.[16-bit-Destination-Network-Address]:2Bytes,Set to match the 16-bit network address of the destination, MSBfirst, LSB last. Set to 0xFFFE for broadcast TX, or if the networkaddress is unknown.[Broadcast Radius]: 1Byte, Sets maximum number of hops a braodcast transmission can traverse. If set to 0, the TX raidus will be set to the maximum hop value (10).[Options]:1Bytes, 0x08 =Send multicast transmission. (Unicast set if not sent.) All other bits Must be set to 0.[RF Data]: nBytes, Up to 72 Bytes per packet返回头部8) Explicit Addressing ZigBee命令帧(帧中允许应用层区域“终端和簇ID”被指定)API标志符:0x11API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x11(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [64-bit-Destination-Address] + [16-bit DestinationNetwork Address] + [Source endpoint] + [Destination endpoint] + [Cluster ID] + [Profile ID] +[Broadcast Radius]+ [Options] + [RF Data][FrameID]: 1Byte,Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no AT Command Response will be given.[64-bit-Destination-Address]:8Bytes,Set to match the 64-bit address of the destination, MSB first,LSB last. Broadcast =0x000000000000FFFF.[16-bit-Destination-Network-Address]:2Bytes,Set to match the 16-bit network address of the destination, MSBfirst, LSB last. Set to 0xFFFE for broadcast TX, or if the networkaddress is unknown.[Source endpoint]: 1Byte,Source endpoint for the transmission.[Destination endpoint]: 1Byte, Destination endpoint for the transmission.[Cluster ID]:2 Bytes,Cluster ID used in the transmission[Profile ID]:2 Bytes, Profile ID used in the transmission[Broadcast Radius]: 1Byte, Sets the maximum number of hops a broadcast transmissioncan traverse. If set to 0, the transmission radius will be set tothe network maximum hops value. [Options]:1Bytes, Set to 0[RF Data]: nBytes, RF data size must be less than oequal to the maximum number ofRF data bytes (NP command).返回头部9)ZigBee发送状态帧(TX状态帧,TX请求完成时,模块会发出状态信息,这个信息将给出数据包是否被成功发送,或者发送失败)API标志符:0x8BAPI帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x8B(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [Remote Network Address]+ [Transmit Retry Count] + [Delivery Status] + [Discovery Status][FrameID]:1Byte, Identifies UART data frame being reported.[Remote Network Address]: 2Byte, 16-bit Network Address the packet was delivered to(if success). If not success, this address matches the Destination Network Address that was provided in the Transmit Request Frame.[Transmit Retry Count]: 1Byte, The number of applicationtransmission retries that took place. [Delivery Status]: 1Byte,0x00 = Success0x02 = CCA Failure?0x15 = Invalid destination endpoint0x21 = Network ACK Failure0x22 = Not Joined to Network0x23 = Self-addressed0x24 = Address Not Found0x25 = Route Not Found[Discovery Status]: 1Byte,0x00 = No Discovery Overhead0x01 = Address Discovery0x02 = Route Discovery0x03 = Address and Route Discovery返回头部10)ZigBee接收帧(RX包帧,模块收到RF包时,将把RF信息发出到UART)API标志符:0x90API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x90(1Byte)Identifier specific Data(n Bytes)---[64-bit Address] + [16-bit Network Address]+ [Options] + [RF Data][64-bit Address]:8Bytes[16-bit Network Address]:2 Bytes[Options]:1Byte,0x01 - Packet Acknowledged0x02 - Packet was a broadcast packet[RF Data]:nBytes, Up to 72 Bytes per packet返回头部11) ZigBee Explicit RX指示器帧(模块收到RF包时,将把RF 信息发到UART,AO=1)API标志符:0x91API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x91(1Byte)Identifier specific Data(n Bytes)---[64-bit Source Address] + [16-bit Source Network Address]+ [Source endpoint] + [Destination endpoint] + [Cluster ID] + [Profile ID] + [BroadcastRadius] + [Options] + [RF Data][64-bit Source Address]:8Bytes,[16-bit Source Network Address]:2Bytes,[Source endpoint]: 1Byte,Source endpoint for the transmission.[Destination endpoint]: 1Byte, Destination endpoint for the transmission.[Cluster ID]:2 Bytes, Cluster ID the packet was addressed to.[Profile ID]:2 Bytes, Profile ID the packet was addressed to. (Multiple profile IDsnot yet supported.)[Broadcast Radius]: 1Byte, Sets the maximum number of hops a broadcast transmissioncan traverse. If set to 0, the transmission radius will be set tothe network maximum hops value. [Options]:1Bytes,0x01 – Packet Acknowledged0x02 – Packet was a broadcast packet[RF Data]: nBytes, RF data size must be less than equal to the maximum number ofRF data bytes (NP command).返回头部12) ZigBee IO数据采样Rx指示器帧(模块从远程设备收到I/O采样帧时,会将数据帧发出到串口)API标志符:0x92API帧的结构:Start identifier Frame Data Length Frame Data ChecksumAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x92(1Byte)Identifier specific Data(nBytes)---[64-bit Address] + [16-bit Network Address] + [Receive Options] + [Num Samples] + [Digital Channel Mask] + [Analog Channel Mask] + [Digital Samples] + [Analog Samples][64-bit Address]:8Bytes,[16-bit Network Address]:2Bytes,[Receive Options]:1Byte,0x01 - Packet Acknowledged0x02 - Packet was a broadcast packet[Num Samples]:1Byte,Number of sample sets included in the payload. (Always set to 1) [Digital Channel Mask]:2Bytes,Bitmask field that indicates which digital IO lines on the remote have sampling enabled(if any)[Analog Channel Mask]:1Byte, Bitmask field that indicates which Analog IO lines on the remote have sampling enabled (if any).[Digital Samples]:2Bytes, If the sample set includes any digital IO lines (Digital Channel Mask > 0), these two bytes contain samples for all enabled digital inputs. DIO lines that do not have sampling enabled return 0. Bits in these 2 bytes map the same as they do in the Digital Channels Mask field.[Analog Samples]: 2 bytes each sample, If the sample set includes any analog input lines (Analog Channel Mask > 0), each enabled analog input returns a 2-byte value indicating the A/D measurement of that input. Analog samples are ordered sequentially from AD0/DIO0 to AD3/DIO3, to the supply voltage.返回头部13)XBee传感器读取指示器帧(暂不)14)节点识别指示器帧(当模块发送节点信息给协调器以标志它自己时,协调将收到这个帧.“AO=0”.这个帧的数据部分与节点发现反馈帧相似.“AT指令中的ND命令”)(帧的结构需通过模块验证)余锡钱,09-08-28整理DIGI XBEE RPO模块重要的AT命令说明(调试过程中验证):API帧测试//首先使能API参数,1 or 2//传递数值数据字节存储顺序//转义字符//网络地址会变化的//2009-09-10开始模块调试1>API(AT "NJ" command frame)Create an API AT command frame to configure an XBee to allow joining (set NJ to 0xFF).frame:0x7E 0x00 0x05 0x08 0x01 0x4E 0x4A 0xFF 0x5F [Frame ID]+[AT Command]+[Status]+[ Value]test:7E 00 05 08 01 4E 4A FF 5F "NJ"7E 00 05 88 01 4E 4A 00 DE//测试此命令时为无效指令7E 00 04 08 01 4E 50 58 "NP"7E 00 05 88 01 4E 50 02 D67E 00 04 08 01 4E 49 5F "NI获取"7E 00 06 08 01 4E 49 59 55 B1 "NI设置"//API "ND"命令获取其他模块的信息7E 00 04 08 01 4E 44 64 "ND"7E 00 19 88 01 4E 44 00 00 00 00 13 A2 00 40 30 14 C0 20 00 FF FE 00 00 C1 05 10 1E DA7E 00 19 88 01 4E 44 00 1A 04 00 13 A2 00 40 30 14 BD 20 00 FF FE 01 00 C1 05 10 1E BE7E 00 19 88 01 4E 44 00 3F B4 00 13 A2 00 40 30 14 B0 20 00 FF FE 01 00 C1 05 10 1E F6{0x7E,0x00,0x04,0x08,0x01,0x4E,0x44,0x64};//加入一个新节点时,其它模块都会收这样的帧(识别帧)7E 00 20 95 00 13 A2 00 40 30 14 BD 1A 04 02 1A 04 00 13 A2 00 40 30 14 BD 20 00 FF FE 01 03 C1 05 10 1E 2BWhere 0x0005 = length0x08 = AT Command API frame type0x01 = Frame ID (set to non-zero value)0x4E4A = AT Command ('NJ')0xFF = value to set command to0x5F = ChecksumThe checksum is calculated as [0xFF-(0x08 + 0x01 + 0x4E + 0x4A + 0xFF)]模块状态7E 00 02 8A 00 757E 00 02 8A 06 6F7E00028A00757E00028A066F节点发现指示信息7E 00 20 95 00 13 A2 00 40 30 14 B0 3F B4 02 3F B4 00 13 A2 00 40 30 14 B0 20 00 FF FE 01 03 C1 05 10 1E 9B7E 00 20 95 00 13 A2 00 40 30 14 BD 1A 04 02 1A 04 00 13 A2 00 40 30 14 BD 20 00 FF FE 01 02 C1 05 10 1E 2C2>Send a transmission to a module withdestination address 0x0013A200 40014011(change value),payload "TxData1B".If escaping is disabled, (AP=1),the frame should look like:frame:0x7E 0x00 0x16 0x10 0x01 0x00 0x13 0xA2 0x00 0x40 0x0A0x01 0x27 0xFF0xFE 0x00 0x00 0x54 0x78 0x44 0x61 0x74 0x61 0x30 0x410x13test:7E 00 16 10 01 00 13 A2 00 40 0A 01 27 FF FE 00 00 54 78 44 61 74 61 30 41 13 //网络地址不知的7E 00 16 10 01 00 13 A2 00 40 30 14 BD FF FE 00 00 54 78 44 61 74 61 30 41 44//API帧发送状态结构[FrameID] + [Remote Network Address]+ [Transmit Retry Count] + [Delivery Status] + [Discovery Status]//API帧发送状态7E 00 07 8B 01 00 00 00 00 01 727E 00 07 8B 01 00 00 00 00 00 73[FrameID]+[64-bit-Destination-Address]+[16-bit DestinationNetworkAddress]+[Broadcast Radius]+[Options]+[RF Data]//[Options]值的不同不影响帧的发送7E 00 16 10 01 00 00 00 00 00 00 FF FF 7E 6C 00 00 54 78 44 61 74 61 30 41 4F //物理地址不知的7E 00 16 10 01 00 00 00 00 00 00 FF FF 1A 04 00 08 54 78 44 61 74 61 30 41 137E 00 07 8B 01 1A 04 00 00 00 55 //API帧的发送状态7E 00 14 90 00 13 A2 00 40 30 14 BD 5C 64 54 78 44 61 74 61 30 41 A3 //接收到RF的帧7E 00 16 10 01 00 13 A2 00 40 30 14 BD 5C 64 00 00 54 78 44 61 74 61 30 41 81 //物理地址和网络地址都知的情况7E 00 07 8B 01 1A 04 00 00 00 557E 00 16 10 01 00 13 A2 00 40 30 14 B0 3F B4 00 00 54 78 44 61 74 61 30 41 5B 7E 00 16 10 01 00 13 A2 00 40 30 14 BD 5C 64 00 00 54 78 44 61 74 61 30 41 81Where 0x16 = length (22 bytes excluding checksum)0x10 = ZigBee Transmit Request API frame type0x01 = Frame ID (set to non-zero value)0x0013A200400A0127 = 64-bit Destination Address0x0013A200403014B00xFFFE = 16-bit Destination Address0x00 = Broadcast radius0x00 = Options0x5478446174613041 = Data payload ("TxData0A")0x13 = ChecksumIf escaping is enabled (AP=2),the frame should look like:frame:0x7E 0x00 0x16 0x10 0x01 0x00 0x7D 0x33 0xA2 0x00 0x400x0A 0x01 0x270xFF 0xFE 0x00 0x00 0x54 0x78 0x44 0x61 0x74 0x61 0x300x41 0x7D 0x33The checksum is calculated (on all non-escaped bytes)as [0xFF - (sum of all bytes from API frametype through data payload)].3>固件的不同标识符02,看看测试的效果7E 0010 0222 0013A2004002288C 0001 00 414238 74(校验码)4>Send a transmission to the coordinator without specifying the coordinator's 64-bit address. The API transmit request frame should look like:frame:0x7E 0x00 0x16 0x10 0x01 0x00 0x00 0x00 0x00 0x00 0x000x00 0x00 0xFF 0xFE 0x000x00 0x54 0x78 0x32 0x43 0x6F 0x6F 0x72 0x64 0xFCtest:7E 00 16 10 01 00 00 00 00 00 00 00 00 FF FE 00 00 54 78 32 43 6F 6F 72 64 FC Where 0x16 = length (22 bytes excluding checksum)0x10 = ZigBee Transmit Request API frame type0x01 = Frame ID (set to non-zero value)0x0000000000000000 = Coordinator's address (can be replaced with coordinator's actual 64-bit address if known0xFFFE = 16-bit Destination Address0x00 = Broadcast radius0x00 = Options0x547832436F6F7264 = Data payload ("Tx2Coord")0xFC = Checksum5>Send an ND command to discover the devices in the PAN.The frame should look like:frmae:0x7E 0x00 0x04 0x08 0x01 0x4E 0x44 0x64test:7E 00 04 08 01 4E 44 64Where 0x0004 = length0x08 = AT Command API frame type0x01 = Frame ID (set to non-zero value)0x4E44 = AT command ('ND')0x64 = ChecksumThe checksum is calculated as [0xFF-(0x08 + 0x01 + 0x4E + 0x44)]6>Send a remote command to the coordinator to set AD1/DIO1 as a digital input (D1=3) and apply changes to force the IO update.The API remote command frame should look like:[FrameID] + [64-bit-Destination-Address] + [16-bit DestinationNetwork Address]+ [Command Options] + [Command Name]+[Command Data]frmae:0x7E 0x00 0x10 0x17 0x01 0x00 0x00 0x00 0x00 0x00 0x000x00 0x00 0xFF 0xFE 0x020x44 0x31 0x03 0x70test:7E 00 10 17 01 00 00 00 00 00 00 00 00 FF FE 02 44 31 03 707E 00 0F 97 01 0013A200403014C0 0000 4431 00 F97E 00 10 17 01 00 13 A2 00 40 30 14 BD 1A 04 4E 49 59 54 8F //远端的"NI"命令7E 00 07 8B 01 04 4E 00 2B 01 F5 //远端"NI"命令的返回信息//NEW "ND"7E 00 19 88 01 4E 44 00 3F B4 00 13 A2 00 40 30 14 B0 20 00 FF FE 01 00 C1 0510 1E F67E 00 19 88 01 4E 44 00 00 FC 00 13 A2 00 40 30 14 BD 20 00 FF FE 01 00 C1 05 10 1E E0Where 0x10 = length (16 bytes excluding checksum)0x17 = Remote Command API frame type0x01 = Frame ID0x0000000000000000 = Coordinator's address (can be replaced with coordinator's actual 64-bit address if known)0xFFFE = 16- bit Destination Address0x02 = Apply Changes (Remote Command Options)0x4431 = AT command ('D1')0x03 = Command Parameter (the parameter could also be sent as 0x0003 or0x00000003)0x70 = Checksum。

Arduino_Xbee传感器扩展板用户使用手册

Arduino_Xbee传感器扩展板用户使用手册

Online store: Skype :jessicadong6用户使用手册Arduino是一款开源的控制板,此模块是一块兼容Arduino的传感器扩展板,不仅扩展了Arduino板上的数字/模拟口、IIC接口、SPI接口等现有接口,而且还扩展有RS485接口、SD卡模块接口、Xbee/Bluetooh Bee蓝牙无线数传接口和APC220/Bluetooh V3 蓝牙无线数传接口,能使大部分传感器轻松地和Arduino控制板连接。

希望为爱好Arduino电子制作的朋友省去一些麻烦。

模块功能使用图:此模块板兼容的Arduino控制板型号有:Arduino UNOArduino DuemilanoveArduino Mega 1280/2560Online store: Skype :jessicadong6它的一些功能使用见下面各图,均可提供Arduino C语言代码。

1、扩展的IIC接口可用于Arduino与有IIC接口的器件通信,如支持IIC LCD显示模块。

测试用的是IIC/SPI转串口芯片M1172扩展板:2、兼容SD卡存储模块Online store: Skype :jessicadong6写入代码实现对SD卡的读写功能。

3、兼容XBEE/Buletooh Bee蓝牙无线模块Online store: Skype :jessicadong6直接兼容XBEE无线模块,省去了一个Xbee底座同样兼容蓝牙无线模块4、兼容APC220/Bluetooh V3蓝牙无线模块Online store: Skype :jessicadong65、扩展有RS485接口可实现两块板间的通信。

6、扩展板上的其它IO扩展口可根据需要做相应的使用Online store: Skype :jessicadong6 如作为舵机接口。

zigbee技术XBEE模块使用说明书

zigbee技术XBEE模块使用说明书

XBee和XBee - PRO OEM RF模块的设计,以ZigBee协议内运作,支持低成本的独特需求,低功耗无线传感器网络工程。

模块只需要最小的功率,就能提供远程设备之间的数据传输的可靠性。

这两个模块内运作的ISM 2.4 GHz频段,且引脚对引脚相互兼容。

1.1 主要特点先进的网络和安全重试和确认。

DSSS(直接序列扩频)每一个序列频道,可使用超过65000个唯一的网络地址点至点,点对点,点对多点和点对点的对等拓扑支撑自行安排,自我修复和故障容错网络易于使用没有配置必要的外箱射频通信AT和API命令模式配置模块参数小尺寸广泛的命令集免费的X - CTU软件(测试和配置软件)免费及无限技术支持1.1.1. 全球认证FCC认证(美国)参见附录A [p34要求]。

系统包含的XBee / XBee-PRO射频模块继承MaxStream的认证。

ISM(工业,科学和医疗)2.4吉赫频带的ISO 9001:2000认证机构认证下制造的注册标准的XBee / XBee-PRO射频模块列表被优化用于在美国,加拿大,澳大利亚,以色列和欧洲。

1.2.描述表1-01,XBee/XBee‐PRO OEM RF 模块(简述)当在欧洲运用时:XBee - PRO RF模块必须被配置为运行在一个最大发射功率为10 dBm的输出水平。

电源输出级别设置使用PL 命令。

PL参数必须等于“0”(10 dBm)。

此外,欧洲法规规定,EIRP最高功率为12.86 dBm的(19毫瓦),对于XBee – PRO的12.11 dBm和XBee时高增益天线天线选项:指定的范围内使用时是典型的集成块(1.5 dBi的)和偶极子(2.1 dBi的)天线。

该芯片天线选项提供要素优势,它的形式,但它通常会产生更短的选择范围比带和偶极子天线发射时,在户外。

1.3.机械尺寸图1 - 01 XBee / XBee - PRO OEM RF模块的机械尺寸(天线选项未显示)The XBee and XBee‐PRO RF Modules are pin‐for‐pin compatible.XBee和XBee - 专业射频模块的引脚- 为- 引脚兼容。

XBee中文说明

XBee中文说明

X B e e Z N e t2.5射频模块用户手册翻译济南鑫银博郭雷1.概述XBee/XBee-Pro ZNet2.5 OEM(以前所说的2代与2代Pro)被设计成运行在ZigBee协议下,支持低成本,低功耗的无线传感器网络.这些模块只需要很少的电源,就提供了远程设备间可靠的数据传递.这些模块运行在ISM 2.4GHz频率下,并能兼容:XBee RS-232适配器XBee RS-232 PH(能源采集)适配器XBee RS-485适配器XBee模拟I/O适配器XBee数字I/O适配器XBee传感器适配器XBee USB适配器ConnectPort X系列网关XBee Wall 路由1.1关键词高性能,低成本l室内:300英尺(100M)l室外可视:1英里(1.6KM)l发射功率输出:100mW(20dBm)EIRP l接收敏感度:-102dBml射频速率:250Kbps 低功耗XBee Pro ZNet2.5l发射电流:295mA(@3.3V) l接收电流:45mA(@3.3V) l关机电流:<1μA@25℃先进的网络与安全性l确认与重传机制l DSSS直序扩频l每个指令序列信道拥有超过65000个独一无二的可用的网络地址l支持点对点,点对多点,对等的拓扑结构l自动路由,自动愈合以及容错Mesh网络易用性l无需配置为外在的射频通信l使用AT或API命令模式配置射频模块参数l丰富的命令组合l免费的X-CTU软件(测试和配置软件)l免费,无限的技术支持1.2技术规格室内距离133英尺(40米) 300英尺(100米) 室外可视距离400英尺(120米) 1英里(1.6千米)输出功率2毫瓦(+3dBm)增强模式启用1.25毫瓦+1dBm)增强模式禁用63毫瓦(+18dBm) 10毫瓦(+10dBm)射频数据速率250,000bps 250,000bps串口数据速率(软件调节) 1200~230,400bps(支持非标准速率) 1200~230,400bps(支持非标准速率)接收敏感度-96dBm增强模式启用-95dBm增强模式禁用-102dBm 供电电压 2.1~3.6伏 3.0~3.4伏工作电流(发射,最大功率) 40毫安(@3.3伏增强模式启用)35毫安(@3.3伏增强模式禁用)295毫安(@3.3伏)工作电流(接收) 40毫安(@3.3V增强模式启用)38毫安(@3.3V增强模式禁用)45毫安(@3.3V)空载电流(接收关闭) 15毫安15毫安关机电流<1微安@25℃<1微安@25℃运行频段ISM 2.4GHz ISM 2.4GHz尺寸 2.438厘米x 2.761厘米 2.438厘米x 3.294厘米操作温度-40~85℃(工业级) 40~85℃(工业级)天线选择鞭状,芯片式,RPMSA,UFI连接器鞭状,芯片式,RPMSA,UFI连接器网络拓扑结构点对点,点对多点,对等,网状网点对点,点对多点,对等,网状网信道数16个直序信道13个直序信道寻址选项PAN ID和地址,簇ID和端点(可选) PAN ID和地址,簇ID和端点(可选)1.3安装注意事项XBee模块被设计成针脚式(插座)的,因此与电路板连接时无需任何焊接.XBee Pro ZNet2.5开发包包括RS232和USB接口板,使用双排20针插座来连接模块.Digi建议在母版上画出模块的轮廓线,以指示模块的安装方向.1.4针脚信号针脚号名称方向描述1 VCC 电源供应2 DOUT 输出UART数据输出3 DIN/CONFIG 输入UART数据输入4 DIO12 任意数字量输入输出125 RESET 输入模块重启(重启间隔不能小于200纳秒)6 PWM0/RSSI/DIO10 任意PWM输出0/接收信号强度指示/数字量输入输出107 PWM/DIO11 任意数字量输入输出118 空9 DTR/SLEEP_RQ/DIO8 任意针脚休眠控制/数字量输入输出810 GND 接地11 DIO4 任意数字量输入输出412 CTS/DIO7 任意CTS流控/数字量输入输出713 ON/SLEEP/DIO9 输出模块工作状态指示/数字量输入输出914 空15 Associate/DIO5 任意连接指示/数字量输入输出516 RTS/DIO6 任意RTS流控/数字量输入输出617 AD3/DIO3 任意模拟量输入3/数字量输入输出318 AD2/DIO2 任意模拟量输入2/数字量输入输出219 AD1/DIO1 任意模拟量输入1/数字量输入输出120 AD0/DIO0/Commissioning Button 任意模拟量输入0/数字量输入输出0/测试按钮备注:l最小连接方式:VCC,GND,DOUT&DINl支持固件升级的最小连接方式: VCC,GND,DOUT,DIN,RTS&DTRl信号方向指的是模块指向的方向l模块的RESET包括一个30K欧的电阻器l空针脚可以不连接l针脚20可以连接一个功能测试按钮1.5电气特性XBee Pro ZNet 2.5(VCC=3.0~3.4VDC)参数条件最小典型最大单位低电压输入全输入0.2*VCC 伏高电压输入全输入0.8*VCC 伏低电压输出VCC<=2.7V 0.18*VCC 伏高电压输出VCC<=2.7V 0.82*VCC 伏输入漏电流每个针脚0.5微安微安2.射频模块操作2.1串口通信XBee ZNet 2.5 OEM射频模块通过一个逻辑异步串口与主机设备连接.通过这个串口,模块可与任何逻辑和电压兼容的UART通信;或通过一个电平转换器与任何串口设备通信(例如通过Digi的RS232或USB母板)2.1.1U A R T数据流拥有UART接口的设备可以直接连接到模块的相应针脚,如图:串行信号数据作为异步串行信号通过针脚3进入模块的UART.当没有数据传输时,信号置为高电平.每个数据字节包含一个起始位(低电平),八个数据位和一个停止位(高电平).下图模拟了串行信号通过模块时的情形.2.1.2串口缓存XBee ZNet 2.5拥有小缓存区来收集串行或射频数据.串行接收缓存区收集输入的串行字符,直到它们被处理. 串行发送缓存区收集经由射频连接的将要被发送的数据.内部数据流图解:串行接收缓存区当数据通过针脚3进入模块,它会被存贮在串行接收缓存区中,直到被处理.某些条件下,模块不允许串行接收缓存区一接收到数据就进行处理.当大量数据发送至模块时,CTS流控是防止串行接收缓存溢出所必须的.下列情况可导致串行接收缓存区溢出:1.当模块接收到连续不断的射频数据流, 串行接收缓存区中的数据未传出直到模块不再接收射频数据.2.当模块接收到一个射频数据包,它需要找到目的地或一个通向目的地的路由.数据发送完成后,如果未收到接收确认,则需重传数据包,或者它传输的是广播包.这些问题都会使串行接收缓存区数据的处理延迟.串行发送缓存区当接收到射频数据,它将被移至串行发送缓存区,送出UART.当串行发送缓存区被占满,以至于所有接收到的射频数据包都无法写入,就会丢包.下列情况可导致串行接收发送缓存区被占满而丢包:1.当射频数据的速率设置的比模块高时,模块接收数据比它发送出去的更快.2.当主机由于软件流控而阻止数据从串行发送缓存区中发出.2.1.3串口流控模块的RTS和CTS针脚可用于提供RTS和/或CTS流控.CTS流控为使主机停止发送串口数据提供指示.RTS流控允许主机给模块传达信号,使它不从UART中发出串行发送缓存区中的数据.RTS和CTS流控使用D6和D7命令开启.CTS流控当CTS流控启用(D7命令),串口接收缓存区在距溢出还有17字节时,模块的CTS信号置高,示意主机设备停止发送串口信号.当串口接收缓存区拥有34字节以上的空间时,CTS信号复原.RTS流控当RTS流控启用(D6命令),RTS信号置高会使串口发送缓存区不再通过DOUT针脚发送数据.主机设备通过RTS,避免了了串口发送缓存区被占满.当接收到一个射频数据包,而串口发送缓存区没有足够的空间时,则整个射频数据包会被丢弃.2.1.4串口协议XBee模块支持透传模式和API(应用程序接口)模式.透传操作当运行在透传模式下,模块就像被一根串口线所代替.所有来自DIN针脚接收的UART数据将列队通过射频传输.当接收到射频数据,它们通过DOUT针脚送出.模块的参数设置为使用AT命令.数据被缓冲在串口接收缓存区,直到下一个数据的打包和传输:1.无串行字符的接收的时间多少取决于RO(分包超时)参数.当RO=0时,一收到字符就立即进行分包.2.最大字符数适应接收到的射频包(74字节).3.接收到命令模式顺序(GT+CC+GT)后,任何串口接收缓冲区内的字符将被继续缓冲,直到命令发送完毕.射频模块的固件支持下列透传模式:1.0xx(协调器)和1.2xx(路由/终端)API操作API操作是透传操作的一种替代方式.模块的联网能力可以通过基于帧架构的API进行扩展,从而与主机的应用程序互动.在API模式下,所以进出模块的数据都被包含在帧内,它的运行与事件定义在模块之内.发送数据帧(通过针脚3接收的)包括:l射频发送数据帧l命令帧(类似于AT命令)接收数据帧(通过针脚2发送的)包括:l射频接收数据帧l命令响应l事件通知,如重启,联机,脱机等等.API提供了一种在主机应用层进行模块配置与数据路由选择的方式.主机的应用程序可以发送包含了地址与载荷空间的数据帧,以替代使用命令模式来修改地址.模块发送包含状态的数据帧给应用程序,既包括接收到的源,也包括接收到的载荷空间.选择API可以实现下列操作:Ø发送数据给多个目的地而不需要进入命令模式Ø接收每个射频包的发送情况(成功或失败)射频模块的固件支持下列API模式:1.1xx(协调器)和1.3xx(路由/终端)2.2工作模式2.2.1空闲模式当无发送或接收数据时,射频模块处于空闲模式.在这个模式下,模块仍然检查有效的射频数据.模块在下列情况时会转换到其他模式:l发送模式(串口接收缓冲区内的数据等待被封包)l接收模式(天线接收到有效的射频数据)l睡眠模式(仅终端)l命令模式(命令模式序列发布)2.2.2发送模式当串行数据被接收到,准备进行分包,模块会退出空闲模式,试图发送数据.目的地址决定了哪个节点会接收到数据.在发送数据之前,模块要先保证一个16位的网络地址和到达目标节点的路由已经建立.如果这个16位的目的网络地址未知,会进行网络地址搜索.如果路由未知,会进行路由搜索,以建立一个通往目标节点的路由.如果未找到与模块匹配的网络地址,这个包会被丢弃.一旦确立了路由,数据就会被传出.如果建立路由的搜索失败,这个包同样会被丢弃.当数据从一个节点传递到另一个节点,会发送一个网络级的确认包,沿着已经建立的路由传回源节点.这个确认包告诉源节点,数据已经成功的被目标节点接收.如果未收到网络确认,则源节点会进行数据重传.可能在罕见的情况下,目标节点接收到了数据包,但是源节点未收到网络确认.这种情况下,源节点的重传数据,会导致目标多次接收到同样的数据包.XBee ZNet2.5不能过滤出相同的数据包.应用程序中应包含这种争论的处理规则.2.2.3接收模式当接收到一个有效的射频数据包,它就会被转移到串口发送缓冲区.2.2.4命令模式为了更改或读取模块参数,模块必须进入命令模式——一个把输入的串行字符解读为命令的模式.命令模式进入命令模式:发送连续3个”+++”字符,并注意在字符的开始和结束之间要遵循保护时间.默认的AT命令模式序列(为了向命令模式过渡):l一秒[GT(保护时间)参数=0x3E8]无字符传出l一秒[CC(命令字符序列)参数=0x2B]内输入三个加号l一秒[GT(保护时间)参数=0x3E8]无字符传出一旦AT命令模式序列发出,模块会从DOUT针脚发出一个”OK\r”.如果模块尚未发送完接收到的串行数据,这个”OK\r”会被延迟.当进入命令模式以后,命令模式计时器开启(CT命令),模块被允许从DIN针脚接收AT命令.所有序列内的参数值都可被修改.备注:进入AT命令模式失败最大的可能是由于波特率不匹配.默认情况下,BD(波特率)参数=3(9600bps)发送AT命令发送AT命令和参数要遵循下面的语法:读取模块寄存器内的参数值,忽略参数段这个示例改变了模块的目的地址(Low)为”0x1F”.新命令保存在非易失性存储器(长周期)里,随后发送WR( Write)命令.为了使修改后的参数在模块重启后仍能保持,必须使用WR(Write)命令写入到非易失性存储器中.否侧模块在重启后,参数会恢复到先前的值.命令响应当命令送达模块,它会分析并执行命令.成功执行命令之后,模块返回一个”OK”的消息.如果执行时候出错,则返回一个”ERROR”消息.应用更改命令任何通过AT命令进行的更改,在它应用之前不会生效.例如,发送BD命令改变波特率,在它应用之前并不会改变实际的波特率.更改的应用有以下两种办法:l发出AC(应用更改)命令l退出AT命令模式退出AT命令模式:1.发送ATCN(退出命令模式)命令,回车.或2.在CT(命令模式超时)命令指定的时间内接收不到有效的AT命令,模块自动返回到空闲模式2.2.5休眠模式休眠模式允许模块在不工作时进入一个低功耗的状态.XBee ZNet 2.5射频模块支持针脚休眠(根据针脚信号变化休眠)和周期休眠(模块在设定好的时间内休眠)3.Z i g B e e网络3.1Z i g B e e网络架构ZigBee网络被称为个人区域网(PAN).每个网络包含一个10位的标识符,叫PAN ID.ZigBee定义了三种不同的设备角色——协调器,路由,和终端.一个典型的网络如下:协调器(Coordinator)——负责选择信道和PAN ID. 协调器启动一个新的PAN.启动之后, 协调器允许路由,和终端连接到PAN中.它可以发送和接收射频数据,也可以参与网络的数据路由. 协调器不能使用电池供电,因为它是允许连接设备和/或路由数据所必须的,应使用电源供电.路由(Router)——路由在运行前必须连接到一个ZigBee PAN中.连接到PAN之后, 路由允许其他路由和终端连接到其中. 路由同样可以发送和接收射频数据,也可以通过网络路由数据包. 路由允许连接设备和参与路由数据,因此它不能休眠, 应使用电源供电.终端(End Device)——同路由一样, 终端必须连接到一个ZigBee PAN.但是终端不能允许其他设备连接PAN,也不能参与网络的数据路由. 终端可以发送和接收射频数据. 终端可以被设计成电池供电的设备.因为终端可以休眠,所以协调器或路由必须收集所有发往终端的数据,并在终端唤醒和能接收之前缓冲数据. 协调器或路由允许终端连接和代表终端处理射频数据,被称为终端的父级. 终端被认为是它们的子级.3.2Z i g B e e P A N当协调器选择了一个信道和PAN ID,ZigBee网络就成型了. 协调器启动PAN之后, 路由和终端就可以连接至其中. PAN ID在协调器启动网络的时候就已经选择好. 路由和终端连接PAN之后,就成为了它的一部分(继承了协调器的PAN ID).ZigBee支持网络的Mesh路由,允许数据穿越多个节点(跳),以抵达目标节点,这能使ZigBee节点覆盖一大片区域,并能支持网络中设备的通信.所有ZigBee网络中的设备,在加入之后都会获得一个16位的网络地址.协调器的网络地址总是0.3.2.1启动一个P A N当协调器负责启动一个ZigBee网络,所有的ZigBee网络单元都具有协调器的初始值.为了启动一个新的PAN, 协调器执行一系列的扫描,以发现不同信道之间的活动射频信号水平(能量扫描),及搜索附近运作的PAN(PAN扫描).能量扫描当协调器启动,它会在不同的信道(频段)执行能量扫描,以检测各个信道的信号水平.检测到拥挤的信道后,它就将其从可用信道列表中去掉.执行能量扫描可以使协调器在启动时避免选择了拥挤的信道.PAN扫描当能量扫描完毕, 协调器扫描剩余安静的信道中的其他PAN. 协调器首先发出一个广播,标记为一跳的请求.任何附近的协调器或路由会发送一个信标帧给它,来响应这个请求. 这个信标帧包含这个PAN的标识符(PAN ID),无论设备是否被允许连接.(PAN扫描一般也叫活动扫描或信标扫描)一旦协调器完成了能量扫描和PAN扫描,它会分析所接收到的信标,试图用一个未使用的PAN ID和信道来启动. 协调器启动PAN之后, 路由和终端于是就可以加入了. 协调器保留信道和PAN ID属性,来应对电源开关循环和重启.3.3连接到一个P A N路由和终端必须搜寻和连接一个PAN.它们首先发起一个PAN扫描,如同协调器所做的那样.从PAN扫描中,它们接收到附近ZigBee设备返回的信标列表.它们分析这个列表,并选择一个有效的ZigBee网络来连接.路由和终端可被配置为连接任何ZigBee PAN,或者只依据一个确定的PAN ID连接.然而,这仍然需要协调器或路由的许可.一旦正在进行连接的设备(路由或终端)找到了一个允许它连接的,运行在有效Zigbee网内的设备,它会发送一个连接请求给这个设备,来尝试连接.3.3.1连接许可协调器和路由都能准许新的路由和终端的连接. 协调器或路由是否允许新设备连接,取决于两点:l它的连接许可属性(如果连接被允许)l它已有的终端子设备号连接许可属性协调器和路由都有一个连接许可属性. 协调器和连接的路由中的这个属性,可以被设置为总是允许连接,短时间的连接,或者禁止连接.为了使一个新的设备连接网络,周围设备的这个属性必须被设置为允许连接.终端子设备既然终端可以依赖协调器或路由实现对射频数据包的缓冲,那么协调器和路由就要给它一个有限的终端子设备号.一旦这个编号的终端连接了一个协调器或路由,它就不再允许其他设备的连接.3.3.2安全如果安全被启用, 协调器会启用一个128位的AES加密.只有具备相同密钥的设备才能在PAN上通信. 路由和终端要加入,必须获得当前的密钥.密钥有两种获得方法: l预安装l连接的时候通过无线接收密钥3.4Z i g B e e网络通信ZigBee支持设备寻址与应用层寻址. 设备寻址指定了包将发往的目的设备地址. 应用层寻址指明了一个特殊的接收程序.通常所说的ZigBee终端,与一个消息类型字段被一起称为一个Cluster ID(簇ID).3.4.1Z i g B e e设备寻址建立在802.15.4协议之上的ZigBee协议指定了两种地址:l16位网络地址l64位地址16位网络地址当一个节点连接后,16位网络地址就被分配给它了.网络中每个节点的地址都是独一无二的.然而网络地址不是静态的,它可以被改变.下面两种情况会使节点改变地址:1.如果一个终端无法与它的上一级通信,而不得不离开并寻找一个新上级.2.如果设备的角色从终端变为路由,或者反之,它会离开网络并以新身份连接.ZigBee需要数据被发往的目的设备的16位网络地址.这就需要在发送数据之前先找到16位网络地址.64位网络地址每个节点包含一个独一无二的64位网络地址. 64位网络地址是永久的,可以用它找出一个特定节点.3.4.2Z i g B e e应用层寻址ZigBee应用层定义了端点和簇标识符(Cluster ID),用来表示设备上单独的服务或应用程序.每个端点就是ZigBee设备上的一个特定任务或应用程序,类似于一个TCP端口.每个ZigBee 设备能支持一个或更多的端点. Cluster ID定义了设备上的一个特定函数或动作.ZigBee家庭照明控制的Cluster ID包含了一些例如”开灯”,”关灯”,”微光”这样的动作.假设使用单独的无线指令控制一盏灯光调节器,同时一盏或多盏灯开关.调节器和开关会被分配给不同的端点值.为了发送消息给调节器,远程无线端发送一个无线消息给调节器的那个端点.在这个例子中, Cluster ID可以支持”开灯”,”关灯”或”微光”.因此,设备A为了关闭设备B 的一盏灯,设备A会发送灯光开关端点给设备B,使用”关灯”这个Cluster ID.如下图所示.3.3.4数据传输与路由所有数据包都被设备和应用层寻址字段进行了编址.数据可以被广播或者单播.广播广播传输在ZigBee协议中被设计为遍及整个网络,每个节点都能接收到.为了达到这个目的,所有接收到广播的设备会重传数据包三次.每个节点在发送广播时,会在局部的广播表上登记.这个登记被用来记录每个被接收到的广播包,以确保数据包不会被无穷尽的传输下去.每个登记被保持8秒.广播表能保存8个记录.为了能够广播,ZigBee协议栈需要保留一个数据包副本的缓冲空间.这个副本用来在需要时重传数据包.大的广播包需要更多的缓冲空间.因为广播需要网络中的每个设备都进行重传,请尽量少用广播.单播ZigBee的单播传输总是需要目标设备的16位网络地址.然而,只有设备的64位网络地址是永久的, 16位网络地址会改变.因此ZigBee设备需要搜索网络地址来识别当前的16位网络地址是否符合已知的64位网络地址,及使用路由搜索来建立一个路由.网络地址搜索传输的数据总是需要发往目标设备的16位网络地址.然而,64位地址是独一无二和被熟知的,ZigBee设备在传输数据前必须找到加入时分配给特定设备的网络地址.为了实现这个目的,设备发送一个遍及网络的网络地址搜索的广播包.这个包里包含需要发送数据的发起者的64位网络地址.设备接收到广播包后,检视广播包中的64位网络地址是否符合自己的64位网络地址.如果地址符合,设备发送一个响应数据包给发起者.当接收到响应数据包,发起者就开始传输数据了.路由搜索ZigBee使用Mesh路由选择来建立一个源设备与目标设备之间的路由. Mesh路由选择允许数据包穿越网络内的多个节点(跳),来实现源到目标的路由. 协调器和路由使用一个叫路由搜索的过程来建立一条源到目标的路径. 路由搜索的过程是基于AODV(无线自组网按需平面距离矢量路由)协议的.AODV(无线自组网按需平面距离矢量路由)路由算法要完成AODV协议下的路由选择,每个节点需要存储下一跳(源节点和目标节点之间的中介节点)到目标节点的一个表.如果下一跳未知,必须进行路由搜索以找到一个路径.因为路由只能存储有限数量的路径,路由搜索经常性的发生在一些拥有许多不同节点的大型网络内.目标地址下一跳地址R3 路由6 协调器C 路由6 路由5R5 路由6 路由6当一个源节点必须找到一条通往目标节点的路径时,它发送一个广播路由请求命令. 路由请求命令包含源地址,目标地址和路径消耗(一种测量路由质量的标准).当路由请求命令穿过网络时(涉及广播传输),每个节点重新广播更新后的路径消耗信息,并在搜索路由表上创建一个临时登记.当目标节点接收到一个路由请求,它与先前接收的路由请求命令的”路径消耗”值比较.如果这个路由请求的路径消耗比任何先前接收的路径消耗都好,目标节点会发送一个路由响应包给发起请求的节点.中间节点接收并转交路由响应包给源节点(发起路由请求的节点).备注:R6如果发现了更好的路由,可能会发送多个响应.重传与确认ZigBee在MAC层和应用支持层(APS)都包含确认数据包.当数据到达远程设备,它可能经过多跳才到达目的地.就像数据被从一个节点传到它的邻居一样,一个表示传输成功完成的确认数据包(ACK)沿反方向传送了回去.如果未收到ACK,发送设备会重传数据最多4次.这个ACK 被称为MAC层确认.另外,发起传输的设备期望收到来自目标设备的确认数据包(ACK).这个ACK会穿过数据所走过的路径,但是方向相反.如果始发设备未收到这个ACK,它会重传数据最多2次,直到接收到ACK. 这个ACK被称为ZigBee APS层确认.4.X B e e Z N e t2.5网络4.1X B e e Z N e t2.5网络架构XBee ZNet 2.5模块不同于EmberZNet 2.5.x软件栈.这个栈的很多地方类似于标准的ZigBee 2006,但是增加了维持一个强大的Mesh网所必须的特征.这一章节讲述了如何配置模块的联网,安全性,以及创建Mesh网的寻址参数.为了创建一个ZigBee网络,协调器必须以一个信道和PAN ID为开始.一旦协调器启动, 路由和终端就可以连接网络了.SC(搜索信道),ID(PAN ID),SD(搜索持续时间)和NJ(节点连接时间)命令被用来管理这个网络的架构.SC和ID设置应被写为WR命令,以保护网络架构和连接信息.4.1.1一个协调器的启动为了组成一个网络, 协调器必须选择一个未被使用的运行信道和PAN ID.XBee ZNet 2.5支持使用User-settable命令来控制这个选择信道和PAN的过程.命令说明ID 用来指定PAN ID.设为0xFFFF则允许选择任何ID.SC 选择一个能量扫描和PAN扫描的信道列表SD 指定对SC信道进行能量扫描和PAN扫描的持续时间。

Digi XBee 应用说明文件:从9XCite迁移到XBee-PRO XSC(S3B硬件)说明书

Digi XBee 应用说明文件:从9XCite迁移到XBee-PRO XSC(S3B硬件)说明书

Digi XBee Application NoteMigration from 9XCite to XBee‐PRO XSC (S3B Hardware)This guide will assist you with migrating from the 9XCite to the XBee‐PRO XSC (S3B Hardware). First it is important to understand the 9XCite is available in 4 variants:1)9600 bps Frequency‐Hopping Spread Spectrum (FHSS)2)9600 bps Single Channel3)38400 bps FHSS4)38400 bps Single ChannelThe XBee‐PRO XSC (S3B) is only backward compatible serially and over‐the‐air with the 9600 bps (FHSS) variant of the 9XCite. The XBee‐PRO XSC (S3B) will not communicate with the 9600 Baud Single Channel or 38400 Baud variants of the 9XCite. This guide lists some of the basic hardware and software differences between the RF modules and what you need to consider when migrating from the 9XCite to the XBee‐PRO XSC (S3B).Hardware ConsiderationsThe following chart lists the major hardware differences between the 9XCite and the XBee‐PRO XSC (S3B).Considerations 9XCite XBee‐PRO XSC(S3B)CommentsNominal Voltage 2.85 ‐ 5.5 VDC 3.3 VDC Power supply must be redesigned for 3.3V.UART 2.85 ‐ 5.5 VDC 3.3 VDC Other microprocessors interacting with the unit must have voltage conversion or be redesigned to the same voltage level as the XBee.TX Current Draw 55 mA (@ 2.85V) 215 mA TX Power output of XSC can be reduced in software for lower current draw.RX Current Draw 45 mA (@2.85V)55 mA (@ 5V)26 mA ImprovedTX Power Output 6 dBm 7 to 24 dBmTX Power output has increased and defaultsto 24 dBm, but is also software adjustabledown to 7 dBm.Sleep Current 20 uA 2.5 uA ImprovedFCC ID OUR‐9XCITE MCQ‐XBPS3B Customer will need to change the label on the outside of their end product to show the appropriate FCC ID for the S3B.IC ID 4214A‐9XCITE 1846A‐XBPS3B Customer will need to change the label on the outside of their end product to show the appropriate IC ID for the S3B.Dimensions Same Smaller Redesign is needed to accommodate form factor change. (See pin compatibility chart below)Pin Connection Same Different Two 10 pin through hole connectors. (See pin compatibility chart below)RF Connectors RPSMA, Wire RPSMA, U.FL,WireXSC S3B is also available with the U.FLconnector.Software ConsiderationsThe following chart lists the major software differences between the 9XCite and the XBee‐PRO XSC (S3B).Considerations 9XCite XBee‐PRO XSC(S3B)CommentsWake Time 69 ms 40 ms Improved. Time from pin sleep to when CTS asserts and is ready to transmit data.Software/AT Commands Same Some addedAdded commands like power level should beconsidered. New commands are not requiredto be used for the interoperability of theradio.RS‐485 Modes Supported Supported The XBee does support RS‐485 mode on the RF module, however, the development board does NOT (only USB or RS232).RF Data Rates 9.6 kbps and38.4 kbps9.6 kbps and19.2 kbpsThe XBee is only backward compatible withthe 9.6 kbps FHSS variant of the 9XCite.Pin CompatibilityThe XBee‐PRO XSC (S3B) has a different footprint than the 9XCite. The S3B has the XBee 20 pin footprint rather than the 11 pins found on the 9XCite. The table below shows the pins on the 9XCite and the corresponding pins on the S3B.Signal Name 9XCite Module Pins XBee‐PRO XSC (S3B) Module PinsD02 / CTS / RS‐485 Enable 1 12 DI3 / SLEEP 2 9 DO (Data Out) 3 2 DI (Data In) 4 3DI2 / RTS 5 16RESET 6 5 DO3 / RX LED 7 4TX / PWR 8 15CONFIG 9 6VCC 10 1GND 11 10Pin Layout(Module Footprint)9XCite (Bottom View)S3B (Top View)Dimensions1.600” x2.83” x 0.35”(4.06 cm x 7.17 cm x 0.89 cm)1.297” x 0.962” x 0.215”(3.29 cm x 2.44 cm x 0.546 cm)ConfigurationThe XBee‐PRO XSC (S3B) doesn’t have Non‐AT Settable Parameters like the 9XCite; all of the parameters can be set with AT Commands. Some of the new features on the S3B are: •MY (Source Address)•MD (RF Mode)•PK (RF Packet Size)•PL (RF Power Level)•RB (Packetization Threshold)•RZ (DI Buffer Size)All of these new features are described in more detail in the XBee‐PRO XSC product manual.。

XBee S2C DigiMesh 2.4 Kit RF 模块入门指南说明书

XBee S2C DigiMesh 2.4 Kit RF 模块入门指南说明书

XBee S2C DigiMesh2.4Kit Radio Frequency(RF)ModuleSet up your XBee devices Step1:Assemble the hardware StepMake sure the board is NOT powered by either the micro USB or a battery when youplug in the XBee module.WARNING!Never insert or remove the XBee device while the power is on!Set up your XBee devices Step2:Download and install XCTUAfter you plug the XBee module into the board,connect the board tomicro USB cables provided.Ensure the loopback jumper is in the UART position.Make sure the board is not powered when you remove the XBee module.StepSet up your XBee devices Step2:Download and install XCTUStepbutton.button.select the7.Click Add selected devices once the discovery process has finished.You should see something similar to the following example in the Radio Modules section:8.Click Finish.button. XBee SMT Grove Development Boardbutton.button.initials in the Search boxexample:button.button. button.Check the networkOnce both XBee modules are configured,use XCTU to check that they are in the same network and can see each other.1.Click the Discover radio nodes in the same network button of XBEE_A.The device searches for devices in the same network.When the discovery process is finished,XCTU lists discovered devices found within the network in the Discovering remote devices dialog.2.Click Cancel.There is no need to add the remote device that has been discovered.Send messages through XCTUUse the XCTU console to have your two XBee modules send messages to each other.1.Switch both XBee modules to the consoles working mode.2.Open a serial connection for each XBee.a.Select XBEE_A and click.b.Select XBEE_B and click.button toopen forStep4:Create a mesh networkThis section describes how to add a third XBee module to create a mesh network.Establish a meshnetwork any time you want to create a network that is larger than the range of each individual device.In these instructions,you first connect a loopback jumper to an XBee module in preparation fortesting your network.If you get stuck,see Troubleshooting.Connect a loopback jumper to an XBee moduleConnecting a loopback jumper to an XBee module lets you send a message to another XBee moduleand have the message loop back to the sender.1.Connect the loopback jumper on XBEE_B so it bridges the pin marked"loopback"and themiddle pin on its development board.2.In the XBEE_A console,click the Clear session button to clear your previous conversation.3.Type"Hello!"Each character loops back in the XBEE_A console log,which indicates that XBEE_A successfullysent the message to XBEE_B.You are now ready to use the loopback jumper to help you test a mesh network consisting ofthree XBee modules.Set up a third XBee module to create a mesh networkTo create a mesh network,move XBEE_B away from XBEE_A until communication is lost.Then,add XBEE_C to relay messages between XBEE_A and XBEE_B.The network automatically adjusts and redirects communications when a pathway becomes available.1.Move XBEE_B out of range of XBEE_A:a.Disconnect XBEE_B from your computer and remove it from XCTU by clicking theRemove the list of remote modules button.b.Connect XBEE_B to a power supply(or laptop or portable battery)and move it awayfrom XBEE_A until it is out of range.The approximate indoor range is100ft(30m),and the approximate outdoor rangeis300ft.(90km).c.Make sure the loopback jumper is connected to XBEE_B.See Connect the loopbackjumper.d.In the XBEE_A console,click to clear your previous conversation with XBEE_B.e.Type"Are you out of range?"In the illustration below,the message does not loopback,which means XBEE_B did not receive it and it is out of range of XBEE_A.f.If the message loops back,move XBEE_B farther away until it no longer loops back.2.Add and configure another XBee module:a.Connect another XBee module to your computer.b.Click the Configuration working modes button.c.Click the Add a radio module button.d.In the Add a radio module dialog,select the USB Serial Port for this XBee moduleand click Finish.e.Configure this XBee module as follows:ID:D161NI:XBEE_Cf.Click the Write radio settings button.XBEE_B:mode.removebutton.insteadtoBefore you perform other tasks,change the loopback jumper on XBEE_B so it no longer bridges the two pins on its development board.It should look like this:Step5:Use API mode to talk to XBee modulesThis section shows you how to configure an XBee module in API mode,which gives you flexibility,speed,and reliability in your data transmissions.If you get stuck,see Troubleshooting.For more information on API mode,see the XBee S2C DigiMesh2.4User Guide.Configure an XBee module in API mode1.Select XBEE_A and click the Configuration working modes button.2.Add this configuration:AP:API Mode13.Click the Write radio settings button.The Port indicates XBEE_A is in API mode.Send an API Tx frame from an XBee module to another moduleAPI Tx frames are the instructions that allow one XBee module to send data to another XBee module.In these instructions,XBEE_A uses the API frame type"Transmit Request"to send some text data to XBEE_B.1.Reconnect XBEE_B to your computer.2.Make sure the loopback jumper on XBEE_B no longer bridges the two pins on its developmentboard.3.In XCTU, rediscover XBEE_B.4.Switch XBEE_A and XBEE_B to console mode:a.Select XBEE_A and click.Then click to open a serial connection.b.Select XBEE_B and click.Then click to open a serial connection.5.Select XBEE_A.6.In the Send a single frame area,click the Add new frame to the list button.7.In the Add API frame to the list dialog,click the Create frame using'Frames Generator'tool button.8.In the XBee API Frame generator dialog,configure the following parameters:Protocol:DigiMeshMode:API1Frame type: 0x10-Transmit Request64-bit dest.address:MAC address of XBEE_BRF data:Type"Hello XBee_B!"in the ASCII tab9.Click OK.10.In the Add API frame to the list dialog,type a name for your frame.11.Click Add frame.12.In the Send frames area,make sure your frame is selected.13.In the Send a single frame area,click Send selected frame.14.In the Frames log area,select Transmit Request and then Transmit Status to look at theFrame details for each.For example,select Transmit Status and scroll down in the Frame details area to see that your Delivery status is a success.15.In the Radio Modules area,select XBEE_B."Hello XBee_B!"appears in the Console log.Do more with your XBee devices Update the firmware of your XBee modules Update the firmware of your XBee modulesRadio firmware is the program code stored in the device's persistent memory that provides thecontrol program for the e XCTU to update the firmware.1.Click the Configuration working modes button.2.Add local and remote XBee modules to your computer.See Add XBee modules to XCTU andConfigure remote XBee modules.3.Select a local or remote XBee module from the Radio Modules list.4.Click the Update firmware button.The Update firmware dialog displays the available and compatible firmware for the selectedXBee module.5.Select the product family of the XBee module,the function set,and the latest firmware version.6.Click Update.A dialog displays update progress.Configure remote XBee modulesYou can communicate with remote devices over the air through a corresponding local device.Configure the local device in API mode because remote commands work only in API mode.Configure remote radio modules in either API or transparent mode.These instructions show you how to configure the LT(Associate LED blink times)parameter on aremote module.Do more with your XBee devices Configure remote XBee modules1.Add two XBee modules to XCTU.See Add XBee modules to XCTU.2.Configure the first XBee module in API mode and name it XBEE_A.See Configure an XBeemodule in API mode.3.Configure the second XBee module in either API or transparent mode,and name it XBEE_B.See Configure the first two XBee modules in transparent mode.4.Disconnect XBEE_B from your computer and remove it from XCTU by clicking the Remove thelist of remote modules button.5.Connect XBEE_B to a power supply(or laptop or portable battery).Your Radio Modules area should look something like this.6.Select XBEE_A and click the Discover radio nodes in the same network button.7.Click Add selected devices in the Discovering remote devices dialog.The discovered remotedevice appears below XBEE_A.8.Select the remote device XBEE_B,and configure the following parameter:LT:FF(hexidecimal representation for2550ms)9.Click the Write radio settings button.The remote XBee module now has a different LED blink time.10.To return to the default LED blink times,change the LT parameter back to0for XBEE_B.Set up and perform a range testThis section shows you how to set up two XBee modules to perform a range test,which demonstrates the real-world RF range and link quality between two XBee modules in the same network.Performinga range test gives an initial indication of the expected communication performance of the kitcomponents.When deploying an actual network,perform multiple range tests to analyze varyingconditions in your application.Configure the XBee modules for a range testFor XBee modules to communicate with each other,you configure them so they are in the samenetwork.You also set the local device to API mode to obtain all possible data of the remote XBeemodule.1.Add two XBee modules to XCTU.See Step3:Add the XBee modules to XCTU.2.Select the first XBee module and click the Load default firmware settings button.3.Configure the following parameters:ID:D161NI:XBEE_AAP:API enabled[1]4.Click the Write radio settings button.5.Select the other XBee module and click.6.Configure the following parameters:ID:D161NI:XBEE_BAP:API disabled[0]button.computer button.work in menu and window opens.2.Select XBEE_A and click the Discover remote devices button.The discovery of remote devices starts.When the discovery process finishes,the other device (XBEE_B)appears in the Discovering remote devices dialog.3.Click Add selected devices.4.Select XBEE_B from the Discovered device drop-down menu in the Device Selection area.5.For Range Test type,select Cluster ID0x12.6.Click the Start Range Test button.7.If a notification dialog asks you to close the loopback jumper in the remote device,click OK.8.Test the signal interference by doing one of the following:n Place your hands over one of the XBee modules.n Block line-of-sight with your body.n Place a metal box over an XBee module.n Move the remote XBee module to a different room or floor of the building.The Received Signal Strength Indicator(RSSI)value will decrease and some packets may even be lost.9.Observe how XCTU represents the retrieved data:n Range Test chart represents the RSSI values of the local and remote devices during the range test session.The chart also shows the percentage of total packets successfullysent.n Local and Remote bar graphs represent the signal strengths of the local and remote XBee modules.These values are retrieved for the last packet sent/received.RSSI ismeasured in dBm.A greater negative value in dBm indicates a weaker signal.Therefore,-50dBm is better than-60dBm.n Packets sent and Packets received area shows the total number of packets sent, packets received,transmission errors,and packets lost.The percentage bar graphindicates the percentage of packets that are successfully sent and received during arange test session.In the following illustration,the percentage of packets successfully sent is69%and received is 64%.The actual percentage of packets successfully sent or received may be higher.10.Click the Stop Range Test button to stop the process at any time.11.When you have completed the range test,click the Remove the list of remote modulesbutton to remove the remote XBee modules from XCTU.Troubleshooting Cannot find the serial port for the module Cannot find the serial port for the moduleYou can remove the XBee Grove Development Board from the USB port and view which port name no longer appears in your port list.The name that no longer appears is your XBee board.To use XCTU to determine the correct serial port:1.Open XCTU,Click the Discover radio modules button.2.Select all ports to be scanned.3.Click Next and then Finish.Once the discovery process completes,a new window notifies you of the devices discovered and the details.The serial port and the baud rate appear in the Port label.Cannot identify XBee modulesTo identify modules you have added to XCTU,read the device settings of each module and check the Rx and Tx LEDs of the XBee Grove Development Boards.The LEDs indicate that the XBee module isreceiving(Rx)or transmitting(Tx)information through the serial port.When you read or write the settings of a module,the Rx and Tx LEDs blink so you can identify whichmodule is connected to each serial port.The following example shows the LED for a port already inuse.The serial port where the local XBee module is connected can only be in use by one application.Check to make sure the connection with the module in the XCTU console is closed and there are no otherapplications and no other instances of XCTU using the port.Cannot install device driverThe device driver software was not successfully installed.Potential causeSometimes when you connect an XBee Grove board to your computer,the operating system does not install the driver.Troubleshooting Use LEDs to identify XBee modulesResolutionTry the following,in order.If one of the steps resolves the issue,you're done.1.Remove and re-insert the XBee module into your computer.2.If the OS is still unable to install the driver,remove and re-insert the XBee module into anotherUSB port.3.If your computer fails during the driver initialization problem and you are still unable to installthe drivers,complete the following steps:a.Open the Device Manager.b.In the Other Devices section,right-click on the device T232R USB UART and clickuninstall.c.Plug in your device and allow your system to reinstall the drivers.Use LEDs to identify XBee modulesYou want to force LEDs to blink so you can easily locate an XBee module.ResolutionTo locate an XBee module using LEDs:1.In XCTU,select one of your XBee modules and click the Read radio settings button.2.Observe which XBee module has the Rx and Tx LED lights blinking green and yellow on itsdevelopment board.No remote devices to select for a range testIf there are no remote XBee modules to select in the Radio Range Test dialog,try one of the following resolutions.Check cablesThe USB cables should be firmly and fully attached to both the computer and the XBee development board.When attached correctly,the association LED on the adapter is lit.Check that the XBee module is fully seated in the XBeedevelopment boardWhen the XBee module is correctly installed,it is pushed fully into the board and no air or metal isvisible between the plastic of the adapter socket and the XBee module headers.Also,check that all ten pins on each side of the XBee module are in a matching hole in the socket.Check the XBee module orientationThe angled"nose"of the XBee module should match the lines on the silk screening of the board and point away from the USB socket on the XBee development board.Troubleshooting Port in usePortXCTU cannot discover devicesIf XCTU doesn't discover an XBee module or doesn't display any serial ports,try the followingresolutions.Check the configuration of your USB serial converter1.On the Start menu,click Computer>System Properties>Device Manager.2.Under Serial Bus controllers,double-click the first USB Serial Converter to open the USB SerialConverter dialog.3.Click the Advanced tab,make sure Load VCP is selected,and click OK.4.Repeat steps2and3for each USB Serial Converter listed in the Device Manager.Check cablesDouble-check all cables.The USB cable should be firmly and fully attached to both the computer and the XBee development board.When attached correctly,the association LED on the adapter will be lit.Check that the XBee module is fully seated in the XBeedevelopment boardWhen the XBee module is correctly installed,it should be pushed fully into the board and no air ormetal should be visible between the plastic of the adapter socket and the XBee module headers.Also, double-check that all ten pins on each side of the XBee module made it into a matching hole in thesocket.Check the XBee module orientationThe angled"nose"of the XBee module should match the lines on the silk screening of the board and point away from the USB socket on the XBee development board.Check that the XBee modules are in the same networkCheck that the Network ID(ID)and the Channel(CH)settings have the same value for both XBeemodules.Check driver installationDrivers are installed the first time the XBee development board is plugged in.If this process is notcomplete or has failed,see Cannot install device driver.Check if the modules are sleepingThe On/Sleep LED of the Grove Development Board indicates if the XBee module is awake(LED on)or asleep(LED off).When an XBee module is sleeping,XCTU cannot discover it,so press the Commissioning button to wake it up for30seconds.XBee TH Grove Development BoardXBee SMT Grove Development BoardCheck the loopback jumperThe loopback jumper should not be connected when XCTU is trying to find the module.Make sure the loopback jumper is not connected to the loop-back pins.defaultbutton. In theandRegulatory information Europe(CE) Europe(CE)The XBee S2C DigiMesh2.4Kits have been tested for European compliance and CE markedaccordingly,refer to /resources/certifications.If the XBee S2C DigiMesh2.4Kits are incorporated into a product,the manufacturer must ensurecompliance of the final product with articles3.1a and3.1b of the Radio Equipment Directive2014/53/EU.An EU Declaration of Conformity must be issued in accordance with the Radio Equipment Directive2014/53/EU and supplied with the product when it is placed on the European market.A copy of the EU Declaration of Conformity must also be kept on file as described in the Radio EquipmentDirective.Furthermore,the manufacturer must maintain a copy of the XBee S2C DigiMesh2.4Kit user manual documentation and ensure the final product does not exceed the specified power ratings,antennaspecifications,and/or installation requirements as specified in the user guide.Maximum power and frequency specificationsFor the through-hole device:n Maximum power:9.82mW(9.92dBm)Equivalent Isotropically Radiated Power(EIRP)at normal condition.n Frequencies:5MHz channel spacing,beginning at2405MHz and ending at2480MHz.For the surface-mount device:n Maximum power:12.65mW(11.02dBm)EIRP.n Frequencies:5MHz channel spacing,beginning at2405MHz and ending at2480MHz.。

XBee XBee-PRO OEM 远程无线链路快速启动指南说明书

XBee XBee-PRO OEM 远程无线链路快速启动指南说明书

Quick Start GuideCreate long range wireless links in minutes!XBee™/XBee-PRO™ OEM Development KitsIntroductionRange Test SetupPoint-to-point Range TestPoint-to-multipoint NetworksAddressing ConsiderationsIntroductionThis Quick Start Guide provides step-by-step instruction on how to setup wireless links and test the modules’ ability to transport data over varying ranges and conditions. This guide illustrates how to setup and run a point-to-point range test; then how to expand into a point-to-multipoint topology.Required Components(2) OEM RF Modules (any combination of XBee & XBee-PRO Modules)(1) USB Interface Board* (for interfacing between an RF module & host PC)(1) RS-232 Interface Board (for looping data back to the base from a remote)(1) PC (Windows 2000 or XP) with an available USB (or RS-232*) port.Required installations: X-CTU Software & USB drivers (Note: Drivers for LINUX and Mac OS X are provided on the CD, but the X-CTU Software will only run on Windows.)Accessories (1 USB Cable, 1 Serial Loopback Adapter [RED] & 1 power supply)* XBee Professional Developer Kits (XB24-PDK) contain four RS-232 boards. An RS-232 board (w/ RS-232 cable & power supply) can be used in lieu of the USB option.Range Test SetupInstall X-CTU SoftwareThe X-CTU Software interface is divided into the four following tabs:•PC Settings - Setup PC serial com ports to interface with the RF module •Range Test - Test the range of wireless links under varying conditions •Terminal - Read/Set RF module parameters and monitor data communications • Modem Configuration - Read/Set RF module parametersSoftware InstallationsSoftware Installations (continued)Install USB Drivers (Hardware USB Bus & Virtual Com Port drivers)Hardware SetupSetup Point-to-point Wireless Data LinkPoint-to-point Range TestRun Range TestUse the “PC Settings” and “Range Test” tabs of the X-CTU Software to:• Setup a PC Serial Com Port for communications with the BASE module assembly • Determine the range capabilities of the XBee/XBee-PRO ModulesThe out-of-box default configuration of the module is optimal for running this range test.Point-to-multipoint NetworksPoint-to-multipoint topologies require that one BASE module be configured to operate in Broadcast Mode [see ‘Addressing Considerations’ section]. REMOTE modules can operate either in Broadcast or Unicast Mode. The figure below depicts a typical point-to-multipoint network that contains one BASE (Broadcast Mode) and four REMOTES (Unicast Mode).RF Module ConfigurationTo configure RF module parameters:• Install X-CTU Software (& USB drivers if connecting to the host via a USB port)• Setup a USB or RS-232 connection between the module and host PC [page 2]• On the X-CTU “PC Settings” tab [Figure 2]: Verify com port and module settings match; then select the PC com port that will be used to connect to the BASE • On the X-CTU “Modem Configuration” tab: Select the ‘Read’ button, modify parameters, then select the ‘Write’ button.This is one of several configuration methods. Refer to the manual for more information. Addressing ConsiderationsUnicast ModeBy default, XBee/XBee-PRO Modules are configured to operate in Unicast Mode -retries are enabled and receiving modules send an ACK (acknowledgement) of RFpacket reception to the transmitter. If the transmitting module does not receive anACK, it re-sends the RF data packet up to three times or until the ACK is received.Default addressing parameters:MY (16-bit Source Address) = 0DL (Destination Address Low) = 0DH (Destination Address High) = 0Broadcast ModeFor one RF module to communicate to many modules, one module (BASE) must beconfigured to operate in Broadcast Mode. When in Broadcast Mode, retries andacknowledgements are disabled. Broadcast Mode is enabled by setting DestinationAddresses as follows:DL (Destination Address Low) = 0x00000000DH (Destination Address High) = 0x0000FFFFRefer to the product manual for more information regarding addressing.Contact MaxStream (Office hours are 8am – 5pm U.S. Mountain standard time) Phone:(801)765-9885,LiveChat:,E-mail:***********************。

广州首易信息技术有限公司API接口使用手册说明书

广州首易信息技术有限公司API接口使用手册说明书

广州首易移动业务A P I (W e b S e r v i c e)使用手册广州首易信息技术有限公司2012年1月目录一、引言 (4)1.1 编写目的 (4)1.2 背景说明 (4)1.3 术语定义 (4)二、概述 (5)2.1 接口功能 (5)2.2 接口组成 (5)三、接口介绍 (6)3.1 网络结构 (6)3.2 运行环境 (6)3.3连接方式 (6)3.4 WebService地址 (6)3.5 WSDL描述文件 (7)四、API函数说明 (7)4.1短信部分 (7)4.1.1 Sms_Send函数 (7)4.1.2 Sms_GetRecv函数 (8)4.1.3 Sms_GetReport函数 (9)4.1.4 Sms_GetSign函数 (10)4.1.5 Sms_GetBalance函数 (10)4.2彩信部分 (11)4.2.1 Mms_UpFile函数 (11)4.2.2 Mms_GetFileStatus函数 (12)4.2.3 Mms_Send函数 (13)4.2.4 Mms_GetRecv函数 (14)4.2.5 Mms_GetReport函数 (15)4.3批量任务部分 (16)4.3.1 Task_UpFile函数 (16)4.3.2 Task_DelFile函数 (17)4.3.3 Task_SmsSend函数 (18)4.3.4 Task_GetSmsStatus函数 (19)4.3.5 Task_SmsStop函数 (20)4.3.6 Task_SmsStart函数 (20)4.3.7 Task_MmsSend函数 (21)4.3.8 Task_GetMmsStatus函数 (22)4.3.9 Task_MmsStop函数 (23)4.3.10 Task_MmsStart函数 (24)五、附件 (24)5.1错误代码汇总表 (24)5.2短信/彩信状态码汇总表 (27)5.3批量任务短信/彩信状态码汇总表 (27)一、引言1.1 编写目的广州首易的移动商务平台提供了强大的移动业务接入机制,现支持短信、彩信的全国应用。

XBee-PRO SX RF Modem 用户指南说明书

XBee-PRO SX RF Modem 用户指南说明书

XBee Radio Frequency(RF)Modems XBee-PRO SX RF ModemFeedbackTo provide feedback on this document,email your comments to*****************Include the document title and part number(XBee RF Modems User Guide,90001517C)in the subject line of your email.Hardware Front view(RS-232/RS-485variant)CAUTION!The RJ-45port is only for RS-232/RS-485connections.If you plug in any Powerover Ethernet(PoE)connection,it will damage the port.Hardware Front view(Analog/Digital I/O variant) Number FunctionRSSI LEDsRSSI LEDs indicate the amount of fade margin present in an active wireless link.Fade margin is the difference between the incoming signal strength and the modem's receiver sensitivity.3LEDs ON=Very Strong Signal(>30dB fade margin)2LEDs ON=Strong Signal(>20dB fade margin)1LED ON=Moderate Signal(>10dB fade margin)0LEDs ON=Weak Signal(<10dB fade margin)I/O and associate LEDsLEDs indicate RF modem activity as follows:Top LED(Yellow)=Serial Data OutMiddle LED(Green)=Serial Data InBottom LED(Red)=Associate Indicator(blinks when associated)USB Mini-B portThe USB Mini-B is to serve as a configuration port.Note that when the USB is plugged in,all RS-232 and RS-485communications on the RS-232/RS-485variant are disabled.DIP switchFor the RS-232/RS-485variant,these switches control the120Ωtermination for the receiving differential pairs in the RS-485mode.If the switch is in the up position,the RX termination is enabled. Switch1is for2-wire termination and Switch2is for4-wire termination.Do not enable these switches in RS-232mode.For the Analog/Digital I/O variant,these switches control pull-up outputs on pins5and6of the10-pin header.When the switch is in the up position,a10kΩpull-up to3.3V is enabled.If any other voltage besides3.3V is desired,an external pull-up is required.Do not enable these switches when digital inputs are desired.Reset and Commissioning buttonsThe top button is the Reset Button.The reset button resets,or re-boots the XBee RF Modem.The bottom button is the commissioning push button.It provides a variety of simple functions to aid in deploying devices in a network.See Commissioning Pushbutton behavior for information on how to use this.Antenna PortThe antenna port is a50ΩRF signal connector for connecting to an external antenna.The connector type is RPSMA(Reverse Polarity SMA)female.The connector has threads on the outside of a barrel and a male center conductor.Getting started with the XBee RF Modem Kit requirements Kit requirementsSystem requirementsThe software mentioned in this guide is compatible with the following operating systems:n Windows Vista or higher(32-bit or64-bit versions)n Mac OS X v10.6and higher versions(64-bit version only)n Linux with KDE or GNOME window managers(32-bit or64-bit versions)Additional requirementsThis guide assumes the use of at least two XBee RF Modems.It also assumes that you ordered twoaccessories kits along with the modems.Identify the kit contentsIf you ordered the accessories kit,it should include the following:Mini USB cablePower supplyRPSMA antennaDB9to RJ45adapterRJ45cableThis guide describes connecting and interacting with the USB and the RS-232ports on the XBee RFModem.If you want to connect to the RS-485protocol,see Interfacing protocols.Connect to the USB portIn order to properly connect the modem for this guide:Getting started with the XBee RF Modem Connect to the RS-232port1.Connect the antenna to the RPSMA connector on the XBee RF Modem.2.Plug the12V power supply into the power jack.3.Connect the mini USB cable from a PC to the USB port on the RF Modem.Connect to the RS-232portIn order to properly connect the modem for this guide:1.Connect the antenna to the RPSMA connector on the XBee RF Modem.2.Plug the12V power supply into the power jack.3.Connect the DB9to RJ45adapter to the serial port on your PC.4.Connect the RJ45cable from the adapter to the RJ45port on the RF Modem.Getting started with the XBee RF Modem Configure the device using XCTUConfigure the device using XCTUXBee Configuration and Test Utility(XCTU)is a multi-platform program that enables users to interact with Digi radio frequency(RF)devices through a graphical interface.The application includes built-in tools that make it easy to set up,configure,and test Digi RF devices.For full support of the XBee RF Modem,you must use XCTU version6.3.0or higher.For instructions on downloading and using XCTU,see the XCTU User Guide.Click Discover devices and follow the instructions.XCTU should discover the connected XBee RFModems using the provided settings.Click Add selected devices.The devices appear in the Radio Modules list.You can click a module to view and configure its individual settings.For more information on these items,see AT commands.Discover local XBee RF ModemsXCTU can discover radio modules that are connected directly to your computer.You can use thediscovery tool if you do not know the serial configuration of your XBee RF Modem,do not know the port it is connected to,or want to add multiple modules at once.1.Click the Discover radio modules button on the XCTU toolbar.The Discover radiomodules dialog box opens.4.Click Finish to initiate the discovery scan.A new dialog opens,displaying devices found and estimated time remaining.You can clickStop to halt the discovery process at any time.For example,you can stop the process if the modules you were looking for are already found.Getting started with the XBee RF Modem Configure a networkmode.list(Modembutton toGetting started with the XBee RF Modem Software libraries6.Select the DH(Destination Address High)of Modem1and type the SH of Modem2.7.Select the DL(Destination Address Low)of Modem1and type the SL of Modem2.8.Repeat steps6and7for Modem2.9.Click the Write button.This saves the settings to the modem.10.Select Serial console from the Tools drop-down menu on the main XCTU toolbar.Open aserial console for each modem.e the Console log section to type messages.Type Hello in one of the consoles.It shouldappear in the other console.This shows you have a basic network connected. Software librariesOne way to communicate with the XBee RF Modem is by using a software library.The librariesavailable for use with the XBee RF Modem include:n XBee Java libraryn XBee Python libraryThe XBee Java Library is a Java API.The package includes the XBee library,its source code and acollection of samples that help you develop Java applications to communicate with your XBeedevices.The XBee Python Library is a Python API that dramatically reduces the time to market of XBee projects developed in Python and facilitates the development of these types of applications,making it an easy process.WARNING!When operating at1W power output,observe a minimum separation distance of6ft(2m)between devices.Transmitting in close proximity of other devices can damage the device's front end.Operation Commissioning Pushbutton behaviorn Digital inputn Digital sinking driver outputThis section introduces XBee module concepts and commands.See the product manual for your XBee module for additional information.RS-232operationThe RS-232/RS-485variant of the XBee RF Modem defaults to RS-232mode.If the modem is not set to RS-232mode,set D2(DIO2/AD2)to0(default)or4.D3(DIO3/AD3)does not matter,but we recommend setting it to0(default).Set D7(DIO7/CTS)to1(CTS enabled,default).You can use the USB port to configure RS-232mode,but when it is plugged in the RS-232protocol does not function. RS-232wiring diagramsThe following diagram shows an RS-232DTE device wired to a DCE XBee RF Modem.The following diagram shows a DCE XBee RF Modem wired to a DCE RS-232device.The following diagram shows a sample wireless connection:DTE<-->DCE DCE<-->DCERS-485(2-wire)half-duplex operationTo set the RS-232/RS-485variant of the XBee RF Modem to RS-485(2-wire)half-duplex mode,set the D2and D3commands to5and the D7command to7.The USB port can be used to configure the RS-485(2-wire)mode,but while it is plugged in the RS-485(2-wire)protocol will not function.RS-485(2-wire)wiring diagramRS-485(4-wire)full-duplex operationTo set the RS-232/RS-485variant of the XBee RF Modem to RS-485(4-wire)full-duplex mode,set the D2command to5,the D3command to4,and the D7command to7.The USB port can be used to configure the RS-485(4-wire)mode,but while it is plugged in the RS-485(4-wire)protocol will not function.This mode can also communicate with RS-422devices,if desired.RS-485(4-wire)wiring diagramRS-485connection guidelinesThe RS-485/422protocol provides a solution for wired communications that can tolerate high noise and push signals over long cable lengths.RS-485/422signals can communicate as far as4000feet (1200m).RS-232signals are suitable for cable distances up to100feet(30.5m).RS-485offers multi-drop capability in which you can connect up e the RS-422protocol for point-to-point communications.To integrate the XBee RF Modem with the RS-485protocol,we suggest the following:Regulatory information FCC(United States) FCC(United States)FCC Part15Class BRadio Frequency Interface(RFI)(FCC15.105)This device has been tested and found to comply with the limits for Class B digital devices pursuant to Part15Subpart B of the FCC rules.These limits are designed to provide reasonable protection against harmful interference in a residential environment.This equipment generates,uses,and can radiateradio frequency energy,and if not installed and used in accordance with the instruction manual,may cause harmful interference to radio communications.However,there is no guarantee that interference will not occur in a particular installation.If this equipment does cause harmful interference to radio or television reception,which can be determined by turning the equipment off and on,the user isencouraged to try to correct the interference by one or more of the following measures:n Reorient or relocate the receiving antenna.n Increase the separation between the equipment and receiver.n Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.n Consult the dealer or an experienced radio/TV technician for help.Labeling requirements(FCC15.19)This device complies with Part15of FCC rules.Operation is subject to the following two conditions:(1)this device may not cause harmful interference,and(2)this device must accept any interferencereceived,including interference that may cause undesired operation.Modifications(FCC15.21)Changes or modifications to this equipment not expressly approved by Digi may void the user’sauthority to operate this equipment.Regulatory information ISED(Innovation,Science and Economic Development Canada) ISEDCAUTION!This equipment is approved for mobile and base station transmitting devices only.Antenna(s)used for this transmitter must be installed to provide a separation distance of atleast34cm from all persons and must not be co-located or operating in conjunction with anyother antenna or transmitter.Attention Cetéquipement est approuvépour la mobile et la station base dispositifsd'émission seulement.Antenne(s)utilisépour cetémetteur doitêtre installépour fournirune distance de séparation d'au moins34cmàpartir de toutes les personnes et ne doitpasêtre situéou fonctionner en conjonction avec tout autre antenne ouémetteur.XBee RF Modems User Guide42XBee RF Modems User Guide43Troubleshooting Reset the XBee RF Modem XBee RF Modems User Guide 44Reset the XBee RF ModemIf the XBee RF Modem loses its connection to the computer,you can attempt a reset.ConditionThe XBee RF Modem loses connection to the computer.SolutionEach XBee RF Modem has a reset button.The following image shows the location of the reset button as 1,the topbutton.Press this button to reset the module.However,this will not clear any changes written to the module.You can also press the reset button to reset the COM port for the board.To reconnect the module after pressing the reset button:1.In XCTU,click the Consoles working mode button on thetoolbar .2.Click the Closebutton .3.Click the Open button to restore theconnection .。

XBee模块开始指南说明书

XBee模块开始指南说明书

1Getting Started GuideThis guide provides instructions for setting up wireless links and testing the XBee module’s ability to transport data over varying ranges and conditions. It covers these tasks:Connect the hardwareInstall the software and drivers Perform a range testSet up a point-to-multipoint network Explore advanced configurationsCreate a long-range wireless link in minutes!Connect the hardware as shown in the following image:XBee ® & XBee-PRO ®802.15.4 Development KitConnect the HardwareInstall the Software and DriversInstall X-CTU SoftwareX-CTU is a stand-alone tool for configuring XBee modules. It can also be used to run a rangetest.To install X-CTU:1. Download X-CTU at /xctu.2. Browse to the folder to which you saved the above install file.3. Double-click on the installer file and follow the X-CTU Setup Wizard.4. When asked if you would like to check Digi's web site for firmware updates, click Yes.5. After the firmware updates are complete, click Close. Updates may take a few minutes; pleasebe patient.6. Start X-CTU by double-clicking on the X-CTU icon on your desktop, or by selecting Start >Programs > Digi > X-CTU.Install USB DriversThe XBee USB interface board is a "plug‐and‐play" device that should be detected by the PCautomatically. If you are using Windows 7 or Vista, the USB drivers should automatically install and a notification will appear in the lower right portion of your screen indicating success orfailure. If the USB drivers fail to install, please follow the USB driver installation instructionsfound here: /support/kbase/kbaseresultdetl.jsp?id=3214.If you are using Windows 2000 or XP, download and install the driver as per the followingdirections.To install the USB driver:1. Download the driver setup file at:/support/driver/FTDI_Windows_Driver_Setup.exe.2. Double‐click on the setup file. A window will pop up during installation and automaticallyclose when the process is complete. The USB interface board may now be connected to thecomputer.2Perform Range TestRun Range Testunch the X-CTU Software: Start > Programs > Digi > X-CTU2.Under the PC Settings tab, select the PC serial COM port that will be used. The USB portswill be labeled as Digi PKG-U Serial Port Adapters and are assigned a number based on yourPC's settings.3.Verify that the baud rate and data settings match the internal settings of the radios. Thedefault settings for the radios are Baud Rate: 9600, Flow Control: HARDWARE, Data Bits:8, Parity: NONE, and Stop Bits: 1.344. Select the Range Test tab.5. (Optional) Check the RSSI checkbox to enable the Received Signal Strength Indicator. The RSSI value indicates the signal strength of the last packet that the radio received.6. Click Start to begin the range test.7. Monitor the link quality by reading the Percent section on the Range Test tab. This section displays the running percentage of good packets sent to the receiving radio and looped back to the base.8. Click Stop to end the range test.Set up a Point-to-Multipoint NetworkRF Module ConfigurationThis section requires changing some of the radio’s internal settings. One simple method forconfiguration is as follows. In the X-CTU Modem Configuration tab, click Read . Select any of the module parameters you wish to change (e.g. Address, Encryption, etc.) and type in or select the desired value. Then click Write to save the changes to non-volatile memory.This is one of several configuration methods. Refer to the product manual for more information. To restore the module back to defaults, click Restore .Point-to-Multipoint AddressingPoint-to-multipoint topologies require one base module to be configured to operate in Broadcastmode (DL= 0xFFFF). This allows the module to broadcast messages to all devices in thenetwork.Remote modules can operate either in Broadcast or Unicast mode. Unicast mode is used whenyou want to send a message directly from one module to another. To do so, you set theDestination Address High (DH) of the sender to zero and the Destination Address Low (DL) ofthe sender to match the 16-bit Source Address (MY) of the recipient. The figure below depicts atypical point-to-multipoint network that contains one base and four remotes and their associated settings.Figure 4. Point-to-Multipoint Settings5Explore Advanced ConfigurationsConfigure Remote ModulesThe XBees can also be configured "over-the-air" using X-CTU. In order to use this feature, your base device must be configured for API mode.To send “over-the-air” commands:1.Go to the Modem Configuration tab and click the Remote Configuration option at the topof the window.2.Click Open Com Port and Discover from the menu bar at the top of the Network window.A list of all of the nodes in the network will populate the screen.3.Select a particular node from the list. You can interact with it as if it was connected to the PCdirectly.4.Click Read, Write, or Restore parameters on the main X-CTU window and those changeswill occur over the air on the remote module selected in the Network window.5.Close the Network window when you have finished with remote configuration.6Change Firmware VersionThese modules can also be set up for mesh communications. In some cases, a mesh solution maybe a better option. DigiMesh TM is better for networks needing routing capabilities. Also,DigiMesh provides the option for all the radios in the network to sleep synchronously. If youwant to try mesh mode, you can simply load different firmware on your XBees.These steps can also be used to update to the latest version of point-to-multipoint firmware.X-CTU is used to load different firmware on a locally connected radio.unch X-CTU and select the corresponding COM Port.2.Set the PC settings back to default. (Baud Rate: 9600, Flow Control: HARDWARE, DataBits: 8, Parity: NONE, Stop: Bits 1)3.Click on the Modem Configuration tab.4.Select the modem type. Choose XB24-DM or XBP24-DM to convert an XBee or XBee-PRO 802.15.4 module into a DigiMesh XBee or XBee-PRO 2.4 module. Leave the modemtype as XB24 or XBP24 to just update the point to multipoint firmware.5.Choose the Function Set and firmware Version desired.6.Click the Show Defaults button. This helps to avoid out of range errors since someparameters have different limits based on the firmware type.7.Check the Always update firmware box.8.Click Write.78End-to-End ConnectivityThese XBee modules are part of a family of cohesive devices. Digi’s Drop -in Networking solutions are designed to provide end-to-end wireless connectivity to distributed electronic devices so those devices can be accessed and managed from anywhere. Specifically Digi offers RF-to-Internet gateways that allow remote monitoring and control of an RF network. For more information about Digi gateways, see /products/wireless-routers-gateways .On a larger scale, multiple gateways controlling separate RF networks can be managed through our iDigi cloud services. The image above shows a secure connection to your devices through an iDigi account. Learn more about managing your remote devices at .Contact Digi InternationalFigure 7. Point-to-Multipoint。

XBee-PRO 900 嵌入式 RF 模块说明说明书

XBee-PRO 900 嵌入式 RF 模块说明说明书

XBee-PRO 900embedded RF modules combine fast point-to-multipoint networking with the RF range advantages of 900MHz technology.Built upon a 156Kbps RF platform,these modules are ideal for applications requiring low latency and increased data throughput.With RF line-of-sight (LOS)distances of up to six miles with a high gain antenna,XBee-PRO 900embedded RF modules are also ideal in applications where devices are distributed over great distances.XBee ProtocolsXBee embedded RF modules are available with different protocols to suit a variety ofapplications and networking topologies.Supported protocols include IEEE 802.15.4,the ZigBee PRO Feature Set,proprietary long range,and DigiMesh™.XBee modules share a common hardware footprint and are modeled after a common software API.Once deployed into an application,OEMs can rapidly change from one protocol to another with minimal time and development risk.Drop-in Networking CompatibilityXBee embedded RF modules are compatible with Digi’s Drop-in Networking adapters,network extenders and gateways that use the same protocol.This allows OEMs to embed XBee solutions into an application and have seamless communication to other devices using USB,RS-232,RS-485,digital I/O,analog I/O,Ethernet,Wi-Fi and cellular IP with plug-and-play ease.XBee-PRO900modules deliver 900MHz extended-range end-point connectivity using a fast point-to-multipoint protocol.Features/Benefits• 1.8miles/3km RF LOS range with 2.1dB dipole antenna •6miles/10km RF LOS range with high-gain antenna •Fast 156Kbps data rate to the end node •Supports sleep modes for increased battery life •Capable of deploying the DigiMesh protocol with a simple firmware change •Over-the-air configuration •Interoperable with Digi Drop-in Networking products utilizing XBee-PRO 900technology,including device adapters and gateways •Common XBee footprint for a variety of RF modules •Multiple antenna options •Industrial temperature rating (-40ºC to +85ºC)Point-to-Multipoint Embedded RF Modules for OEMs Product DatasheetOverviewXBee-PRO ®900Central Fitness ManagementEthernetConnectPort XGateway Wireless Telco NetworkInternet/Frame Relay/VPNFitness CenterCommunication SystemWorkout InfoEquipment Health InfoEntertainmentInfoXBee-PRO Module EntertainmentServicesMaintenance IndicatorTimerPulse GaugeOdometerVibrationPower ConsumptionPort wa yFitness EquipmentCom m CoC mu Sy Sys -P R O ulee91001475A2/708©2008Digi International Inc.All rights reserved.Digi,Digi International,the Digi logo,the When Reliability Matters logo,DigiMesh,XBee and XBee-PRO are trademarks or registered trademarks of Digi International Inc.in the United States and other countries worldwide.All other trademarks are the property of their respective owners.Digi Internationa l11001Bren Road E.Minnetonka,MN 55343U.S.A.PH:877-912-3444952-912-3444FX:952-912-4952email:*************Digi Internationa l France31rue des Poissonniers 92200Neuilly sur Seine PH:+33-1-55-61-98-98FX:+33-1-55-61-98-99www.digi.frDigi Internationa l KKNES Building South 8F 22-14Sakuragaoka-cho,Shibuya-kuTokyo 150-0031,Japan PH:+81-3-5428-0261FX:+81-3-5428-0262www.digi-intl.co.jpDigi Internationa l (HK)LimitedUnit 3206–08A,32/F ,AIA Tower183Electric Road,North Point,Hong Kong PH:+852-2833-1008FX:+DIGI SERVICE AND SUPPORT -You can purchase with confidence knowing that Digi is here to support you with expert technical support and a one-year warranty./supportDigi International ,the leader in device networking for business,develops reliable products and technologies to connect and securely manage local or remote electronic devices over the network or via the web.With over 20million ports shipped worldwide since 1985,Digi offers the highest levels of performance,flexibility and quality.Please visit for part numbers.。

DigiMesh_XBEE网络层原理

DigiMesh_XBEE网络层原理

休眠路由器的休眠周期本章节将讨论休眠路由状态。

我们将对每个状态的定时和活动等进行阐述。

在正常操作期间,以下状态将按照以下顺序进行。

布置模式为特殊情况,其休眠路由器状态顺序没有在下图中显示。

在本章节中,定时图将使用以下颜色代码:休眠路由器状态描述:保护时间(Guard Time)。

由于所有网络节点的定时保持硬件都会有少许变动,必须考虑一定程度的漂移。

保护时间可以使每个网络节点在发射时间内处于唤醒状态。

保护时间根据节点未收到的同步消息的个数来调节。

拖延时间(Holdoff Time)。

在同步网络中,所有的节点几乎在相同时间点上唤醒。

如果所有的节点都在唤醒后立马发射的话,会产生RF碰撞。

通过将节点开启发射的时间随机化,可拖延时间可以减轻RF碰撞。

休眠协调器在拖延时间的开端进行同步消息发送。

发射时间。

发射时间(Transmit Time)。

在网节点之间的数据传输在发射状态进行,同时同步信息也是在这个期间进行传播的。

如果休眠协调器在延时时间内未收到其同步信息的重播,则其将在发射时间内第二次发送同步信息。

在延时时间同时还会发送选举信息(Poll message,如下)。

休眠延迟时间(Delay Sleep Time)。

处于同样理由同样需要保护时间,通过减少休眠时间长度来保证节点在同步消息到来时可以收听到。

如果模块处于同步状态则此状态不会执行(其时间为0)。

其增加长度依据于未收到同步消息的周期数。

休眠时间(Sleep Time)。

在休眠状态周期同步休眠节点(SM8)将进入低功耗模式。

通过SP命令可以规定休眠时间长度。

基于休眠延迟时间和及早唤醒时间而将减少休眠时间。

及早唤醒时间(Early Wakeup Time)。

及早唤醒状态与休眠延迟状态很像,而及早唤醒状态将发生在休眠时间前而不是之后。

如果唤醒主机参数(WH)被使用,则及早唤醒时间长度由WH命令规定,而不用通过以下长度计算。

休眠路由器状态和同步信息部署模式部署模式用于辅助网络部署以及允许休眠协调器在复位后(有意或无意)快速再加入已有网络。

XBee模块简单操作说明

XBee模块简单操作说明

Digi XBee模块操作说明本文旨在帮助初次使用Digi公司的XBee无线模块快速熟悉产品和操作配置方法。

模块操作以Zigbee协议为例,其它无线协议方法类似,具体请查看相关模块的产品说明书。

在使用过程中,如果疑问或发现错误的地方,请联系当地代理商技术支持,或直接联系robin.tu@。

一、使用前的准备工作XBee模块产品按协议和频率,传输能力的不同,共有数十种。

大多数XBee模块产品的串口引脚和电源引脚均相同,可以直接替换。

Digi公司的开发套件中带有通过电脑串口或USB口操作模块的开发底板,用户可以很方便使用串口调试工具或是Digi公司的X-CTU调试工具对模块进行各种配置。

X-CTU是Digi出品的一款Windows下的模块调试配置工具,拿到Digi产品,首先必须安装X-CTU。

X-CTU下载地址:/support/utilities/40003002_B.exe请确保计算机能访问互联网,在安装过程中会出现提示:请选择Yes,以下载Digi模块产品的固件库,这样在操作不同模块时,X-CTU能识别最新固件的模块,并显示相应的AT命令集。

下载过程较长,大约需15-30分钟。

安装好X-CTU后,如果您使用USB接口的底板或产品,还需要安装一下USB转串口的驱动程序。

Digi模块产品的说明书和驱动,均可以在网站上找到。

Digi Zigbee模块S2B产品说明书下载地址:/support/documentation/90000976_M.pdf使用Digi的底板调试程序,其中USB接口的XBIB-U开发底板需装驱动程序,如果操作系统没有自动识别,请到下面地址下载:/support/productdetail?pid=4772小贴示:查找Digi产品的使用说明书和驱动,工具等,可以通过菜单上,点击”Support”,在提示框中输入产品的部分或全部名称来搜索相关文档。

Digi Xstick简单说明可以在/support/documentation/90000891_E.pdf找到。

XBEE模块中文说明书

XBEE模块中文说明书

The XBee and XBee-PRO OEM RF Modules were engineered to operate within the ZigBee protocol and support the unique needs of low-cost, low-power wireless sensor net-works. The modules require minimal power and provide reliable delivery of data between remote devices. Both modules operate within the ISM 2.4 GHz frequency band and are pin-for-pin compatible with each other.XBee和XBee - PRO OEM RF模块的设计,以ZigBee协议内运作,支持低成本的独特需求,低功耗无线传感器网络工程。

模块只需要最小的功率,就能提供远程设备之间的数据传输的可靠性。

这两个模块内运作的ISM 2.4 GHz频段,且引脚对引脚相互兼容。

1.1Key Features/主要特点XBee XBee-PROHigh Performance, Low Cost 高性能、低成本indoor/Urban: up to 100‟(30 m)outdoor line-of-sight: up to 300‟(100 m)transmit Power: 1 mW (0 dBm)receiver Sensitivity: -92 dBm室内/城市:距离100'(30米)户外线的视线:300'(100米)发射功率:1毫瓦(0 dBm时)接收灵敏度:-92 dBm的Indoor/Urban: up to 300‟(100 m)outdoor line-of-sight: up to 1 mile (1500m)transmit Power: 100 mW (20 dBm) EIRPreceiver Sensitivity: -100 dBmRF Data Rate: 250,000 bps室内/城市:300'(100米)户外线的视线:高达1英里(1500米)发射功率:100毫瓦(20 dBm的)的EIRP接收灵敏度:-100 dBm的射频数据传输速率:250,000个基点Lower power 低功率TX Current: 45 mA (@3.3 V)RX Current: 50 mA (@3.3 V)Power-down Current: < 10 μATX电流:45毫安(@ 3.3伏)RX电流:50毫安(@ 3.3伏)掉电电流:<10微安TX Current: 215 mA (@3.3 V)RX Current: 55 mA (@3.3 V)Power-down Current: < 10 μATX电流:215毫安(@ 3.3伏)RX电流:55毫安(@ 3.3伏)掉电电流:<10微安Advanced Networking & Security/先进的网络和安全Retries and Acknowledgements DSSS (Direct Sequence Spread Spectrum)Each direct sequence channel has over 65,000 unique network addresses available Point-to-point, point-to-multipoint and peer-to-peer topologies supported Self-routing, self-healing and fault-tolerant mesh networking重试和确认。

XBEE和ZigBee的区别

XBEE和ZigBee的区别

XBEE和ZIGBEE的区别ZigBee和XBee经常混淆,有时可以互换使用,因为它们听起来是一样的。

但实际上,它们非常不同。

下面,我们将介绍每种情况的解释,当您选择其中一种或两种情况时。

ZigBeeZigBee是基于IEEE 802.15.4的无线2.4 GHz标准。

您可以在其上运行许多不同的应用程序配置文件堆栈- 并且由于它由标准主体管理,因此它可以跨多个制造商进行互操作。

ZigBee是一个网状网络,因此ZigBee系统中的每个节点都可以充当无线数据端点或转发器。

数据从节点传播到节点,直到到达路由器。

它专为相对较低的数据速率应用而设计,常用于家庭自动化和智能照明。

XBeeXBee嵌入式模块实际上包含三个含义:同一外形,同一主机接口和一组不同的协议。

它专为各种用途而设计,从ZigBee到高吞吐量,低延迟应用。

关于Xbee的一个好处是它可以做任何ZigBee可以做的事情(如果你使用ZigBee版本),但它在相同封装和主机接口下,还包括不同协议栈。

例如,sub-GHz XBee无线电允许您拥有比2.4-GHz ZigBee无线电更长的范围。

硬件封装相同,及具有相同外形尺寸和引脚配置。

它有一个20针或37针插座(取决于您选择的硬件PCB封装),占用电路板上非常小的空间。

这种配置使您可以更轻松地将新设备推向市场,因为如果外形尺寸相同,则主机接口是相同的。

换句话说,如果ZigBee 网络适用于一个应用程序,但您需要扩展范围,例如非网状协议,则可以使用相同的软件在设备和调制解调器之间进行通信。

主机接口API是XBee的另一个重要组成部分。

它是可互换的,可以处理不同类型的通信,包括ZigBee、802.15.4和WiFi。

Digi也产生一个专有的网状协议称为“Digimesh”。

与ZigBee不同,Digimes只有一个节点类型。

所有节点都可以路由数据并可互换。

ZigBee Vs. XBee: 你应该选择哪一个?在XBee上选择ZigBee的原因:1.一个现成的ZigBee Modem反而比XBee便宜一点。

Legacy XBee 868LP和新XBee SX 868产品说明书

Legacy XBee 868LP和新XBee SX 868产品说明书

same channels as S8 except for 9 and
Transmissions may occur on any subset of 24 which are excluded for
30 channels from 0 to 29
certification purposes
0x24 identifies the module
28 Personal Area Network identifier (PAN ID)
and 64-bit addresses 128 bit AES
Notes (If Applicable)
PCB antenna variant no longer supported
Improved Improved Improved Improved Improved Improved No compatibility impact
Adjusted for new RED standards Improved
Excludes channels 9 and 24 for transmitting. Still compatible for receiving on those channels.
1
Other Unique Feature Differences
0x45 identifies the module
0x0A02 identifies the module
0x0800 identifies the module
0xC0000 identifies the module
0x110000 identifies the module
Not available
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

DIGI XBEE RPO模块API帧说明注明1:[1]到[6]需测试XBEE PRO模块验证其结果。

[1]发送选项0x08不被支持。

[2]发送API帧,最大RF数据负载不是72字节,由AT指令中NP命令查看。

[3]64bit目标地址可以设为0,作为协调器地址。

[4]最大广播半径是32。

[5]在节点识别指示器(0x95)中,AT指令中NO命令可以被用包含DD参数。

[6]14)节点识别指示器帧的结构需确定。

注明2:nBytes代表字段的大小是可变的。

注明3:API帧中的转义字符(Escape Characters),A T指令中AP命令参数等于2时。

UART帧的收发就需要注意以下方面:当发出或者到一个串口的数据帧时,特殊数据值必须进行转义,这样的帧就不会与数据帧序列干扰。

为了转义干扰数据字节,插入0x7D,其后的字节与0x20异或。

需要转义的数据字节有:0x7E,0x7D,0x11,0x13。

转义字符不参于检验和运算。

DIGI XBEE RPO模块API不同类型帧的详细说明:API Frame Names ValuesModem Status 0x8AA T Command 0x08A T Command - Queue Parameter V alue 0x09A T Command Response 0x88Remote Command Request 0x17Remote Command Response 0x97ZigBee Transmit Request 0x10Explicit Addressing ZigBee Command Frame 0x11ZigBee Transmit Status 0x8BZigBee Receive Packet (AO=0) 0x90ZigBee Explicit Rx Indicator (AO=1) 0x91ZigBee IO Data Sample Rx Indicator0x92XBee Sensor Read Indicator (AO=0) 0x94Node Identification Indicator (AO=0) 0x951)MODEM状态帧(RF模块状态信息从模块发出)(什么条件产生此帧)API标志符:0x8AAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x8A(1Byte)Identifier specific Data(1Byte)---返回modem具体状态0=Hardware reset1=Watchdog timer reset2=Associated3=Disassociated4=Synchronization lost(Beacon-enabled only)5=Coordinator realignment6=coordinator startedChecksum:0xFF-( Frame Data各个元素的和)(1Bytes)返回头部2)AT命令帧(使用API帧允许对所有模块参数寄存器进行查询或者设定)API标志符:0x08API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x08(1Byte)Identifier specific Data(n Bytes)---[Frame ID] + [A T command] + [Parameter V alue][Frame ID]:1Byte, Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no response is sent.[A T command]:2 Bytes, Command Name - Two ASCII characters that identify the A T Command.[Parameter V alue]:n Bytes, If present, indicates the requested parametevalue to set theGiven register.If no characters present, register is queried.Checksum:0xFF-( Frame Data各个元素的和)(1Bytes)返回头部3)AT命令-队列参数值帧(使用API帧允许模块参数可以被排列或者设定)(相对“AT命令”类型,新的参数被排队而不被应用,直到“AT命令”类型,或者AC命令发出).API标志符:0x09API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x09(1Byte)Identifier specific Data(n Bytes)--- [Frame ID] + [A T command] + [Parameter V alue][Frame ID]:1Byte, Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no response is sent.[A T command]:2Bytes, Command Name - Two ASCII characters that identify the A T Command. [Parameter V alue]:n Bytes, If present, indicates the requested parametevalue to set the given register.If no characters present, register is queried.返回头部4)AT命令反馈帧(对AT命令的反馈,一些命令将会反馈多个帧)API标志符:0x88API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x88(1Byte)Identifier specific Data(n Bytes)---[ Frame ID]+[ A T Command]+[ Status]+[ V alue][Frame ID]: 1Byte,Identifies the UART data frame being reported.Note: If Frame ID = 0 inA T Command Mode, no A T Command Response will be given.[A TCommand]:2Bytes,Command Name -Two ASCII characters that identify the A T Command. [Status]:1Byte0 = OK1 = ERROR2 = Invalid Command3 = Invalid Parameter[V alue]: nByte,The HEX (non-ASCII) value of the requested register.返回头部5)远程AT命令请求帧(允许远程对模块参数寄存器进行查询或者设定)API标志符:0x17API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x17(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [64-bit-Destination-Address] + [16-bit DestinationNetwork Address] + [Command Options] + [Command Name]+[Command Data] [FrameID]: 1Byte,Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no A T Command Response will be given.[64-bit-Destination-Address]:8Bytes,Set to match the 64-bit address of the destination, MSB first,LSB last. Broadcast =0x000000000000FFFF.[16-bit-Destination-Network-Address]:2Bytes,Set to match the 16-bit network address of the destination, MSBfirst, LSB last. Set to 0xFFFE for broadcast TX, or if the networkaddress is unknown.[Command Options]: 1Byte,0x02 - Apply changes on remote. (If not set, AC command must be Sent before changes will take effect.)All other bits must be set to 0.[Command Name]:2Bytes, Name of the command[Command Data]: nBytes,If present, indicates the requested parameter value to set the given register. If no characters present,the register is queried.返回头部6)远程命令反馈(相对于远程AT命令请求)API标志符:0x97API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x97(1Byte)Identifier specific Data(n Bytes)---[Frame ID] + [64-bit Responder Address] + [16-bit Responder Network Address] + [A T Command]+[Status] + [V alue][Frame ID]: 1Byte, Identifies the UART data frame being reported.Matches the Frame ID of the Remote Command Request the remote is responding to.[64-bit Responder Address]: 8Bytes,Indicates the 64-bit address of the remote module that is responding to the Remote A T Command request[16-bit Responder Network Address]: 2Bytes,Set to the 16-bit network address of the remote. Set to 0xFFFE if unknown.[A T Command]:2Bytes,Command Name -Two ASCII characters that identify the A T Command. [Status]:1Byte0 = OK1 = ERROR2 = Invalid Command3 = Invalid Parameter[V alue]: n Bytes,The HEX (non-ASCII) value of the requested register.返回头部7)Zigbee发送请求帧(TX请求消息将使模块发出RF包)TX包帧API标志符:0x10API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x10(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [64-bit-Destination-Address] + [16-bit DestinationNetwork Address] + [Broadcast Radius] + [Options] + [ RF Data] [FrameID]: 1Byte,Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no A T Command Response will be given.[64-bit-Destination-Address]:8Bytes,Set to match the 64-bit address of the destination, MSB first,LSB last. Broadcast =0x000000000000FFFF.[16-bit-Destination-Network-Address]:2Bytes,Set to match the 16-bit network address of the destination, MSBfirst, LSB last. Set to 0xFFFE for broadcast TX, or if the networkaddress is unknown.[Broadcast Radius]: 1Byte, Sets maximum number of hops a braodcast transmission can traverse. If set to 0, the TX raidus will be set to the maximum hop value (10). [Options]:1Bytes, 0x08 =Send multicast transmission. (Unicast set if not sent.) All other bits Must be set to 0.[RF Data]: nBytes, Up to 72 Bytes per packet返回头部8) Explicit Addressing ZigBee命令帧(帧中允许应用层区域“终端和簇ID”被指定)API标志符:0x11API帧的结构:API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x11(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [64-bit-Destination-Address] + [16-bit DestinationNetwork Address] + [Source endpoint] + [Destination endpoint] + [Cluster ID] + [Profile ID] +[Broadcast Radius]+ [Options] + [RF Data][FrameID]: 1Byte,Identifies the UART data frame for the host to correlate with a subsequent ACK(acknowledgement).If set to ‘0’, no A T Command Response will be given.[64-bit-Destination-Address]:8Bytes,Set to match the 64-bit address of the destination, MSB first,LSB last. Broadcast =0x000000000000FFFF.[16-bit-Destination-Network-Address]:2Bytes,Set to match the 16-bit network address of the destination, MSBfirst, LSB last. Set to 0xFFFE for broadcast TX, or if the networkaddress is unknown.[Source endpoint]: 1Byte,Source endpoint for the transmission.[Destination endpoint]: 1Byte, Destination endpoint for the transmission.[Cluster ID]:2 Bytes,Cluster ID used in the transmission[Profile ID]:2 Bytes, Profile ID used in the transmission[Broadcast Radius]: 1Byte, Sets the maximum number of hops a broadcast transmissioncan traverse. If set to 0, the transmission radius will be set tothe network maximum hops value. [Options]:1Bytes, Set to 0[RF Data]: nBytes, RF data size must be less than oequal to the maximum number ofRF data bytes (NP command).返回头部9)ZigBee发送状态帧(TX状态帧,TX请求完成时,模块会发出状态信息,这个信息将给出数据包是否被成功发送,或者发送失败)API标志符:0x8BAPI帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x8B(1Byte)Identifier specific Data(n Bytes)---[FrameID] + [Remote Network Address]+ [Transmit Retry Count] + [Delivery Status] + [Discovery Status][FrameID]:1Byte, Identifies UART data frame being reported.[Remote Network Address]: 2Byte, 16-bit Network Address the packet was delivered to(if success). If not success, this address matches the Destination Network Address that was provided in the Transmit Request Frame.[Transmit Retry Count]: 1Byte, The number of applicationtransmission retries that took place. [Delivery Status]: 1Byte,0x00 = Success0x02 = CCA Failure?0x15 = Invalid destination endpoint0x21 = Network ACK Failure0x22 = Not Joined to Network0x23 = Self-addressed0x24 = Address Not Found0x25 = Route Not Found[Discovery Status]: 1Byte,0x00 = No Discovery Overhead0x01 = Address Discovery0x02 = Route Discovery0x03 = Address and Route Discovery返回头部10)ZigBee接收帧(RX包帧,模块收到RF包时,将把RF信息发出到UART)API标志符:0x90API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x90(1Byte)Identifier specific Data(n Bytes)---[64-bit Address] + [16-bit Network Address]+ [Options] + [RF Data][64-bit Address]:8Bytes[16-bit Network Address]:2 Bytes[Options]:1Byte,0x01 - Packet Acknowledged0x02 - Packet was a broadcast packet[RF Data]:nBytes, Up to 72 Bytes per packet返回头部11) ZigBee Explicit RX指示器帧(模块收到RF包时,将把RF 信息发到UART,AO=1)API标志符:0x91API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x91(1Byte)Identifier specific Data(n Bytes)---[64-bit Source Address] + [16-bit Source Network Address] + [Source endpoint] + [Destination endpoint] + [Cluster ID] + [Profile ID] + [BroadcastRadius] + [Options] + [RF Data][64-bit Source Address]:8Bytes,[16-bit Source Network Address]:2Bytes,[Source endpoint]: 1Byte,Source endpoint for the transmission.[Destination endpoint]: 1Byte, Destination endpoint for the transmission.[Cluster ID]:2 Bytes, Cluster ID the packet was addressed to.[Profile ID]:2 Bytes, Profile ID the packet was addressed to. (Multiple profile IDsnot yet supported.)[Broadcast Radius]: 1Byte, Sets the maximum number of hops a broadcast transmissioncan traverse. If set to 0, the transmission radius will be set tothe network maximum hops value. [Options]:1Bytes,0x01 – Packet Acknowledged0x02 – Packet was a broadcast packet[RF Data]: nBytes, RF data size must be less than equal to the maximum number ofRF data bytes (NP command).返回头部12) ZigBee IO数据采样Rx 指示器帧(模块从远程设备收到I/O采样帧时,会将数据帧发出到串口)API标志符:0x92API帧的结构:API帧中字段说明:Start Identifier:0x7E(1Byte)Frame Data Length:MSB---LSB(2Bytes)Frame Data:API Identifier + Identifier specific Data(cmd Data)Frame Data详细说明:API Identifier---0x92(1Byte)Identifier specific Data(nBytes)---[64-bit Address] + [16-bit Network Address] + [Receive Options] + [Num Samples] + [Digital Channel Mask] + [Analog Channel Mask] + [Digital Samples] + [Analog Samples][64-bit Address]:8Bytes,[16-bit Network Address]:2Bytes,[Receive Options]:1Byte,0x01 - Packet Acknowledged0x02 - Packet was a broadcast packet[Num Samples]:1Byte,Number of sample sets included in the payload. (Always set to 1) [Digital Channel Mask]:2Bytes,Bitmask field that indicates which digital IO lines on the remote have sampling enabled (if any)[Analog Channel Mask]:1Byte, Bitmask field that indicates which Analog IO lines on the remote have sampling enabled (if any).[Digital Samples]:2Bytes, If the sample set includes any digital IO lines (Digital Channel Mask > 0), these two bytes contain samples for all enabled digital inputs. DIO lines that do not have sampling enabled return 0. Bits in these 2 bytes map the same as they do in the Digital Channels Mask field.[Analog Samples]: 2 bytes each sample, If the sample set includes any analog input lines (Analog Channel Mask > 0), each enabled analog input returns a 2-byte value indicating the A/D measurement of that input. Analog samples are ordered sequentially from AD0/DIO0 to AD3/DIO3, to the supply voltage.返回头部13)XBee传感器读取指示器帧(暂不)14)节点识别指示器帧(当模块发送节点信息给协调器以标志它自己时,协调将收到这个帧.“AO=0”.这个帧的数据部分与节点发现反馈帧相似.“AT指令中的ND命令”)(帧的结构需通过模块验证)余锡钱,09-08-28整理DIGI XBEE RPO模块重要的A T命令说明(调试过程中验证):。

相关文档
最新文档