Home
User Manual Wireless AT for deRFmodules
Contents
1. The sections below provide detailed descriptions of the commands that shall be used to configure and operate a secured network 6 4 1 WSECON Enable Disable security Table 49 WSECON Enable Disable security ECON lt value gt The command enables disables security for a network join and data exchange on the device value is a Boolean type 1 means that the ZigBee PRO standard security mechanism is enabled on the node 0 implies that encryption is not used by the node Notes 1 The command is not accessible when the node is joined to a network 2 The command configures the CS_ SECURITY ON parameter in the BitCloud stack WSECON The command returns value indicating whether security on the node is enabled or not The command requests the range of supported values Result codes OK is returned if value is in range otherwise ERROR is returned Example AT WSECON 1 OK AT WSECON WSECON 1 OK AT WSECON WSECON 0 3 Default value OK value is stored in the NVRAM Node types Coordinator router end device Supported stack ZigBee Note only available on deRFmega256 based platforms www dresden elektronik de Page 47 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 4 2 WSECSTATUS Set Get security status Table 50 WSECSTATUS Set Get security status Explanation WSECSTATUS lt value gt The command configures the se
2. Figure 8 Installation on Windows 7 Editions To check the connection AT should be entered in the terminal window followed by a CR see Figure 4 5 Command summary 5 1 AT commands The AT commands implemented in Wireless AT include the following categories e Network configuration and management e Data transmission e Power management e Generic control e Host interface control e Hardware control e Remote management Table 5 provides a full list of Wireless AT commands along with information about supporting node roles and stack type syntaxes corresponding S registers if any and persistence www dresden elektronik de Page 16 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Table 5 Command summary Command Node type C R E Supported stack type Parameter set syntax Parameter read syntax Parameter test syntax Action syntax Networking parameters WPANID WCHAN WCHMASK WAUTONET WROLE GSN or 14 WSRC WNWKPANID Short network PAN ID WJOIN WLEAVE WPARENT Request for parent address WCHILDREN Request for children addresses WNBSIZE Request for a number of neighbor nodes WNB Request for neighbors information CRE 30 Network addressing mode CRE WLQl Request for LQI pcRE z TX S f WRSSI Request for RSSI porRE Z xX Security F WSECON Enable disable security che z x x _ WSECSTATUS Set ge
3. Fuses Lock bits Production file Fuse Register Value EXTENDED OxFE HIGH 0x91 Low OxCE Copy to clipboard V Verify after programming Program Verify Read v Auto read Starting operation verify registers Verify register EXTENDED OK Verify register HIGH OK Verify register LOW OK Verify registers OK Verify registers OK Figure 10 Fuse setting Attention No fuse and memory access via JTAG and ISP is possible if JTAGEN and SPIEN fuses are deactivated www dresden elektronik de Page 89 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 8 References 1 User Manual Radio Modules deRFmega128 http www dresden elektronik de funktechnik products radio modules avr single chip modules description L 1 amp elD dam_frontend_push amp docID 691 2 User Manual deRFmega128 deRFmega256 http www dresden elektronik de funktechnik products radio modules oem modules derfmega description L 1 amp elD dam_frontend_push amp doclID 1250 3 User Manual Software Programming For Radio Modules and USB Sticks http Awww dresden elektronik de funktechnik products radio modules oem modules derfmega description L 1 amp elD dam_frontend_push amp docID 1917 4 Atmel BitCloud ZigBee Pro SDK http www atmel com tools bitcloud zigbeepro aspx 5 User Manual deRFnode deRFgateway http www dresden elektronik de f
4. ceeeeeeeeeeeee eter ee eeeeeeeaeeeeeeeeeteeeeeaaees 30 6 1 9 Parameter test command SYNAX cee eect eee eter eeeeeeeeeeeeeeeeeeeeeeaaees 30 61 10 S FOg S ErS kerisna a a heer eee wees 31 6 1 11 Device responses wt c ish eoeeenaee naa eneameeee 32 6 1 12 Information text formats sick iuesceacevetaxhdch si ceecevastenadb ai seceuaneesnclectacewetea tacts 33 6 2 Networking parameters iccitiiccs seeticeteeacxsavedsncpatoedaxsanvies cnateriaxeseedaavounvebnenneeiuawennvess 33 6 2 1 WPANID Set Get extended PAN ID cc ccceeeeeieeeenteeeeeeeeeeeeeetaees 34 6 2 2 WCHAN Get active Channel eececececcee eee eeeeeeeeeeeeeeeeeeeeeeeeaaaees 34 6 2 3 WCHMASK Set Get channel mask ccceeeeeeeseceeeeeeeeeeeeeneeees 35 6 2 4 WCHPAGE Set Get channel page cccceeeesessceeeeeeeeeteeeenaeees 36 6 2 5 WAUTONET Enable Disable automatic networking c 37 6 2 6 WROLE Set Get node role coordinator router end device 37 6 2 7 GSN Set Get extended MAC address eeeeeeeeeeeeeeeeeeeteeeeeeeees 38 6 2 8 WSRC Set Get short NWK addres eee eeettteeeeeeeeteeeeeaeees 39 6 2 9 WNWKPANID Set Get short NWK PANID ceeeeeeteeeeeeeeees 40 www dresden elektronik de Page 2 of 91 User Manual Version 1 2 2014 10 24 6 3 6 4 6 5 6 6 6 7 6 8 Wir
5. I O pins please refer to Section 7 Initially a generally valid example is given in Table 16 for all supported boards the command sets the GPIO pins as output On certain boards some GPIOs are already connected to LEDs or buttons which can be directly controlled via the GPIO commands However the GPIO connected to a LED or button varies on the different platforms Please refer to Section 7 for a detailed description of the connections for your platform The same refers to PWM and ADC channels which may be already connected to LEDs headers or extensions for direct control dependent on the used board see Section 7 for a details www dresden elektronik de Page 24 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Table 16 Configure I O pins Configure GPIOO GPIO1 GPIO2 for output The following examples are only valid for the deRFnode board where GPIOO is connected to lO header 24 GPIO1 is connected to SW1 active low and GPIO2 is connected to LED1 active low PWMO is connected to IO header 09 and ADCO is connected to IO header 15 please refer to Section 7 1 5 for the pin assignment Table 17 Examples for deRFnode Configure GPIO2 for output LED1 is switched on Configure GPIO1 for input and turn on internal pull up Press button before issuing command SW1 is in the ON state ATS140 3 S 143 1 S146 13 Operates GPIO1 as PWM channel1 with a frequency of 10 kHz and duty cycle OK
6. 6 7 5 GMI Get manufacturer identifier Table 69 GMI Get manufacturer identifier Syntax Explanation GMI I1 The command instructs the node to output information text identifying the manufacturer Result codes OK is always returned Example AT GMI GMI dresden elektronik OK ATI1 dresden elektronik Just an alias to GMI OK Node types Coordinator router end device Supported stack ZigBee www dresden elektronik de Page 61 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 7 6 GMM Request for the model identifier Table 70 GMM Request for the model identifier Syntax Explanation GMM I2 The command instructs the node to transmit information text identifying the particular model of the device Result codes OK is always returned Example AT GMM GMM deRFmega256 OK ATI2 Just an alias to GMM deRFmega256 OK Node types Coordinator router end device Supported stack ZigBee 6 7 7 GMR Request for the hardware software revision identifier Table 71 GMR Request for the hardware software revision identifier Syntax Explanation GMR I3 This command instructs the node to transmit an information text intended to identify the actual revision of hardware or software product burned into the device Result codes OK is always returned Example
7. WNBSIZE 2 5 OK Node types Coordinator router end device www dresden elektronik de Page 43 of 91 User Manual Version 1 2 2014 10 24 6 3 7 Wireless AT for deRFmodules WNB Get neighbor information Table 45 WNB Get neighbor information WNB lt node_role gt lt device addr gt Result codes Example Node types Supported stack www dresden elektronik de Explanation The command requests the contents of node s neighbor table The node_role parameter specifies the node role of neighboring nodes to be extracted from the neighbor table The following values are accepted 0 coordinator 1 router 2 end device 3 all device types Optional parameter device addr specifies the address of the neighboring node to be extracted If the S30 register is set to 0 device addr is accepted as the short NWk address If the S30 register is set to 1 device addr is expected to be an extended MAC address See Table 46 for details The command s information response has the following format seqNr nodeRole extAddr nwkAddr relationship depth where seqNr is the sequence number in the neighbor table nodeRole is the node role of the neighbor extAddr is the neighbor s extended address nwkAddr is the neighbor s network address relationship is the neighbor s relationship to the current node 0 parent 1 child 3 no relationship depth
8. is the neighbor s network depth Notes 1 A neighbor entry is removed from the table if the node during a certain interval doesn t receive any periodic management frames expected from the neighbor If neighbor is a router coordinator this interval is 45 seconds management frames are sent once per 15 sec onds If the neighbor is an end device then the interval equals 3 x sleep_interval sync _period as configured on the node by wPWR and WSYNCPRD commands Although right after network join an end device node can have information about several nodes in its neighbor table only the actual parent node persists in the table while information about other nodes is removed shortly after an end device join The same is valid for informa tion about an end device neighbor in a long term period it is present only in the neighbor table of its parent and is not directly visible for other routers in its neighborhood This command does not cause network operations and just returns information from the node s current neighbor table OK is returned if the node is in the network If the node is not in the connected state ERROR will be returned AT WNB 3 1 O 0000000000000001 0000 3 2 1 0000000000000002 0002 0 OK AT WNB 1 2 1 1 0000000000000002 0002 0 OK Coordinator router end device Page 44 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 3 8 S30 Set nod
9. CS_NWK_BTT_SIZE CS_ADDRESS_MAP_TABLE_SIZE CS_ROUTE_DISCOVERY_TABLE_SIZE CS_APS_DATA_REQ_BUFFERS_AMOUNT CS_APS_ACK_FRAME_BUFFERS_AMOUNT CS_DUPLICATE_REJECTION_TABLE_SIZE CS_NWK_BUFFERS_AMOUNT Their values shall be taken into account during network establishment and operation Details about each parameter can be found in BitCloud Stack Documentation see 8 www dresden elektronik de Page 33 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 2 1 WPANID Set Get extended PAN ID Table 30 WPANID Set Get extended PAN ID Syntax descriptor Explanation WNWKPANID lt value gt The command sets the extended PAN ID for the device value is the extended PAN ID in the form of a 64 bit hexadecimal number that uniquely identifies the target network If PAN ID is set to 0 the coordinator will form a network with the extended PAN ID equal to its extended MAC address Router and end device nodes in such case will join the first available network irrespective of its extended PAN ID Notes 1 Setting the extended PAN ID is possible only when the device is not in the network 2 Several networks with different PANIDs can be operated in parallel on the same frequency channel WPANID The command returns the extended PAN ID that is specified on the device for network operation The command requests a valid range for the extended PAN ID value S register s21 RW This register
10. and both parameters need to be used together to achieve the desired behavior The command returns device short address in the form of 16 bit hexadecimal number The command requests the range of valid addresses Result codes OK is returned if value is in range otherwise ERROR is returned AT WNWKPANID 3A2F OK AT WNWKPANID WNWKPANID 3A2F OK AT WNWKPANID WNWKPANID 0000 FFFF OK Example Default value FFFF Note The default FFFF value implies that no predefined short PAN ID is used by the device value is stored in the NVRAM www dresden elektronik de Page 40 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Node types Coordinator router end device Supported stack ZigBee 6 3 Network management functions Wireless AT commands described in this section execute various network management functionality including network join and leave operations obtaining network topology related information getting link quality data etc When exploring network topology it is important to take into account the fact that due to mesh networking only an end device node can be a child and have a dedicated parent node coordinator or router during its lifetime in the network Router nodes use the coordinator or other routers only as network entry points and are not associated as direct children after network join However if there is enough space in the node s neighbor table it will conta
11. but specific hardware may support an extended set of rates Note The rate specified takes effect following the issuance of any result code associated with the current command line even if subsequent commands in a command line return ERROR The command requests the actual communication rate IPR The command requests the list of supported rates This depends on the hardware capabilities of the particular model Result codes The module returns OK if the requested rate is present in the supported list otherwise it returns ERROR Example AT IPR 38400 OK AT IPR IPR 38400 OK AT IPR IPR 1200 9600 38400 OK www dresden elektronik de Page 67 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 8 9 IFC Serial port flow control Table 82 IFC Serial port flow control Explanation IFC lt rx_ flow gt The command is used to specify the methods for local flow control over the UART lt tx_flow gt interface between the host and the module It accepts two numeric sub parameters rx_flow which specifies the method for the host to control the flow of data received from the module tx_flow which specifies the method for the module to control the flow of data transmitted from the host 0 None 2 use RTS request to send line 0 None 2 use CTS clear to send line Note It is strongly recommended to use the CTS method because there would be no means to use pow
12. command If ATD has not been performed yet WLOQI may return an irrelevant value Result codes The node returns OK if the device is in the network and the LQI value for this particular link exists otherwise ERROR will be returned Example AT WLOI 1 Request LQI for the link to the node with WLOQI 254 short address 0x0001 OK www dresden elektronik de Page 45 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Node types Coordinator router end device Supported stack ZigBee 6 3 10 WRSSI Get RSSI value Table 48 WRSSI Get RSSI value WRSSI lt addr gt The command requests the RSSI value for the link to the node with short NWk address equal to addr specified in 16 bit hexadecimal format The command returns the actual RSSI value expressed in dBm If RSSI is not available then the value 91 is returned Notes 1 RSSI information can be retrieved for links within a one hop radius only 2 An end device can obtain RSSI only to its current parent and vice versa RSSI to an end device can be obtained only from its current parent node 3 RSSI value is measured during data transmission initiated by the ATD command If ATD has not been performed yet WRSSI may return an irrelevant value Result codes The node returns OK if the device is in the network and the RSSI value for this particular link exists otherwise ERROR will be returned Example AT WRSSI 0001 Request RS
13. 8 8 and Section 6 8 9 If a PC is the host a terminal program such as e g HTerm PUTTY or Tera Term can be used to communicate with the Wireless AT device To check the connection AT should be entered in the terminal window followed by a CR Note The module firmware only accepts commands with CR at the command s end Otherwise the module operates as echo for the inputs www dresden elektronik de Page 13 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 hb HTerm 0 8 1beta O i _ a E Ge File Options View Help Disconnect Port COMB R Baud 38400 Data 8 x Stop a x Parity None ECTS Flow control i rx 8 Reset tx P 3 Reset li count OSE 2 Reset Newineat cRHF 7 eres lace Pre Flos Flan ameona F E BE a f Bramao Elst eres Sequence Overview x Received Data Input control Input options R e Diente om ms ve 6 e x History 1 10 10 Connect to COM8 b 38400 d 8 s 1 p None Figure 4 AT command OK If the board responds with an OK result code the communication between the host and Wireless AT devices has been established successfully see Figure 4 Section 5 4 includes examples showing how a Wireless AT device can be configured for networking operations data e
14. D pins value isa hexadecimal number containing a bit field The four least significant bits b0 b3 can be used to enable or disable each of four A D channels Bits b4 b7 are ignored in the value field If a bit is cleared then A D conversion of a corresponding channel is disabled and the A D pin goes to the high impedance state without internal pull up Notes Enabling A D conversion increases power consumption Conversion is executed in single conversion mode see the ATmega datasheet with 125kHz clock rate and external reference thus enabling the maximum conversion rate of approximately 5kb s Pins AD4 AD7 can be also used as a JTAG port and then A D conversion functionality for these inputs is disabled The command requests the actual A D configuration Result codes OK is always returned ATS100 08 Enable conversion on pin AD3 OK www dresden elektronik de Page 71 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 9 4 A D Table 88 A D S lt reg gt The command reads a particular A D pin and returns its value in decimal format reg corresponds to pins ADO AD3 on the module and it is in the range of 101 104 If A D conversion for a particular channel is disabled by the S100 register no value is returned Result codes OK is always returned Example ATS100 08 Enable conversion on pin AD3 Read AD3 pin Node types Coordinator router end device 6 9 5 PWM configurat
15. Fi ense ri ance eo enis Pro pane 66 Pre ae aoea re ener pre l e 7 1 11 Standard on deRFtoRCB Adapter and Sensor Terminal Board The adapter deRFtoRCB connects the module pins to LEDs and the button on the board as well as to the 10 pin JTAG interface and the 6 pin connector UART On the bottom side are two RCB compatible 30 pin I O connectors The Sensor Terminal Board is populated with an On board temperature sensor freely programmable LEDs and one button The board provides a 6 pin ISP a 10 pin JTAG a USB interface and three 10 pin screw couplers Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD RFtoRCB STB UART0O_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD RFtoRCB STB UART0O_V1_02 Fuse settings See Section 7 2 Interface UARTO Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD RFtoRCB STB UART1_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD RFtoRCB STB UART1_V1_02 Fuse settings See Section 7 2 Interface UART1 PWM ADC SW1 LED3 ePi SPEE m4 Pum E rapes ADC Boe aa GPIO7 GPIo8 www dresden elektronik de Page 86 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD RFtoRCB STB USB_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD RFtoRCB STB USB_V1_02 Fuse settings See Section 7 2 Interface USB voaie Te mn ener ae Chan port SS GPIO1 A Te w a a
16. On a coordinator router node sleep interval is used for children tracking and should be not less than on its children nodes It is also used as the maximum time interval the data destined for the child can be buffered See Section 6 5 1 Parent polling mechanism for more details Notes 1 Actual sleep active periods will be slightly different and their values depend on multiple circumstances such as the network activity external interfaces to the sensors and so on They cannot be used for absolute timing 2 The command is not accessible when the node is joined to a network WPWR The command requests current sleep active intervals www dresden elektronik de Page 56 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 The command requests valid ranges of sleep active intervals Seats si 55 w Result codes OK is returned if parameters are within their valid ranges Otherwise ERROR is returned Example AT WPWR 600 10 OK Set duty cycle for one minute sleep AT WPWR 100ms active WPWR 600 10 Verify setting is applied OK ATS31 Get sleep interval via S register 600 OK AT WPWR Get valid ranges for sleep active WPWR 2 30000 0 30000 intervals OK 6 6 2 WSLEEP Force node to sleep Table 63 WSLEEP Force node to sleep The command forces the node into the sleep mode Important The node in sleep mode can respond to the subsequent commands with a delay
17. a value or values for later use Read Write parameters may be set read and tested If lt command gt is not recognized the module generates the ERROR result code and stops processing the command line The ERROR result code is also generated if a sub parameter is specified for an action that does not imply using sub parameters too many sub parameters are specified a mandatory sub parameter is not specified a value of the wrong type is specified or if a value that is not within the supported range is specified Some commands allow omitting a value If a command does omit one then it should be immediately followed by another command or the termination character in the command line The 0 value is assumed unless otherwise specified in the lt command gt description If the lt command gt does not expect a value but the value is present the ERROR code is generated www dresden elektronik de Page 28 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 1 6 Action command syntax The format of the action commands except for the D DU and S commands is as follows Table 19 Action command syntax Command AT syntax Action command with no lt command gt parameters used Action command with one or more lt command gt lt value gt sub parameters used The value may be either a single value parameter or a compound value parameter as described in Section 6 1 4 Some commands may have no parameters at a
18. by minus The most significant digit is specified first Leading o characters will be ignored Hexadecimal numbers consist of characters 0 through 9 and A through F inclusive The minus sign is not allowed Leading O characters will be ignored To prevent misinterpretation of hexadecimal numbers in cases when the command containing them is not the last in the AT string it is strongly recommended to add the leading zeroes Thus if a parameter is 32 bits long it would be eight characters long and if it is a 64 bit number it would contain 16 characters and so on As a special case a string constant appears in the R command see Table 95 only Then it is just a sequence of display able IA5 characters each in the range of 0x20 to Ox7F inclusive 6 1 5 Command types A command type may be one of the following e An action command e A parameter command e An S register command Parameters may be defined as read only R or read write RW Read only parameters are used to provide the host with status or identifying information but are not set by the host Attempting to set such a parameter will result in an error In some cases depending on the particular parameter the module may ignore any attempt to set the value for such a parameter rather than respond with the ERROR result code Read only parameters may be read and tested Read Write parameters may be set by the host in order to store
19. command requests the actual ASCII code of the command editing character Result codes The module returns OK if value isin range otherwise ERROR is returned Note The new value of s5 will be used when editing of subsequent command lines and will be applied after processing the line containing the S5 register change www dresden elektronik de Page 64 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 8 4 E Command echo Table 76 E Command echo Explanation E lt value gt This parameter instructs the module to echo characters received by the UART value may be specified as 0 or 1 to disable or enable echoing correspondingly If value is omitted 0 is implied by default Result codes The module returns OK if value is 0 or 1 otherwise ERROR is returned oe ee a 1 echoing is enabled Node types Coordinator router end device 6 8 5 Q Result code suppression Table 77 Q Result code suppression Q lt value gt This parameter instructs the module to transmit result codes to the UART When result codes are being suppressed no portion of any intermediate final or unsolicited result code header result text line terminator or trailer see Section 5 2 Result codes is transmitted Information text transmitted in response to a command is not affected by the setting of this parameter There are two possibilities for value 0 The module t
20. depending on the sleeping interval specified see Table 62 the node version and DTR configuration see Table 83 The command is accessible only when the node is joined to a network Only if automatic networking see Table 34 is enabled the node will toggle periodically between active and sleep state Otherwise the sleep sequence is executed one time s Result codes OK is returned for end devices otherwise ERROR is returned Note The command is executed as follows the node returns the result code first and then it disables any subsequent commands completes pending operations and finally goes into the sleep mode Wake up occurs as scheduled by the WPWR command or DTR interrupt if enabled Example AT WSLEEP OK www dresden elektronik de Page 57 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 6 3 WTXPWR TX power level Table 64 WTXPWR TX power level Explanation WTXPWR lt value gt The command sets the transmit power level for the device The value represents the TX power level measured in dBm Note This setting will be applied to the radio circuitry during the warm reset procedure only Thus the accurate setting of TX power requires warm reboot of the node in using the z command see Table 65 WTX The command requests the actual TX power level Pane Notes 1 Power level resolution is hardware dependent and may be coarser than 1d
21. ee ee ee ere 20 5 4 EXAITIONG Sots ccsteess aessestetGeumeednndeccanecaneidcxnunedonuns epsuaatiariosanureniavmieniamounedmtareiexamneoe 21 5 4 1 Prepare nodes for networking ccccceeessssceceeeeeeeeeeeesseeeeeeeeeeeteeeneaaees 21 5 4 2 Checking network status and basic data transmission 0seseeee 22 5 4 3 Remote execution ncscccseccincereccienscccrenreretecnsciatencrratecievieiencneredenetteasennn dete 23 5 4 4 End device power COMMON cicciciscs Jateccdensscintsvarencizeesddeivassuctcnantelatverastadeds 24 5 4 5 Control of GPIO in and outputs PMW and ADC c ceeeeeeeeteeeeetees 24 6 Command descriptions creccrcrccercncasicncecssrecensmetedcrecstecestreietererecenetdeaieiesonctenesereamtetenetecenmete 26 6 1 Protocol general description ssccscececcievelet dessa cideaetareetitnaetelvteecinaele aa 26 6 1 1 Character formatting and data rateS ccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeenaaeees 26 6 1 2 Alphabet kenarina aa EAEE E EEEE 26 6 1 3 Basic command line operations eeeeecceeeee eee eeeeeeeeeeeeeeeeeeeeeeesaaaaes 26 6 1 4 Parameter VAS risceccscccrecencrsinsneadioneensiaieniatendteetintennisiencbieanncrenanerarents 27 6 1 5 Command ia 2 eee tenn eee ee ne ee eee eee ee ee 28 6 1 6 Action command syntax c1c3ctiis Sisco e nial eee 29 6 1 7 Parameter set command SYNTAX cece ee ccecee eee eeeeeeeeceeeeeeeeeeeeeenenaaaees 29 6 1 8 Parameter read command SyNtax
22. following code on the destination node DATA lt addr gt 0 0 JOINED Indicates that the node has joined the network Note Event is returned in auto network mode only and not after the wJOIN command Indicates that the node has lost connection to the network that is to its current parent Note This event can occur on end device nodes only and is not returned after WLEAVE CHILD_JOINED lt addr gt Indicates to the node that a device with extended address lt addr gt has just joined to it as a child CHILD_LOST lt addr gt Indicates to the node that its child end device with extended address lt addr gt has disconnected from the node Note This event occurs when the child end device switches to a new parent when it leaves the network using the WLEAVE command or when it is not accessible pow ered off no link www dresden elektronik de Page 19 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 etc for 3 sleep_interval sync_period as configured on the parent device by the wPWR and WSYNCPRD commands CALIBR Indicates that the device has successfully calibrated its internal clock after encountering errors on the serial interface 5 3 S registers An extensive set of S registers available in Wireless AT provides easy read write access to device and networking parameters In many cases AT command functionality can be duplicated by certain S registers
23. for deRFnode 9 If your hardware came with an installation CD lt gt or floppy disk insert it now What do you want the wizard to do Install the software automatically Recommended ei 3 Click Next to continue lt Back Cancel Figure 7 Installation wizard 2 www dresden elektronik de Page 15 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Driver installation under Windows 7 Editions Connect the deRFnode to the PC Windows 7 will not install a driver for it and mark the device with an exclamation mark in the Device Manager You have to choose the driver manually To do so please open e Control Panel System and Security Device Manager E 0 Update Driver Software deRFnode Browse for driver software on your computer 2 Search for driver software in this location Gg IDE ATA ATAPI controllers D Driver Keyboards v Browse A Mice and other pointing devices M Include smera E Monitors EP Network adapters 4 J Other devices Jy deRFnode I Ports COM Update Driver Software R Processors Bicable a Sound vided Uninstall lt gt Storage cont JE System devic Scan for hardware changes Universal Ser gt Let me pick from a list of device drivers on my computer This list will show installed driver software compatible with the device and all driver software in the same category as the device Properties
24. frames buffered at the parent www dresden elektronik de Page 50 of 91 User Manual Version 1 2 2014 10 24 Wireless AT for deRFmodules 6 5 2 D Send data to a specific node Table 53 D Send data to a specific node D lt addr gt lt arq gt lt length gt lt data gt Result codes Example Node types Supported stack www dresden elektronik de Explanation The command sends data to a specific node addr isthe 16 bit hexadecimal short network address of the destination node An optional arg parameter equal to 1 or 0 controls the ARQ nonARQ data delivery mode with 1 that is ARQ as the default if omitted The length parameter specifies the length in bytes of the data portion to be sent It shall not exceed the maximum allowable number 95 bytes for an un encrypted frame and 77 bytes for an encrypted frame If the Length parameter is omitted the maximum possible value is implied by default Data transmission starts either when the specified number of data bytes is received over the serial interface or when the time interval between two consecutive data symbols exceeds the timeout preset wWAIT command see Table 61 Notes 1 data should be preceded by lt CR gt S3 character see Table 73 This symbol is not transmitted over the air and it is not counted in length 2 If the destination address is a broadcast address FFFF for all nodes FFFC for router coordinator nodes F
25. if a route exists data delivery one hop or multi hop is performed to the destination node The following application identifiers are used in Wireless AT for all data exchange operations e Profile ID OxC31A e Endpoint ID 0x01 e Cluster ID 0x00 Note To ensure safe data transmission over a serial interface between a host and an MCU it is strongly recommended to set hardware flow control see Table 82 for details When running terminal software to control the node the chosen COM port should be set with the hardware flow control option selected 6 5 1 Parent polling mechanism Data delivery to an end device over the last hop that is from the parent node to the child is performed using the polling mechanism described below Upon receiving a frame destined for its child node or a broadcast frame with a non exhausted transmission radius and a destination address equal OxFFFF the parent node buffers the frame and waits for a poll request from the child The maximum waiting time is sleep_interval 3 x sync _period as configured on the parent by the WPWR and WSYNCPRD commands In awake state an end device polls its parent node periodically every WSYNCPRD milliseconds as configured on the end device The parent node can transmit a data frame to a child only after receiving a corresponding data poll from it After data frame reception is completed the end device issues another data poll request to verify whether there are any
26. lt rate gt value measured in milliseconds This value is used by the end device as the poll rate for requesting indirect transmission messages from the parent Coordinator and router use this rate to verify children presence Notes On end devices the lt rate gt value must not be increased by this command Otherwise BitCloud behavior is unpredictable On routers and coordinators this parameter must be set to the largest lt rate gt value among all children Otherwise child presence status may be detected incorrectly This value should be at least two times smaller than the value of WIIMEOUT see Table 59 The command is not accessible when the node is joined to a network Example AT WSYNCPRD 1000 Set poll rate to one second OK ATS37 300 OK AT WSYNCPRD Alaa 10 30000 rate is NOT stored in NVRAM wwwdresdenzelektfonikde lt i i lt COS lt t Paea Page 54 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Node types Coordinator router end device Supported stack ZigBee 6 5 8 WTIMEOUT Data delivery timeout Table 59 WTIMEOUT Data delivery timeout Explanation ROUT The command returns the timeout value in milliseconds The returned value corresponds to the apscAckWaitDuration variable introduced by ZigBee recommendation S register s51 R Result codes OK is always returned Example AT WTIMEOUT WTIMEOUT 2800 OK Nod
27. to reduce overhead of the serial ASCII protocol Table 7 S registers Acceptable Command operations reference R RW section The latest result code Ro se sft c T E OS Response formating craracier aw fse fez Commana eating character aw fe fes eno w a a y S e a E A SSCS ce A E A uiomatcnetwening fw fa s e E E A Nomor asaressngmoae aw fse fees Powermanagement faw ense feen CS e a E A Ce E Daadeweymeon p o f e e E E A Data transmission waing timeout aw ss esw Omnem few fs e e S E A SSCS C a S SCdOC Poono w oosa ea C A S E C Pwmconiowaion faw fosas feos Pwittequency conr aw sma sma srs feos www dresden elektronik de Page 20 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 5 4 Examples The examples given below show the usage of AT commands to control Wireless AT devices and are valid for all supported platforms listed in Section 3 1 5 4 1 Prepare nodes for networking The following examples require at least two nodes The first step is to configure network parameters One of the nodes should function as a coordinator and the others can be routers or end devices It is important that all nodes have different extended MAC and short NWk addresses The coordinator node shall have short address 0 and all other nodes shall have nonzero addresses Note Selection of particular addresses is application dependent It should be done only the first time during the manufacturi
28. via the ATR command see Table 12 It allows transferring the AT command to the remote node in the network executing it there and redirecting the execution output to the originator Thus the remote node can be monitored and commissioned and the corresponding parameters can be set Protocol principles Wireless AT supports an extensive set of AT commands that provide full control over different functionality of the module Read write commands to S registers can be used to access device and network parameters In many cases AT command functionality can be duplicated by certain S registers to reduce overhead of the serial protocol The basic principle of the Wireless AT protocol is illustrated in Figure 2 AT command line Synchronous informaton responses RF transmission Host device Synchronous result code Asynchronous resull code Serial Interface Figure 2 Wireless AT command executions www dresden elektronik de Page 11 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 The host device shall transmit a command line prefixed by the AT string and followed by the chained Wireless AT commands to be executed consecutively Upon successful execution of each command in the sequence corresponding information responses are returned to the host device in an easily recognizable string format The final result of the command line execution is indicated by the result code In case any command is executed inc
29. 1 The higher the duty cycle the brighter will be the LED values from 1 through 100 whereby 100 is the 100 duty cycle S140 S143 S146 The configuration can be double checked Set ADC channel 1 and query of it With deRFnode board and inserted batteries their voltage can be read getting values of 376 theoretical 0 through 1599 which corresponds to voltages of 1 78 V to 7 56 V To get the actual value the measured value has to be multiplied by 52 11 The measured value at the potential divider pin 34 of 916 in the example is equal to 4 33 V Prerequisite to measure the battery voltage Jumper 2 on deRFnode is set to battery powered and Jumper 3 is put on see Sections 7 6 and 8 9 in 5 VBAT Monitoring JP3 R42 www dresden elektronik de Page 25 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 Command descriptions 6 1 Protocol general description 6 1 1 Character formatting and data rates Data transmitted between the host and the module over a serial interface conform to the requirements for start stop data transmission specified in the ITU T Recommendation V 4 please refer to 6 Parity is even odd or not used Each character has at least one complete stop bit The module accepts commands using any combination of parity and stop bits supported These include at least the following combinations each of which consists of up to 10 bits including the start bit e 7 data bits eve
30. 1 147 GPIO2 148 lt value gt is an integer number in the range of 0 to 100 representing the PWM duty cycle in percent Notes 1 The duty cycle currently set on the output pin will be changed as soon as the current period of PWM frequency is ended 2 Resolution of the duty cycle setting depends on the PWM frequency as below PWM frequency Duty cycle resolution 5kHz 1 10kHz 1 20kHz 1 50kHz 2 5 100kHz 5 Result codes OK is returned if value is in the valid range otherwise ERROR is returned The command reads the duty cycle for a particular PWM channel in percent Result codes OK is always returned ATS146 45 Set duty cycle to 45 for PWM channel 0 OK Default value value is NOT stored in the NVRAM Node types Coordinator router end device 6 9 8 Reading and writing registers Table 92 Writing to hardware registers POKE lt type gt Command writes lt value gt atthe address specified by lt addr gt in registers lt addr gt lt type gt specifies the type of registers lt value gt For more information about registers available for a certain platform and ranges of addresses and values refer to the hardware datasheets Radio transceiver registers MCU internal RAM MCU internal NVRAM Note By using this command it is not possible to write to MCU internal flash memory www dresden elektronik de Page 74 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10
31. 10 24 Persistence value is NOT stored in the NVRAM Node types Coordinator router end device Supported stack ZigBee 6 9 6 PWM frequency control Table 90 PWM frequency control Explanation S lt reg gt lt value gt The command selects the PWM operating frequency for a particular PWM channel GPIOO 143 GPIO1 144 GPIO2 145 PWM frequency 5kHz 10kHz 20kHz 50kHz 100kHz PWM frequency selection for any channel affects all channels frequency is common for all channels Changing frequency for any PWM channel results in the reset of the duty cycle to 0 for all channels Result codes OK is returned if value is in the valid range otherwise ERROR is returned S lt reg gt The command reads the PWM operating frequency for a particular PWM channel coded as above and returns 0 to 4 Result codes OK is always returned Example ATS143 2 Set the PWM frequency to 20kHz for PWM channel 0 OK Set the PWM frequency to 100kHz for PWM channel 1 ATS144 4 Request the PWM frequency on channel 0 The most recent OK ATS143 frequency set is returned 4 OK 0 meaning 5kHz www dresden elektronik de Page 73 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 9 7 PWM duty cycle control Table 91 PWM duty cycle control Explanation S lt reg gt lt value gt The command selects the duty cycle value for a particular PWM channel PWM channel Output pin Duty cycle reg GPIOO 146 GPIO
32. 24 Result codes OK is returned if the address is within the allowed range ERROR is returned if type or address is out of range Example Write value 0x06 RX_ON command to the TRX_STATE register of Atmel radio transceiver ATPOKE 0 002 00000006 OK Node types Coordinator router end device Supported stack ZigBee Table 93 Reading from hardware registers Explanation Command reads the value from registers at the address specified by lt addr gt lt type gt specifies the type of registers For more information about registers available for a certain platform and ranges of addresses and values refer to the hardware datasheets 0 Radio transceiver registers 1 MCU internal RAM 2 MCU internal flash 3 MCU internal NVRAM Result codes OK is returned if the address is within the allowed range ERROR is returned if type or address is out of range of available addresses Example Write and read GPIOR1 address 0x004A register of the Atmel ATmega128RFA1 ATPOKE 1 004A 000000AA EEK 1 004A 000000AA OK Node types Coordinator router end device 6 10 Remote management Remote management functions include the password protected AT commands that come from the originating node to a target node The received AT command sequences are executed on the destination node as if they came from a serial port Information response and result codes of the command execution are sent back to
33. AT GMR GMR BitCloud v 1 14 0 WirelessAT v 1 0 OK ATI3 Just an alias to GMR GMR BitCloud v 1 14 5 0 WirelessAT v 1 0 OK Node types Coordinator router end device Supported stack ZigBee 6 7 8 amp F Set to factory default configuration Table 72 amp F Set to factory default configuration Syntax Explanation amp F The command instructs the module to set all the parameters including the persistent variables from NVRAM to the factory defaults This command forces a hardware reset just like the z command and so all the same precautions should be considered The result code will be issued according to the actual result code suppression setting see Table 77 response formatting see Table 78 and the transmission rate see Table 81 set before execution of this command Note that the amp F command does not reset the password once it has been set by the WPASSWORD command see Table 94 Result codes OK is always returned www dresden elektronik de Page 62 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Example AT amp F OK Node types Coordinator router end device Supported stack ZigBee 6 8 Host interface commands 6 8 1 3 Termination character Table 73 S3 Termination character Syntax Explanation S3 lt value gt The command sets the ASCII code to be used as th
34. B and so some power values 4 6 8 may be forbidden despite being within the allowed range On input such values are rounded to the nearest allowed value This command returns only the number set by the WTXPWR command and does not indicate the real power level which can vary due to temperature supply voltage and other factors The command requests the allowable range of TX power levels S RW Result codes OK is returned if value is in the valid range otherwise ERROR is returned Example AT WTXPWR 5 OK AT WTXPWR WTXPWR 5 set 5dBm TX power level OK AT WTXPWR WTXPWR 17 3 OK www dresden elektronik de Page 58 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 7 Generic control 6 7 1 Z Warm reset Table 65 Z Warm reset Explanation The command instructs the device to execute a warm software reset This command resets the hardware restores all persistent variables from NVRAM and restarts the firmware Important The command should be used with caution since it does not send leaving the network signals to other nodes and hence can affect PAN integrity Therefore it is better to put the node out of the network prior to reset using the WLEAVE command If automatic networking is disabled then the node will not join the network automatically after reset Note that the parameters stored in NVRAM persist after software reset to erase th
35. Ds and the button on the board as well as to the 10 pin JTAG interface and the 6 pin connector UART On the bottom side are two RCB compatible 30 pin l O connectors Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD RFtoRCB UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD RFtoRCB UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO Sao ee ee ee ee erica eo en 1 exri 23 Pwwe 6 Pm 18 Erra ace Fa Pinas Exr 15 Pin 20 EXT1 30 7 1 8 With power amplifier and antenna diversity on deRFtoRCB Adapter A short overview of the adapter deRFtoRCB is given in Section 7 1 7 Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV RFtoRCB UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV RFtoRCB UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO P le eS eae erer e fee ria ame e row feo rept er ama opos e prir ox eror es Pra Exr 29 Leros 67 Pino exri 30 www dresden elektronik de Page 84 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 1 9 Standard on deRFtoRCB Adapter and RCB Breakout Board The adapter deRFtoRCB connects the module pins to LEDs and the button on the board as well as to the 10 pin JTAG interface and the 6 pin connector UART Using the two RCB compatible 30 pin l O connectors on the bottom side it can be affixed to a RCB Breakout Board On the RCB Breakout Board the main ports of the Radio C
36. E USB_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD NODE USB_V1_02 Fuse settings See Section 7 2 Interface USB Module Pin Chan TE rer ea zaoo apio Gs enos wer teDr ewe ma aoc Fa Pinar OHeader29 agea 22T02 GP104 23T00 a co GPIO7 GP1O8 www dresden elektronik de Page 82 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 1 6 With power amplifier and antenna diversity on deRFnode for AVR A short overview of the deRFnode development board and its usage is given in Section 7 1 5 Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV NODE UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV NODE UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO Po Pin chan Pin Chan ee GPIOO lO Header 24 PWMO 1009 LED2 ADCO lO Header 15 enor o7 eran st sw Pann e Pns 101871E0 anor Fi ense oreo apos e0 Pin 16 1 Header 1 i oo Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV NODE USB _V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV NODE USB _V1_02 Fuse settings See Section 7 2 Interface USB GPIO Sa epe 2 mea a ES ea em pfa ae o CS a sori 23T13 GPIO4 GPIO5 GPIO6 GPIO7 www dresden elektronik de Page 83 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 1 7 Standard on deRFtoRCB Adapter The adapter deRFtoRCB connects the module pins to LE
37. FFB for low power routers FFFD for all nodes which have the RxOnWhenldle flag set the broadcast transmission is performed If data transmission requires acknowledgement from the destination node ARQ is set to 1 then OK is returned only after such acknowledgement frame is received If no acknowledgement is received after WRETRY transmission attempts then ERROR is returned as a result code for the DB command If an acknowledgement is not requested arq is set to 0 then OK is returned just upon successful data transmission over the first hop There is no guarantee on frame delivery to the final destination If first hop transmission cannot be performed channel busy route unknown etc or if the sending node is not in the network ERROR is returned D 12 1 5 Send HELLO to the node with address 12 using ARQ The same as above but the node will be waiting for the timeout expiration before going to the air Coordinator router end device Page 51 of 91 User Manual Version 1 2 2014 10 24 Wireless AT for deRFmodules 6 5 3 DB Send binary data to a specific node Table 54 DB Send binary data to a specific node DB lt addr gt lt arq gt lt length gt lt data gt Result codes Example Node types Supported stack www dresden elektronik de Explanation The command sends binary data not encoded in ASCII symbols to a specific node addr isthe 16 bit h
38. OK value is stored in the NVRAM Node types Coordinator router end device www dresden elektronik de Page 36 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 2 5 WAUTONET Enable Disable automatic networking Table 34 WAUTONET Enable Disable automatic networking Explanation ET lt value gt The command controls the node activity behavior at power up reset or when a connection loss is detected value has a Boolean type 1 implies automatic joining to the network 0 means that automatic joining is disabled and the wJOIN command shall be used for the network start procedure WAUTONET The command requests current automatic networking configuration WAUTONET The command requests the range of supported values S register S24 RW Example AT WAUTONI OK AT WAUTONI WAUTONET 1 OK AT WAUTONET WAUTONET 0 1 OK Default value 0 automatic networking is disabled Persistence value is stored in the NVRAM Node types Coordinator router end device Supported stack ZigBee 6 2 6 WROLE Set Get node role coordinator router end device Table 35 WROLE Set Get node role coordinator router end device E lt value gt The command sets the node role to value as follows 0 Coordinator 1 Router 2 End device Note The command is not accessible when the node is joined to a network Actual capabilities depend on th
39. OK ATR1 65432178 WL Remove node from network ERROR will ERROR be returned but delayed Node types Coordinator router end device Supported stack ZigBee www dresden elektronik de Page 77 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 Pin Assignments All firmware files listed in the following sections require specific fuse settings However as the settings for all deRFmega128 modules and for all deRFmega256 modules are the same the fuse settings are listed in a separate section to keep the platform sections as concise as possible You can follow the link at Fuse settings to jump to the appropriate fuse settings for your platform or check Section 7 2 GPIO The command assigns or reads 0 or 1 to from a particular GPIO pin see Section 6 9 2 Each pin GPIOO GPIO8 of the module is numbered in the range of 130 138 To change e g GPIOO in the column Pin see table in Section 7 1 1 the command GPIO has to be executed with the appropriate parameter S130 or to change GPIO5 use S135 Note Use the appropriate parameter Sxxx for configuration commands see Section 6 9 1 for details Example to set GPIOO ATS130 1 Example to read GPIOO ATS130 PWM To operate PWM channels two commands are available PWM frequency control and PWM duty cycle control see Sections 6 9 6 and 6 9 7 Note Use the appropriate parameter Sxxx for configuration see Section 6 9 5 for detail
40. Result codes www dresden elektronik de The command enables the execution of AT commands on a remote node with output redirected Password psw is a 32 bit hexadecimal number which is set for this specific node addr specifies the short network address of the destination node cmd is a sequence of AT commands without the AT prefix Note It is strongly recommended not to use the amp H and 3H commands for cmd as they produce extremely lengthy output All the responses and result codes are received from the remote node in text form that can be processed normally If a connection loss is detected the ERROR result code will be returned after a timeout from when the last response packet was received approx three seconds In particular remote execution of the WLEAVE command will result in an ERROR code despite being executed successfully If the remote execution command is sent to an end device with a sleeping period longer than the timeout ERROR will be returned If the controlled node is not in the PAN ERROR will be returned Remote execution is not allowed for commands that cause the receiving node to send data over the network D DU DS WPING R Attempting this will result in an ERROR code with the command processing aborted Page 76 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Example ATR1 65432178 GMM WRSSI 2 Get model number and RSSI GMM deFRmege256 WRSSI 80
41. Result codes OK is returned if value is in the valid range otherwise ERROR is returned Example ATS120 1 121 3 Set GPIOO as input with internal pull up and OK GPIO1 as output Default value 2 tri state Persistence Values are stored in the NVRAM Node types Coordinator router end device 6 9 2 GPIO Table 86 GPIO S lt reg gt lt value gt The command assigns value to a particular GPIO pin Each pin GPIOO GPIO8 of the module is numbered by reg which is in the range of 130 138 correspondingly 0 Logical 0 1 Logical 1 Note This command does not affect any pin configured as input or tri state S lt reg gt The command reads a particular GPIO pin numbered and coded as above and returns O or 1 If the pin is configured for output or as tri state the returned value is not defined Result codes OK is returned if value is 0 or 1 otherwise ERROR is returned www dresden elektronik de Page 70 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 ATS120 1 121 3 Set GPIOO as input and GPIO1 as output both ATS130 with internal pull up 1 GPIOO is 1 OK Clear GPIO1 OK Default value Values are NOT stored in the NVRAM because GPIO pins are configured as tri state at startup Node types Coordinator router end device Supported stack ZigBee 6 9 3 A D configuration Table 87 A D configuration 100 lt value gt The command selects the configuration of particular A
42. SI for the link to the node WRSSI 80 with short address 0x0001 OK 80dBm Node types Coordinator router end device Supported stack ZigBee e aeeses i i s_CSCs r stack ZigBee 6 4 Security Wireless AT firmware images with names having _Security at the end support standard security mechanism defined in the ZigBee PRO specification see 9 in the References section In this scheme a special128 bit key called the network key in ZigBee PRO the same for all devices is used in the network to encrypt decrypt messages with the AES 128 algorithm The security mechanism can be enabled disabled using the WSECON command and configured as described below If security is enabled then the payload of all data frames sent by the device will be encrypted with the network key To employ the security mechanism the network coordinator shall be configured as a trust center TC by assigning a WICADDR value to its extended address The TC shall also be programmed with a network key WNETKEY command prior to network start Joining a secured network can be organized in an unsecured or secured way using the WSECSTATUS command To avoid possible confusion during the network join all nodes including the TC shall have the same WSECSTATUS configuration prior to network join start For an unsecured join WwSECSTATUS shall be set to 3 In this case only the TC shall know the network key in advance while other device
43. WWAIT WWAIT 500 OK AT WWAIT WWAIT 100 5000 OK Default value 5000 Persistence value is stored in the NVRAM Node types Coordinator router end device 6 6 Power management Because power consumption is a major concern in applications with battery powered devices Wireless AT provides AT commands that allow switching between awake and sleep modes as well as setting the transmit power level Note that sleep mode is supported on end device nodes designed on deRFmega modules To avoid issues in network stability coordinator and router nodes are always kept in active mode and hence require continuous power supply In addition to power management of deRFmega modules Wireless AT simplifies power management of external peripherals or the host device via the CTS line If hardware flow control is enabled by the IFC command see Table 82 the line becomes high when the deRFmega module is in the sleep state 6 6 1 WPWR Configuration of sleep active intervals Table 62 WPWR Configuration of sleep active intervals WPWR lt sleep gt The command sets the duration of sleep and active intervals for end device nodes lt active gt The sleep duration is specified in 100ms units but active duration is specified in 10ms units Zero active period means that the node can be put asleep explicitly only by the WSLEEP command in which case it will stay asleep for the given sleep duration
44. ange of valid values lt command gt where lt command gt is one of the following e a single character e amp character 0x26 followed by a single character e character 0x25 followed by a single character e character followed by a string of characters The characters allowed to be used in lt command gt should be taken from the T 50 International Alphabet 5 The first three of the command cases above are referred to as basic commands they may be of the action command syntax only Commands beginning with the plus sign are known as extended syntax commands and can fit all the syntax rules depending on their type Typically a command that supports the parameter set syntax also supports the testing syntax A command with associated parameters if any may be followed by additional commands in the same command line without using any delimiting character Some commands may cause the remainder of the command line to be ignored the D command for instance see Table 53 If the command line is started with the A or a prefix hex codes 0x41 0x2F or 0x61 0x2F the module immediately repeats the execution of the preceding command line No editing is possible and no termination character is required With this mechanism a command line may be repeated as much as desired 6 1 4 Parameter values Parameters may take either a single value or multiple compound values A compound value consists of any combination of n
45. arameters in NVRAM match their actual values in RAM If differences are detected the corresponding values in NVRAM are updated For www dresden elektronik de Page 18 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 platforms with warm reset command support see Table 5 persistent parameters in NVRAM are updated to actual values if necessary automatically upon ATZ command execution Upon device reset Wireless AT assigns persistent parameters to their values stored in NVRAM If a parameter value has not been transferred from RAM to NVRAM then the old NVRAM value will be used 5 2 Result codes Result codes appear either synchronously in response to a command or asynchronously due to specific events in the network or on a Wireless AT device See a detailed description of result codes in Section 6 1 11 Table 6 provides both verbose and numeric forms for available result codes Table 6 Result codes Verbose Numeric Parameters Description code code ERROR Error occurred during command execution lt addr gt lt bcast gt lt length gt lt data gt Indicates data reception from a remote node addr is a short network address of the source node the data is originating from beast is set to 1 if data are sent by broadcast transmission otherwise it is set to 0 DATA length is a length of the lt data gt field data is a byte sequence of received data Note The WPING command see Table 57 results in the
46. ask to be used for network operation value is a 32 bit field that specifies the channel numbers supported by the node The five most significant bits of the channel mask b31 527 shall be set to 0 The remaining 27 bits b26 b25 b0 indicate availability status for each of the 27 valid channels 1 supported 0 unsupported Channels are distributed across frequency bands as follows 780MHz channel numbers 0 3 868MHz channel number 0 915MHz channel numbers 1 10 2 4GHz channel numbers 11 26 A detailed description of the channel mask parameter can be found in clause 6 1 2 of the 802 15 4 2006 standard Notes 1 Only channels from frequency bands supported by the platform s RF chip can be selected in the channel mask 2 The command is not accessible when the node is joined to a network WCHMASK The command returns the actual channel mask The returned channel mask can be different from the channel mask set by the WCHMASK lt value gt command and depends on the hardware capabilities The cleared bits mark unsupported channels WCHMASK The command returns the channel capability mask in the form of two 32 bit unsigned hexadecimal numbers It returns 00000800 07FFF800 for 2 4GHz chipsets and 00000001 000007FF for sub GHz Note Strictly speaking these two numbers do not represent range in its direct sense but are rather the maximum and minimum values achievable by the composition of correspon
47. atus The command requests the current networking status of the device Result codes OK is returned if the device is joined to a network otherwise it returns ERROR Example AT WLEAVE Leave the network first aa ERROR Device is not in a network now Coordinator router end device 6 3 4 WPARENT Get parent address Table 42 WPARENT Get parent address The command requests the parent node address the device is associated with The extended MAC address of the parent node is returned as a 64 bit hexadecimal number if the S30 register is set to 0 The short NWK parent address is returned if the S30 register is set to 1 See Table 46 for details Note This command does not cause network operations and just returns a copy of the parent address assigned during the joining process Result codes OK is returned if the module is in the network and has a parent ERROR will be returned if the device is not in the connected state or has a node role of coordinator or router Example AT WPARENT WPARENT 012345678 9ABCDEF OK www dresden elektronik de Page 42 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 3 5 WCHILDREN Get children addresses Table 43 WCHILDREN Get children addresses Explanation WCHILDRI The command requests the addresses of children end devices associated with the node The extended MAC addresses of child
48. bei Ft Pin 36 aint cm ae eer GPIO8 7 1 12 With power amplifier and antenna diversity on deRFtoRCB Adapter and Sensor Terminal Board A short overview of the adapter deRFtoRCB and the Sensor Terminal Board is given in Section 7 1 11 Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV RFtoRCB STB UART0O_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV RFtoRCB STB UART0O_V1_02 Fuse settings See Section 7 2 Interface UARTO Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV RFtoRCB STB UART1_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV RFtoRCB STB UART1_V1_02 Fuse settings See Section 7 2 Interface UART1 www dresden elektronik de Page 87 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Module Pn Chan ot LP chan Port as SW1 LED3 LED2 LED4 aPio2 D5 Pin 12 ae Pwm2 Be Pin 18 x3 PBe ADC2 Anz 22713 x3 PD7_ Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV RFtoRCB STB USB_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV RFtoRCB STB USB_V1_02 Fuse settings See Section 7 2 Interface USB GPIO PWM ADC Module Pn Chan Pin Pin A Chan Port Chan Port Pin Port Module Board nel Module Boara nel Module Board n a www dresden elektronik de Page 88 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 2 Fuse settings The fuse settings for the deRF
49. command during network join to be the network s Notes 1 The command is not accessible when the node is joined to a network 2 The command configures the CS APS TRUST CENTER ADDRESS parameter in the BitCloud stack WTCADDR The command returns the trust center address configured on the node WTCADDR The command requests the range of valid values S register Not available Result codes OK is returned if value is in range otherwise ERROR is returned Example AT WTCADDR 000100001090C96D OK AT WTCADDR WTCADDR 000100001090C96D OK AT WTCADDR WTCADDR 0000000000000001 FFFFFFFFFFFFFFFE OK Supported stack ZigBee Note only available on deRFmega256 based platforms www dresden elektronik de Page 49 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 5 Data transmission In Wireless AT data can be transmitted in two ways e Unicast transmission to a particular node using the D DS or WPING commands e Broadcast transmission to all nodes using the DU or D commands with broadcast address It is important that extended MAC addresses are not used for data transmission directly instead they are substituted by short network addresses which are convenient for node replacement in network installation and maintenance The route establishment procedure to the target node is implemented inside the stack It is executed automatically upon a data transmission request and then
50. contain multiple lines and the text may include any formatting characters to improve readability A result code consists of three parts header result text and trailer The characters to be generated in the header and trailer are determined by the user s setting see the V command Table 78 The result text may be generated as a number or a string depending on the user selected setting see the V command Table 78 There are two general types of result codes final and unsolicited Final result codes OK ERROR indicate completion of the module action and readiness to accept new commands from the host Unsolicited result codes such as DATA may not be directly associated with the issuance of a command from the host They indicate the occurrence of another EVENT causing them Command x see Table 80 controls the generation of result codes while command Q see Table 77 results in their total suppression Section 5 1 1 summarizes the result codes in both verbose and numeric forms with their corresponding parameter s if any and a brief description Each command description refers to the specific result codes that may be generated in relation to the command and the circumstances under which they may be issued www dresden elektronik de Page 32 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 1 12 Information text formats In general the particular information text format returned by extended syntax commands
51. curity status on the devices as follows O for secured key transmission the device should have a pre configured nonzero network key prior to network join 3 the device obtains the network key from the trust center via un encrypted transmission over the air 1 2 reserved for high security mode not supported in Wireless AT Notes 1 The command is not accessible when the node is joined to a network 2 The command configures the CS _ZDO SECURITY STATUS parameter in the BitCloud stack 3 On the trust center independently of WSECSTATUS configuration WNETKEY shall be set to the non zero network key to be used for encryption The command returns device security status Example AT WSECSTATUS 3 OK AT WSECSTATUS WSECON 3 OK AT WSECSTATUS WSECSTATUS 0 3 OK Deauvene fp SSS 6 4 3 WNETKEY Set Get network encryption key Table 51 WNETKEY Set Get network encryption key WNETKEY The command assigns the network key on the device lt val64bit0 valo4bitl gt si apito and val 4bitl are 64 bit hexadecimal numbers that compose the 128 bit secret encryption key to be used for data encryption decryption in the network Notes 1 The command is not accessible when the node is joined to a network 2 Zero value implies no encryption to be used 3 The command configures the CS NETWORK KEY parameter in the BitCloud stack The command retu
52. ding bits sow fam Result codes The set command is executed if the node is not in the network and the channel mask is set according to hardware capabilities actually available In such case the device returns OK Otherwise the channel mask is ignored and the device responds with ERROR Example AT WCHMASK 40000 OK AT WCHMASK WCHMASK 00040000 OK AT WCHMASK WCHMASK 00000800 07FFF800 OK Default value 00000800 for 2 4GHz chipsets or 00000001 for sub GHz www dresden elektronik de Page 35 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 value is stored in the NVRAM Node types Coordinator router end device Supported stack ZigBee 6 2 4 WCHPAGE Set Get channel page Table 33 WCHPAGE Set Get channel page Explanation E lt value gt The command sets the channel page that will be used for networking value is a 8 bit field that specifies the channel numbers supported by the node A detailed description of the channel page parameter can be found in clause 6 1 2 of the 802 15 4 2006 standard Note The command is not accessible when the node is joined to a network The command returns the actual channel page The command returns the possible channel pages Sz W Result codes OK if the device is not in the network otherwise the device responds with ERROR E 0 Example AT WCHPAGI OK AT WCHPAGE WCHPAGE 0 OK AT WCHPAGE WCHPAGE 0 1 2
53. dresden elektronik e User Manual Wireless AT for deRFmodules Document version V1 2 2014 10 24 User Manual Version 1 2 ion 1 Wireless AT for deRFmodules e 2014 10 24 Contents 1 UUPUUG OG TG as criseceeattenaste tence series cadetencecietanadetensie pen eadtenans edema eenienese be tonemianaddeaoete 6 PLA GOSSA ae eRe ee CEE Pee ee en Ee ere ee rere ee ert eee er ee 7 Se OVOIWIGW ja E A E E E 8 3 1 S pported platform Sii rniran EEE A ERAEN TA EER NA 8 3 2 Conventions in this COCUMENT ceeeeeeceeee eect eeeeeeneceeeeeeeeeeeeeaaaaeaeeeeeeeeteeennaaaees 11 3 3 Architecture overview and protocol principles cc ecceeeeeeeeeeeeeteeeeeeeeeeteeeenaaees 11 4 Connection with the board eccsccavecdasessentibecunedecesaseceneraceiazendseldbeiureteherdigiausnune lenesdaeiauvenneed 12 4 1 UART connection ssassecccean cet cegeaiyiaiectenetaacaia yess deoutcapaaaciadautaecunieedindeeecnseeeaineantas 13 4 2 USB GONG CHG Wrox scdasescrtcerwhccdnents a tumeiandeda tree corsicednendsesowicednatsehaewia eantieraaes 14 5 Command SUMMANy nse cee ceases ee ceeeg ase et mn etteaarees gett e scien eeet ands 16 5 1 AT GOP AN adc acran che tea cxae pas cute ce acauka tan gee teatectatddanveaancutasacsevin secuaknadaaa viewer eee 16 5 1 1 Parameter persistence eceeceecccceeeeeeeeeeeeeeeeeeeeeeeeeeeeaaaeaeeeeeeeeeenenaaaaes 18 5 2 Res l CodE Sst tien eo aaa cae ee eee ae eae ee 19 53 O TEJISTEl S eee ee ee eee eee
54. e addressing mode Table 46 S30 Set node addressing mode S30 lt value gt The command sets the node addressing scheme to be used by some Wireless AT commands value specifies the addressing mode 0 extended 64 bit addressing 1 short 16 bit addressing The command requests the current addressing mode Result codes The command returns OK if value isin range otherwise it returns ERROR 530 RW Example ENT WPARENT 000100000A3B98CC AT WPARENT WPARENT 0000 OK bawa O Note Setting the addressing mode the S30 command affects the performance of the following commands WPARENT see Table 42 WCHILDREN see Table 43 and wWNB see Table 45 These commands use an extended MAC address if S30 is set to 0 but will switch to using short NWk addressing if S30 is setto 1 6 3 9 WLQI Get LQI value Table 47 WLQI Get LQI value WLQI lt addr gt The command requests the LQI value for the link to the node with short NWk address equal to addr specified in 16 bit hexadecimal format The command returns the actual LQI value in the range of 0 255 Notes 1 LQlI information can be retrieved for links within a one hop radius only 2 An end device can obtain LQI only to its current parent node and vice versa LQI to an end device can be obtained only from its current parent node 3 LQI value is measured during data transmission initiated by the ATD
55. e echoed at the same rate parity and format as those received The module checks on the characters coming from the host first to see if they match the termination character S3 see Table 73 Next it checks the editing character S5 see Table 75 before considering any other character This insures the characters will be properly recognized even though they were set to values the module uses for other purposes If S3 and S5 are set to the same value the character checked will be treated as a character matching S3 as S3 is checked before S5 The character defined by the S5 parameter by default it is the backspace character BS hex code 0x08 see Table 75 is intended to be interpreted as a request from the host to the module to delete the previous character Any control characters hex codes 0x00 through 0x1F inclusive that remain in the command line after receiving the termination character will be ignored by the module www dresden elektronik de Page 26 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Once the module finds the termination character it starts processing the command line The command line starts with AT characters 0x41 and 0x54 and should contain a sequence of commands in the following syntax formats Table 18 Command syntax formats Action command lt command gt lt value gt Parameter set command lt command gt lt value gt Parameter read command lt command gt Testing a r
56. e particular firmware version loaded on the device www dresden elektronik de Page 37 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Example AT WLEAVE Leave the network OK AT WROLE WROLE 0 1 2 OK AT WROLE 2 Switch to the end device role OK AT WROLE oe 2 value is stored in the NVRAM Coordinator router end device 6 2 7 GSN Set Get extended MAC address Table 36 GSN Set Get extended MAC address GSN lt value gt The command assigns the device extended MAC address value is a 64 bit hexadecimal number that uniquely identifies the device Notes 1 The command is not accessible when the node is joined to a network 2 The MAC address can only be set if it is invalid in the NVRAM Otherwise it is read only oe The command returns the device extended MAC address in the form of a 64 bit hexadecimal number Result codes OK is always returned Example AT GSN FEDCBA0 987654321 OK AT GSN GSN FEDCBA0987654321 OK ATI4 Just an alias to 14 FEDCBA0987654321 OK Default value 0000000000000000 Note User defined MAC address shall be a non zero values less than OxFFFFFFFFFFFFFFFF these values are reserved value is stored in NVRAM Node types Coordinator router end device www dresden elektronik de Page 38 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 2 8 WSRC Set Get short NWK add
57. e termination character in command line response and result code formatting value may be specified in the range of 0 127 Note It is strongly recommended to avoid changing this parameter during network operation 3 The command requests the actual ASCII code currently used as the termination character Result codes Example The module returns OK if value is in range otherwise ERROR is returned Important The current value of S3 is used to terminate the command line when entering the s3 setting command to specify a new command line termination character However the result code will use the new value of S3 specified in the command line For example if S3 is currently set to 13 when the ATS3 30 command line is issued the command line must be terminated with a lt CR gt character but the result code will use the character with a decimal value of 30 ATS3 13 OK ATS3 13 OK Default value 13 lt CR gt carriage return character Persistence value is stored in the NVRAM Node types Coordinator router end device Supported stack ZigBee 6 8 2 S4 Response formatting character Table 74 S4 Response formatting character S4 lt value gt www dresden elektronik de The command sets the ASCII code of the character used in response and result code formatting along with the S3 parameter see Table 73 The description of the V command show
58. e time interval between two consecutive data symbols exceeds the timeout preset wWAIT command Table 61 Notes ATDU is in fact shorthand for the ATD command with broadcast address FFFF as the destination Data should be preceded by lt CR gt S3 character see Table 73 S3 Termination character This symbol is not transmitted over the air and it is not counted in Length Data are broadcasted to the whole network radius 0 Result codes The node responds with OK immediately after the transmission if the node itself is in the network Otherwise ERROR is returned Example Send HELLO to all nodes in the network OK Node types Coordinator router end device 6 5 5 DS Send S register value to a specific node Table 56 DS Send S register value to a specific node DS lt S reg gt lt addr gt The command sends the S register value to a specific node Le lt arq gt The default arq parameter set to 1 or 0 specifies whether the ARQ or non ARQ data delivery mode is used 1 is implied if arq is omitted The addr destination node address should be a 16 bit hexadecimal short network address S register data are sent in the form readable by ATS command without the line termination characters Note S registers defined by user extensions are also accessible by this command Result codes If an acknowledgement is requested arq is set to 1 the node responds with OK upon receiving an acknowl
59. e types Coordinator router end device 6 5 9 WRETRY Repetition count Table 60 WRETRY Repetition count The command returns the actual number of retransmission The returned value corresponds to the apscMaxFrameRetries variable introduced by ZigBee recommendation Result codes OK is always returned Example AT WRETRY WRETRY 3 OK Node types Coordinator router end device 6 5 10 WWAIT Data transmission waiting timeout Table 61 WWAIT Data transmission waiting timeout WWAIT lt value gt The value parameter sets the timeout in milliseconds for the module to wait for entering the D see Table 53 or the DU see Table 55 command If a pause between two consecutive characters coming from the serial interface exceeds the specified timeout the node will start data transmission even though the data length encountered has not yet reached the number specified by the length argument of the D DU command In this case the length is replaced with its actual value according to the data transmitted www dresden elektronik de Page 55 of 91 User Manual Version 1 2 2014 10 24 WWAIT WWAIT S register Result codes Example Wireless AT for deRFmodules The command returns actual timeout value The command requests the range of valid timeouts S53 RW OK is returned if the value is in the range otherwise ERROR is returned AT WWAIT 500 OK AT
60. eRFbreakout Board is given in Section 7 1 3 Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV BB UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV BB UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO fero2 es Pros Pinos Pwe 60 Pins nie ance Fa Pinas Prat feroa eo Pre Pnie l Ti www dresden elektronik de Page 81 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 1 5 Standard on deRFnode for AVR The deRFnode development board connects several module pins to sensors LEDs and buttons on the board Please refer to 5 for details Most signals are also available on the expansion header IO If you use the USB communication on a deRFnode for AVR many connections are disabled as many pins are required to control the USB converter Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD NODE UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD NODE UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO eror er reo 10s rsm pwr es pms rs te0s anor F Pe Oe 22000 GPIO2 Gs Pinos 1027 LED1 Pwm2 Be Pin 18 IO Header 11 ADC2 lO Header 23 22A02 qpio3 Bo Pin 16 IO Header 10 22T00 sotop _GP O4 D5 Pin 12 10 Header 18 23T00 GPIO5 Ee Pin37 lO Header 19 23T02 GPIO6 lO Header 06 GPIO7 lO Header 21 GPIO8 G2 Pin 06 lO Header 29 Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD NOD
61. eakout board UARTO on deRFnode UARTO USB on deRFtoRCB adapter UARTO on deRFtoRCB adapter and RCB Breakout Board UARTO UART1 on deRFtoRCB adapter and Sensor Terminal Board UARTO UART1 USB 22T02 Pluggable adapter boards 7 1 3 7 1 5 7 1 7 7 1 9 7 1 11 22T00 with pre soldered deRFmega128 OEM modules 7 1 1 7 1 1 22M12 Solderable deRFmega128 7 1 2 OEM module with PA LNA front end 22713 Pluggable adapter board with 7 1 2 7 1 4 7 1 6 7 1 8 7 1 10 7 1 12 pre soldered deRFmega128 OEM module 23M00 _ Solderable deRFmega256 7 1 1 23M10 OEM modules 23T00 Pluggable adapter boards 7 1 1 7 1 3 7 1 5 7 1 7 7 1 9 7 1 11 23702 with pre soldered deRFmega256 OEM modules 23M12 Solderable deRFmega256 OEM module with PA LNA 7 1 2 front end 23713 Pluggable adapter board with 7 1 2 7 1 4 7 1 6 7 1 8 7 1 10 7 1 12 pre soldered deRFmega256 OEM module A visual overview of the supported AVR radio modules is given in in section 7 1 of 3 For each platform a separate firmware is available The name of the firmware file is constructed to convey all required information to identify the intended platform and interface www dresden elektronik de Page 9 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 As an example wATZ_for_deRFmega256 PADIV RFtoRCB STB USB_V1_00 stands for the deRFmega256 module with power amplifier and antenna diversity pre soldered onto an adapter board which is
62. edgement in several attempts see parameter WRETRY Table 60 otherwise it returns ERROR If the destination node or the sending node itself is not in the network ERROR is returned Also if the specified S register cannot be read the command returns ERROR and the node does not send anything to the air Example ATDS130 2 0 Send GPIOO value to the node with OK address 2 without using ARQ Node types Coordinator router end device Supported stack ZigBee 6LoWPAN www dresden elektronik de Page 53 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 5 6 WPING Ping the node Table 57 WPING Ping the node WPING lt addr gt The command pings the targeted node addr specifies the destination address as a 16 bit hexadecimal short network address This command is equivalent to the D command with ARQ and zero data length ATD lt addr gt 1 0 Result codes The node responds with OK upon receiving an acknowledgement in several attempts see parameter WRETRY Table 60 otherwise it returns ERROR If the destination node or the sending node itself is not in the network ERROR is returned Node types Coordinator router end device 6 5 7 WSYNCPRD Poll rate for requesting indirect transactions from the parent Table 58 WSYNCPRD Poll rate for requesting indirect transactions from the parent WSYNCPRD lt rate gt The command sets the poll interval to the
63. el mask Such behavior may lead to the following issue If the network coordinator leaves the current network while routers continue their operation and then initiates a new network formation it will establish a network with a short PAN ID different from the short PAN ID of its previous network Hence communication between the coordinator and its former network will not be possible To avoid the problem described above the WNWKPANID command can be used to configure a predefined short PAN ID on the network coordinator Table 38 WNWKPANID Set Get short NWK PAN ID WNWKPANID lt value gt The command assigns the device short network PAN ID of the target network for the device value is a 16 bit hexadecimal number If the node is configured as the coordinator then upon the wJOIN command it will form the network with its short PANID equal to value If WNWKPANID is set to FFFF the stack running on a coordinator automatically assigns the short PAN ID randomly and intentionally different from all the other networks detected while forming its own network If WNWKPANID is setto FFFF on an end device or a router it will join to any network matching its WPANID ref setting Otherwise it will be able to join only to a network with a target short PAN ID equal to value Notes 1 The command is not accessible when the node is joined to a network 2 Using WNWKPANID does not cancel configuration of the WPANID parameter
64. eless AT for deRFmodules e Network management functions sssesseesssesseerrrteesetrtrrrrntressrrrnnrrnnnrsserrnennnnnenent 41 6 3 1 WJOIN Start Join to the network cccceeeeeeeeeeeeeeeeteeeeeeeeeeeeeenaaees 41 6 3 2 WLEAVE Leave the network 00 ceeeececceceeeeeeeeeeeeseeeeeeeeeeeeeeesaaaaes 41 6 3 3 WNWK Get networking status sssseeeeeeeseeesnernreerseerrerrnersserrenee 42 6 3 4 WPARENT Get parent address ccccceeeeeeeeseseeeeeeeeeeeeeenenaaees 42 6 3 5 WCHILDREN Get children addresses ceeeeeeeeeeeeeeeeeeeeeeeeetanees 43 6 3 6 WNBSIZE Get number of neighbors ccceeeesesceeeeeeeeteeeeeeeeees 43 6 3 7 WNB Get neighbor information c ccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeenaaees 44 6 3 8 S30 Set node addressing mode c cccceeeeeeeeeseseeeeeeeeeeeeeeeneeeees 45 6 3 9 AWLOP Get LOM value sic cnistceusieecdesiisdeed iene ua amiieeias 45 6 3 10 FWRSSI Get RSSI value viscisascsoincerecvinceressesrecetieerssvmcenemtacerereawecncns 46 SECUND eea a a a a catia temaenas 46 6 4 1 WSECON Enable Disable security ssnnsenesssesennrnneneserernrrrneesserrrnee 47 6 4 2 WSECSTATUS Set Get security Status eeceeeeeeeeeeeeeeeeeeees 48 6 4 3 WNETKEY Set Get network encryption key cceeeeeeeeeeeeteeees 48 6 4 4 WTCADDR S
65. em use the AT amp F command see Table 72 If z is put in a line together with some other commands the processing of commands placed after z is disabled The result code is sent after the reset process is completed During the reset process some transients may be observed on the module pins including GPIO because of the nature of the MCU used It is strongly recommended to wait until the OK result code is received or an equivalent numerical code before sending any new command to the module Result codes OK is returned if the command is supported by the device s platform Otherwise ERROR is returned Example ATZ OK Node types Coordinator router end device 6 7 2 amp H Command Help Table 66 amp H Command Help The command outputs a list of valid AT commands The listing order may change depending on the firmware version Result codes codes Result codes Jox is oK is always returned oK is always returned www dresden elektronik de Page 59 of 91 User Manua Version 1 2 Wireless AT for deRFmodules 2014 10 24 Example OK Node types Coordinator router end device 6 7 3 H Display parameters and S register values Table 67 H Display parameters and S register values SH The command outputs the values of parameters and S registers The listing order may change depending on the firmware version Result codes OK is always returned Examp
66. eneeeaaaees 65 6 8 6 V Response TOMMAL saciccccexeinseneviencecreratesgcatennecrerceeneleianrerenesenerentnonee 66 6 8 7 X Result code selection ciseter sorceress accent estes eeoie 67 6 8 8 IPR Serial port communication rate seseeeeeeeeeseeeeeeeeereerrererrerrrrreeee 67 6 8 9 IFC Serial port flow control ssscceicisceissccasecascrutsedecenvesassounsel cecazeraaveencees 68 6 8 10 amp D DTR behavior ceccceeeeeeeneeeeeeeeneeeeeeecaeeeeeeecaeeeeeeecaeeeeetenaeeeeetes 68 6 8 11 SO Request for the latest result code ssnsssseseseeeseseeereeererrrererrrrereee 69 www dresden elektronik de Page 3 of 91 User Manual Version 1 2 Wireless AT for deRFmodules e 2014 10 24 6 9 Hardware GONG lt eiceeaccocesccresutte Secciazance yes acantesangaayy sn ciectueacacavvin adecceeenacanves actates 70 6 9 1 GPIO configuration x cdisnciccexcceisrtnscts ohecnwicedsneieeeeiientssrcrwickdintaeenanes 70 C92 OPIO sssrin tetera iene enerd tee 70 6 9 3 A D configuration eee ener ene eee ree eee oe ree tere meee eter rere 71 6 94 AID prerie E acim aan 72 6 9 5 PWM CONMOUMANOMsces eee ceccecartesseccasats ccasaessysacoenieeaeaeavviaeattnocaagetavaaeasieces 72 6 9 6 PWM frequency CON sascccc cet lccctces scathged exteaseearhcad natecnereslaaa nediaer bee 73 6 9 7 PWM duty cycle control ccecincirescsteeimnnentiecenniesensiadacttiniencrenisemteanecenenes 74 6 9 8 Reading and writing
67. er down modes if no flow control method is selected as the module is not accepting any data from the UART The command requests the actual flow control settings The command requests a list of the flow control settings supported Result codes OK is returned if the specified flow control combinations are supported otherwise it returns ERROR Example AT IFC 2 2 OK AT IFC IFC 2 2 OK AT IFC IFC 0 2 0 2 OK C 6 8 10 amp D DTR behavior Table 83 amp D DTR behavior amp D lt value gt The command specifies how the module manages the DTR line 0 The module ignores the DTR line 1 The module wakes up if it is sleeping and with a short delay can start processing data coming from the UART www dresden elektronik de Page 68 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 S registers s50 RW Result codes OK is returned if the requested mode is supported otherwise ERROR is returned Example AT amp D1 OK Default value Persistence value is stored in the NVRAM Node types Coordinator router end device Supported stack ZigBee 6 8 11 S0 Request for the latest result code Table 84 S0 Request for the latest result code Request for the result code from the most recently executed command If that command was completed with an ERROR result code register SO will contain a nonzero value Returned values No error Syntax error Improper n
68. et Get Trust Center address cc ceeeeeeeeeeeeeeetteees 49 Data transmission eini AANER 50 6 5 1 Parent polling MeChAaNnisM c cccceeeee ee eeeteeeeee eter eeeeeeeeeeeeeeeeeeeenenaaees 50 6 5 2 D Send data to a specific NOE ee eeeeeeececeeeeeeeeeeeeeeeeeeeeeeeeeeeeeenaaeees 51 6 5 3 DB Send binary data to a specific NOE eeeceeeeeeeeeeeeeteeeeeeeees 52 6 5 4 DU Send broadcast data vecccck sate heveniassivscesledvemsetevaieetenindeadewniteleante 53 6 5 5 DS Send S register value to a specific node ssesssssssrerrreesssrrree 53 65 6 WPING Ping the node xiiis ives sce ccace ea soaei ccs cchietesaceiedsseonstesceenvenaszcnetse 54 6 5 7 WSYNCPRD Poll rate for requesting indirect transactions from the paroni sects ass va tect ttec E eaten ane E neeneeree peas 54 6 5 8 WTIMEOUT Data delivery timeout cccceceeeseeeeeeeeeeeeeeeeeeeeees 55 659 WRETRY Repetition COUN isnt dete piicntidsseisdideandcicu 55 6 5 10 WWAIT Data transmission waiting time Out c eeeeeeeeteeeeeeeeees 55 Power management sues secon cece cnardaenceeteca ates daar ctceeceaatics Sone Niccamtastes tue teiamnacecaieees 56 6 6 1 WPWR Configuration of sleep active intervals cccceeeeee 56 6 6 2 WSLEEP Force node to SIC p ceceeeccceeeeeeeeeeneeeeeeeeeeeeeeenenaaaees 57 6 6 3 WTXPWR TX p
69. exadecimal short network address of the destination node The An optional arq parameter equal to 1 or 0 controls the ARQ nonARQ data delivery mode If omitted then ARQ is used The length parameter specifies the length in bytes of the data portion to be sent It shall not exceed the maximum allowable number 95 bytes for an un encrypted frame and 77 bytes for an encrypted frame If the Length parameter is omitted the maximum possible value is implied by default data should be preceded by lt CR gt S3 character See Section 6 8 1 S3 Termination character This symbol is not included in frame payload to be transmitted over the air and it is not counted in Length Data transmission starts either when the specified number of data bytes is received over the serial interface or when the time interval between two consecutive data symbols exceeds the timeout preset WWAIT command see Table 61 In contrast to the D command data transmission doesn t start if a lt CR gt code S3 character see Section 6 8 1 S3 Termination character occurs inside the data Note If the destination address is a broadcast address FFFF for all nodes FFFC for router coordinator nodes FFFB for low power routers FFFD for all nodes which have the RxOnWhenldle flag set the broadcast transmission is performed If data transmission requires an acknowledgement from the destination node arq is set to 1 then an OK result code is ret
70. in information about neighbor coordinator router nodes 6 3 1 WJOIN Start Join to the network Table 39 WJOIN Start Join to the network WJOIN The command forces the device to form a network for coordinator node or join an existing network for router or end device nodes The desired network and device characteristics shall be set prior to the WJOIN request using if necessary Wireless AT commands from Section 6 2 Networking parameters Result codes OK is returned if network formation join is completed successfully ERROR is returned if failed If the node is in the network already it returns OK immediately Example AT WJOIN OK Node types Coordinator router end device 6 3 2 WLEAVE Leave the network Table 40 WLEAVE Leave the network The command forces the node to leave the network If the node has any children it will automatically force them to leave the network too Note Parameters stored in NVRAM persist even after the node leaves the network Result codes OK is returned on process completion If the device was not connected before starting the process it returns ERROR immediately Example AT WLE OK Node types Coordinator router end device www dresden elektronik de Page 41 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 3 3 WNWK Get networking status Table 41 WNWK Get networking st
71. io module versions include the pluggable type A and the solderable type C compact evaluation module versions as well as the deRFmega OEM modules type M see 2 which also can be affixed onto an adapter board type T to adapt their LGA pad footprint pin compatible to the evaluation radio modules deRFmega128 22A00 or 22A02 Table 1 lists all dresden elektronik platforms supported by Wireless AT All variants operate as plain module and can also be applied to combinations of the above mentioned deRFmega modules with other dresden elektronik development boards such as deRFbreakout board deRFnode deRFtoRCB adapter deRFtoRCB adapter and RCB Breakout Board deRFtoRCB adapter and Sensor Terminal Board Dependent on your platform or board combination different communication interfaces UART USB are provided Table 1 gives an overview and links to Section 7 to find your www dresden elektronik de Page 8 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 correct firmware interface as well as the pin assignment of your module or board combination Table 1 Supported platforms of wirelessAT for ZigBee Module Explanation Available platforms and interfaces 22A02 Pluggable deRFmega128 7 1 1 7 1 3 7 1 5 7 1 7 7 1 9 7 1 11 22A00 evaluation modules 22C02 Solderable deRFmega128 7 1 1 22C00 evaluation modules 22M00 Solderable deRFmega128 22M10 OEM modules plain without development board UARTO on deRFbr
72. ion Table 89 PWM configuration S lt reg gt lt value gt The command configures a particular PWM channel T PWM channel Output pin reg 0 GPIOO 140 1 GPIO1 141 2 GPIO2 142 lt value gt Description 0 2 Disable PWM channel 1 Enable channel setting non inverted output polarity output is low when duty cycle 0 and high when duty cycle 100 3 Enable channel setting inverted output polarity output is high when duty cycle 0 and low when duty cycle 100 Notes 1 When a PWM channel is enabled the corresponding output pin is configured as output to be controlled by that PWM channel Duty cycle for the channel is set to 0 PWM channel frequency is set to the default value 5kHz if no channel has yet been opened Otherwise the frequency last set for any other channel is used 2 When a PWM channel is disabled by setting reg to 0 or 2 the corresponding output pin is configured as tri state and is fully controlled as GPIO On the deRFnode board GPIO2 is connected to a LED Result codes OK is returned if the value is in the valid range otherwise ERROR is returned The command requests the current PWM configuration Result codes OK is always returned Example Enable PWM channel 0 setting noninverted polarity output Default value 0 disabled www dresden elektronik de Page 72 of 91 and enable PWM channel 2 setting inverted polarity output User Manual Version 1 2 Wireless AT for deRFmodules 2014
73. is just keeping a copy of the parameter accessible through the WPANID command S20 R This register contains the actual extended PAN ID that is used for networking If the S21 register is set to 0 and the device is in the network this register will keep the extended PAN ID of the selected network If the device has not been connected this register contains 0 Result codes The set command is executed if the device is not in the network and the extended PAN ID is in the valid range In such case the device returns OK upon completion Otherwise the extended PAN ID is ignored and the device responds with ERROR Example AT WPANID 10 OK AT WPANID WPANID 0000000000000010 OK AT WPANID WPANID 0000000000000000 FFFFFFFFFFFFFFFE OK 6 2 2 VWCHAN Get active channel Table 31 WCHAN Get active channel Syntax descriptor Explanation WCHAN The command requests the channel number in hexadecimal form the device is currently operating on If the node is not in the network FF is returned Restos ior SSSCSSCSCSCSCSCS www dresden elektronik de Page 34 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Example AT WCHAN WCHAN 0B OK Node types Coordinator router end device Supported stack ZigBee 6 2 3 WCHMASK Set Get channel mask Table 32 WCHMASK Set Get channel mask Explanation WCHMASK lt value gt The command sets the channel m
74. le ATSH WPANID 0000000000000000 WCHAN FF WCHMASK 00000800 WAUTONET 0 WPWR 100 1000 WROLE 2 WSRC 0001 WSYNCPRD 1400 WTXPWR 0 WTIMEOUT 2800 WRETRY 3 WWAIT 5000 E 1 Q 0 V 1 X 0 IPR 38400 IFC 0 0 GMI dresden elektronik GMM deRFmega256 GMR BitCloud v 1 14 0 WirelessAT v 1 0 GSN 0001000011672CFC skipped S146 0 S147 0 S148 0 OK www dresden elektronik de Page 60 of 91 User Manual Version 1 2 2014 10 24 Node types Wireless AT for deRFmodules Coordinator router end device Supported stack ZigBee 6 7 4 I Display product identification information Table 68 I Display product identification information Syntax Explanation I lt value gt The command instructs the node to return information text identifying the device Information text depends on value as follows Value Information text Reference 0 All the identifiers below Section 6 7 5 1 Manufacturer identifier Section 6 7 6 2 Model identifier Section 6 7 7 3 Hardware software revision identifier Section 6 7 7 4 Product serial number identifier If value is omitted 0 is implied by default Result codes OK for any of the aforementioned values ERROR otherwise Example ATIO dresden elektronik BitCloud v 1 14 0 WirelessAT v 1 0 00212EFFFF001A90 OK Node types Coordinator router end device Supported stack ZigBee
75. ll Expected value is noted in the description of a particular command Table 20 Example of action command C e C e 6 1 7 Parameter set command syntax The following syntax is used for a parameter set command Table 21 Parameter set command syntax Command AT syntax Parameter set command lt command gt lt value gt If the named parameter is implemented in the module all the mandatory values are specified and all values are valid according to the definition of the parameter where the specified values should be stored If lt command gt is not recognized one or more of mandatory values are omitted or one or more values are of the wrong type or beyond the valid range then the module generates the ERROR result code and terminates processing of the command line ERROR is also generated if too many values are specified In case of an error the previous values of the parameter are unaffected Table 22 Example of parameter set command www dresden elektronik de Page 29 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 1 8 Parameter read command syntax The host may determine the current value or values stored in a parameter by using the following syntax Table 23 Parameter read command syntax Command AT syntax Parameter read command lt command gt If the named parameter is implemented its current values are sent to the host in an information text response The fo
76. lways have its short address set as 0000 Nodes of other roles shall have nonzero short addresses WSRC The command returns the device short address in the form of a 16 bit hexadecimal number If the node is in the network the command returns its actual short address independently of the addressing scheme used If the node is not joined to a network FFFF is returned if stochastic addressing is used on the device and the user pre configured address in the case of static addressing The command requests the range of valid addresses S55 W Result codes OK is returned if value is in range otherwise ERROR is returned Example AT WSRC 2ABC OK AT WSRC WSRC 2ABC OK AT WSRC WSRC 0000 FFF7 OK Default value FFFF Note The FFFF default value implies that stochastic addressing will be used on the device upon net work join value is stored in the NVRAM Node types Coordinator router end device www dresden elektronik de Page 39 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 2 9 WNWKPANID Set Get short NWK PANID The short PAN ID value is used in ZigBee frame headers during data exchange to identify which network frames belong to Its 16 bit value is set by the coordinator during network formation By default the short PAN ID is chosen randomly and is intentionally different from the short PAN IDs of other networks present in the same location on channels specified in the chann
77. megai28 and deRFmega256 radio modules are described in detail in section 4 7 of 2 Table 96 shows the recommended fuse byte settings Table 96 Extended fuse bytes Fusebytes Setting Description RSS eS EXTENDED Extended fuse byte HIGH Fuse high byte Fuse low byte Figure 10 shows the recommended fuse setting of the AVR microcontroller in Atmel Studio Following fuses should be activated e BODLEVEL Brown out detection at supply voltage of 1 8 V e JTAGEN The JTAG programming interface is enabled after start up Should be deactivated to prevent memory access from end user e SPIEN The serial programming interface is enabled after start up Should be deactivated to prevent memory access from end user e EESAVE The EEPROM data will be preserved by the chip erase cycle This will protect the internal MAC ID from unintended erasing after a firmware update e CKSEL_ SUT The selected clock source is the transceiver oscillator This ensures a more precise MCU clock over the whole working temperature range AVR Dragon 00A200006766 Device Programming Tool Device Interface Device signature Target Voltage AVR Dragon w ATmegalZ8RFAL v JTAG w Ox1EA701 Read 3 3 Read ts Interface settings Fuse Name Value Tool information BODLEVEL 1V8 iv ocnven Device information JTAGEN v Memories SPIEN woTon EESAVE v BooTsz 4096w_Fo00 soorrst O cxoive cout CKSEL_SUT v
78. n CRE Z 140 XIX 141 142 143 S144 S145 PWM frequency control CRE Z 143 XIX 144 145 146 S147 S148 PWM duty cycle control CRE Z 146 xX X 147 148 POKE Willngtonardware registers ORE Z K PEEK Reading from hardware registers CRE z Ix WPASSWORD Setapassword oe z _ R_____ Remote execution of AT command ore z Only available on deRFmega256 modules aag psj Ea x X X x X X ae ee x O EERE m my m m m my m m olo O D I m N A E E Note The column Node type contains roles of nodes to which a given command is applicable C stands for coordinator R for router and E for end device Note The column Supported stack type contains the supported network standards Z stands for ZigBee 6 for 6LoWPAN und M for MAC Stack 5 1 1 Parameter persistence In Table 5 many parameters associated with AT commands are indicated as persistent This means that their values are stored in the MCU s persistent memory and in contrast to non persistent parameters they will not be set to default configuration upon device reset However the value assigned to a persistent parameter by the corresponding AT command is not written to the persistent memory right away Instead it is applied to the Wireless AT operation but is kept in RAM Wireless AT periodically with a five minute interval verifies whether or not the values of persistent p
79. n elektronik OK ATR10 0 WAUTONET 1S30 1 Set auto network mode and command addressing mode OK www dresden elektronik de Page 23 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 5 4 4 End device power control This example demonstrates how to configure an end device node with a certain duty cycle perform a network join and deliver data to an end device Table 13 Configure end device node with duty cycle E 2 WSRC 20 Set the board as an end device with short address 0x0020 OK AT WPANID 1704 WCHMASK 100000 Set extended PAN ID and channel mask channel 0x14 for this OK node AT IFC 2 2 Configure RTS and CTS line modes for end device flow control OK Reconfigure flow control on the host accordingly for example select hardware mode for flow control in your favored terminal program Now the data intended for the end device can be sent from the coordinator Table 14 Test data from the coordinator Send test data from the coordinator to the end device staying in sleep mode In the active state the end device periodically polls its parent for buffered data with an interval configured by the WSYNCPRD parameter In the example given it retrieves the test frame Table 15 Polling of buffered data from parent DATA 0000 0 4 test The word test is received by the end device after wake up 5 4 5 Control of GPIO in and outputs PMW and ADC For mapping of the modules
80. n integrate new nodes into the network cr io Identifier IEEE Institute of Electrical and Electronics Engineers Internet Protocol Version 6 version of the Internet Protocol IP intended to succeed Pv4 which is the protocol currently used to direct almost all internet traffic www dresden elektronik de Page 7 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 PWM Pulse Width Modulation Ro Read Only Parameter Router A device that forwards data packets between wireless and computer networks WPAN _ Wreless Personal Area Network OOOO UOS WSN __ Wheless Sensor Network OOOO 200 Zee Deveson O o ZigBee Low cost low power wireless mesh network standard The ZigBee Alliance is a group of companies that maintain and publish the ZigBee standard 3 Overview SDK o Software Development Kit P P R R R R S TX U W W Z HY WM SSI TS W X DK ART PAN SN DO Wireless AT is based on the AT command protocol which is widely used in embedded networking systems due to its simplicity textual parameter representation and inherent flexibility This section gives a brief introduction into the concept of the Wireless AT protocol lists hardware platforms Wireless AT is available for and describes conventions used throughout the document 3 1 Supported platforms All modules of the deRFmega128 and deRFmega256 series are supported by the deWirelessAT software please refer to 1 The rad
81. n parity 1 stop bit e 7 data bits odd parity 1 stop bit e 8 data bits no parity 1 stop bit Both the host and the module are able to accept commands at 1200 bits per second at least Particular character formatting and the data rate can be changed using appropriate AT commands see Table 81 Table 82 and Section 6 8 6 The host has the means to explicitly select the data rate and character formatting according to the specifications above 6 1 2 Alphabet For any information exchange between the module and the host the T 50 International Alphabet 5 IA5 is used see 7 Only the seven low order bits of each character are significant and any eighth or higher order bit s if present are ignored for the purpose of identifying commands and parameters Lowercase characters hex codes 0x61 through 0x7A are considered identical to their upper case equivalents hex codes 0x41 through 0x5A when received from the host by the module Result codes from the module which are particularly defined are specified in uppercase 6 1 3 Basic command line operations Command line editing echoing and repeating are done in accordance with Clauses 5 2 2 5 2 3 and 5 2 4 of the Recommendation V 250 The description below follows the statements introduced in 7 The module may echo back to the host the characters received from the host depending on the setting of the E command see Section 6 8 4 If enabled the characters received from the host ar
82. ng process of initial installation Table 8 Network coordinator Set a node to transmit EVENT and DATA to a host AT WCHMASK 100000 Set node s channel mask this one enables channel 0x14 only Set coordinator role and short address to 0x0000 Enable automatic networking OK AT WJOIN Perform network start OK Result code for successful network start If the node indicates ERROR it means the embedded software does not support the coordinator function and cannot be configured in such a way In this case try checking the coordinator support on other nodes using the AT WROLE command as described in Table 35 www dresden elektronik de Page 21 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Then configure another device to be a router node Table 9 Network router Command response Comment Set a node to transmit EVENT and DATA toa host AT WCHMASK 100000 Set node s channel mask this one enables channel 0x14 only E 1 WSRC 10 Set router role short address equal to 0x0010 Enable automatic networking OK Indication for router having joined the network 5 4 2 Checking network status and basic data transmission Now the networking status can be easily verified on both devices by sending the AT WNWK command and performing data exchange between them For example on the coordinator Table 10 Verify networking status on the coordinator Command response Comment Reques
83. oard assiascassctsrceseetsteastereimtireinccsavebiiemesiuaeumadnamieriaeeineiae 85 7 1 11 Standard on deRFtoRCB Adapter and Sensor Terminal Board 86 7 1 12 With power amplifier and antenna diversity on deRFtoRCB Adapter and Sensor Terminal Board ccccccceeeesesenccceeeeeeeeeeeeeaaeeeeeeeeeeeesessaaaeeeeeees 87 T2 F sesetiNgS Reena eee een ee mee ere ee eee eee ee ee eee 89 8 Referentes iieiaei ee ee ne nee eee 90 www dresden elektronik de Page 4 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Document history pate version Descriptor 2014 04 11 Editorial revision reflects Firmware v1 01 2014 10 24 Editorial revision reflects Firmware v1 02 www dresden elektronik de Page 5 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 1 Introduction In this document an application for dresden elektronik radio modules is described whereby networks data transfers and module related hardware queries can be controlled per AT commands The application is aimed at enabling the users to implement the modules without programming for their respective application Wireless AT is a manufacturer specific profile developed on top of the Atmel BitCloud C API It offers control of an embedded BitCloud stack through a serial interface using a standardized AT command set and requires no embedded API programming Node parameters can be easily accessed over the air without a s
84. ommand description then platform independence is implied 3 2 Conventions in this document The term module will be used throughout the document to imply a supported platform MCU RF chip is controlled by host equipment using AT commands The term node will be used in reference to a device s role in the network end device router or coordinator To be distinguished from the rest the definitions of commands directed to a module are denoted in the Courier font while module responses are shown in Courier Bold font Angle brackets lt gt enclose mandatory parameters Square brackets contain optional parameters 3 3 Architecture overview and protocol principles The Wireless AT application is developed on top of the Atmel BitCloud ZigBee PRO certified stack see 4 It provides an easy to use control over ZigBee PRO networking functionality that is accessible to the host device through a serial connection using an extensive set of AT commands in ASCII format A Wireless AT device executes received requests and responds to the host Figure 1 illustrates the basic architecture Furthermore the Wireless AT application is designed in order that the 6LoWPAN and the MAC layer are supported too d ie SE k Host CE interface gt de radio module Figure 1 Wireless AT usage scheme An important feature of Wireless AT is the capability to request execution of a particular function over the air
85. only one numeric value the set of supported values may be presented in an information text as an ordered list of values The list should be preceded by left parenthesis nex code 0x28 and closed by right parenthesis hex code 0x29 If that very single value is supported it should appear in parentheses If more than one value is supported then the values may be listed individually separated by comma characters hex code 0x2C When a continuous range of values is supported the values appear in the form of the first value in the range and the last value in the range both separated by a hyphen character hex code 0x2D The specification of single values and value ranges may be alternated within a single information text Nevertheless the supported values should be indicated in an ascending order The following are some examples of value range indications www dresden elektronik de Page 30 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Table 26 Value range indications 0 Only the 0 value is supported The values 1 2 and 3 are supported 1 3 The values 1 through 3 are supported 0 4 5 6 9 11 12 The several listed values are supported 0 4 6 9 11 12 Alternative expression of the previous list The value may be either a single value parameter or a compound value parameter as described in Section 6 1 4 Some commands may have no parameters at all Expected values are noted in the description of a partic
86. ontroller Board are easily available on screw terminals and or standard pin connectors The board provides digital and analog GPIOs a 10 pin JTAG connector and a 3 pin RS232 driver Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD RFtoRCB BB UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD RFtoRCB BB UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD RFtoRCB BB UART1_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD RFtoRCB BB UART1_V1_02 Fuse settings See Section 7 2 Interface UART1 oe Coat Hao pe eS ee ee oroz oo Pnie pro Jone we Pn 10 pas ance re omar ore 7 1 10 With power amplifier and antenna diversity on deRFtoRCB Adapter and RCB Breakout Board A short overview of the adapter deRFtoRCB and the RCB Breakout Board is given in Section 7 1 9 Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV RFtoRCB BB UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV RFtoRCB BB UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO Firmware name ATmega128RFA1 wATZ_for_deRFmega128 PADIV RFtoRCB BB UART1_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 PADIV RFtoRCB BB UART1_V1_02 Fuse settings See Section 7 2 Interface UART1 www dresden elektronik de Page 85 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Lepor ex nas ueo pwr er rnao zoe rocr
87. orrectly the command sequence is interrupted and the ERROR result code is returned The OK result code is returned if all commands in the sequence were executed successfully Each command in a sequence may have a different syntax depending on whether it is used to execute an action read or write parameter s or test a valid parameter range An example illustrating different command and response types is provided in the table below Table 3 AT command string execution Command to device ATE1V1 WTXPWR Turn echo on E1 enable verbose response 4 WLOI2 WRSSI2S22 set TX power level to 4dBm request LQI and RSSI for link with node 2 request active channel B______ Noes operating on carnal O08 Besco oR Execution is competed successtuy More complex examples are provided in Section 5 4 Examples In addition to synchronous result codes indicating command execution status a Wireless AT device can send asynchronous result codes to the host device upon specific events The full list of both verbose and numeric forms of the result codes can be found in Section 5 1 1 Parameter persistence Section 5 1 AT commands summarizes the basic specifications of AT commands grouped into functional categories while detailed definition for each command is given in Section 6 S registers are a functional representation of S registers with the corresponding AT commands 4 Connection with the board The supported module on
88. os eo Panzo www dresden elektronik de Page 79 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 1 2 With power amplifier and antenna diversity plain The term plain means the board is used without any development board Controller ATmega128RFA1 Firmware name ATmega128RFA1 wATZ_for_ deRFmega128 PADIV UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_ deRFmega256 PADIV UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO Chan Port Chan Port Pn Cae ewe 05 Fn 7 ee ers Ee rar eros se Pme amor er Pma PWM ADC LGAPad Chan LGAPad Chan LGA Pad eee eS cn Pwmo E3 Pad 32 ADCO Pad 40 www dresden elektronik de Page 80 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 1 3 Standard on deRFbreakout Board The deRFbreakout Board connects all module pins directly to screw terminals It has itself no LEDs or buttons but the default 6 pin communication header and JTAG header for AVR and ARM Firmware name ATmega128RFA1 wATZ_for_deRFmega128 STD BB UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_deRFmega256 STD BB UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO Module eee cree P COA ee ee opoz c enos enos wwe ee rinse rine ance re enar ena apios Bo Pin 16 Pint6 Pinte 7 1 4 With power amplifier and antenna diversity on deRFbreakout Board A short overview of the d
89. ower level cccceeeeeeecececeeeeeeeeensneeeeeeeeeeeeeneesaeeees 58 Generic COMMUG arrira n n O O E A A E ARAR 59 6 7 1 Z Warm t sebo ien a A 59 6 7 2 OH Command Help vei sccewccssscnesceszeneccaigensnsaevacnsessncnavinisdosstaecenaveaiascoeess 59 6 7 3 H Display parameters and S register values eeeeeeeeeeeeeeeeeeees 60 6 7 4 P Display product identification information ssssseseeeeeeseeeeeees 61 6 7 5 GMI Get manufacturer identifier ccccceeeeeeeeeeesseeeeeeeeeeeeeeeeeeees 61 6 7 6 GMM Request for the model identifier ssssssssssesssesssseeeees 62 6 7 7 GMR Request for the hardware software revision identifier 62 6 7 8 amp F Set to factory default Configuration cceeeeeceeeeeeeeeeeeeeeeteees 62 Host interface COMMANS cicccccsenssecdrerecenetesaneaterstoaniesewitcdtensteiensetiontieeeds 63 6 8 1 S3 Termination character sccscctvarestissestetessaceebs une talvAcasitatdleneasticetd 63 6 8 2 S4 Response formatting character ccceeeseessseeeceeeeeeeeeeeesaeees 63 6 8 3 S5 Command editing character icc ccciiccassssicsreniiearsevnceneesteeerersaweencon 64 6 8 4 E Command OG NO accra tesceetarece ena eee venetete cea nieteectene dicen eeseaevenes 65 6 8 5 Q Result Code suppression cceeeeeeeeeeceeeeeeeeeeeeeeeneeeeeeeeeet
90. pecifically dedicated protocol thus opening a way to network management and remote node control In this document the Wireless AT command language using deRFmodules is described The application is designed such that ZigBee BLOWPAN and the MAC layer are supported Using the Wireless AT application a radio module can be applied like a modem for the respective network WSN The application is designed as an independent module that can be applied for different wireless protocols To be able to connect this independent module to the different software stacks there must be a second module which connects the generic module to the respective stack The different deRFmega128 and deRFmega256 OEM and evaluation radio modules are functioning without any development board on the deRFbreakout board the deFRnode board the as well as on deRFtoRCB adapter and combinations with it the RCB Breakout Board and the Sensor Terminal Board These options using different platforms are described in Section 3 1 The generic module Wireless AT is designed as far as possible hardware independent and implemented as autonomous library The library is executable on the following processors e ATmegai28RFA1 e ATmega256RFR2 www dresden elektronik de Page 6 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 2 Glossary 6LOWPAN IPv6 over Low Power Wireless Personal Area Networks DC Pi Coordinator FFD device which routes packets and ca
91. platform see Section 3 1 is either supplied pre flashed from dresden elektronik or the firmware is provided for download the user has to flash the firmware himself See 3 for a detailed description of firmware programming The communication is executed via USB or UART with the Wireless AT firmware version for the corresponding platform An overview of the provided versions is given in Table 2 they are used in Section 7 After that the module on platform is connected to a host device a PC MCU etc using a USB or UART interface Additionally the module on platform hast to be connected to the power supply e USB Power is supplied to the module via USB An additional extern power supply could be connected if required power consumption e UART An additional extern power supply is mandatory it is realized via the 6 pin debug header X5 of the deRFnode 2TNP2 board see Section 6 in 5 www dresden elektronik de Page 12 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 4 1 UART connection Figure 3 UART connection To start communication the host device configures its serial port with default Wireless AT parameters the host has to use the same parameter settings Table 4 Default Wireless AT parameters Parity Flow control Note These parameters can be modified for a Wireless AT device and saved in persistent memory NVRAM using the corresponding commands described in Section 6
92. ransmits result codes 1 Result codes are suppressed and not transmitted If value is omitted 0 is implied Result codes Nothing will be received for the ATQ1 command OK if value is 0 otherwise the module returns ERROR a OK www dresden elektronik de Page 65 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 8 6 V Response format Table 78 V Response format V lt value gt This parameter defines the contents of the header and trailer transmitted with result codes and information responses It also determines whether result codes are transmitted in numeric alphabetic or verbose form The text portion of information responses is not affected by this setting A result code shows the effect of the setting of this parameter on the format of information text and result codes If value is omitted 0 is implied Result codes fo If value is 0 because numeric response text is being used ox vane 400 For unsupported values if previous value was 0 ERROR For unsupported values if previous value was 1 Example ATV1 OK ATVO 0 0 will be output on the same line because lt LF gt is not used for formatting of the result code value 1 verbose format value is stored in the NVRAM Coordinator router end device Table 74 summarizes the usage of response formats All references to lt CR gt mean the character ASCII coded specified in parameter S3 see Table 73 like
93. red trademarks or trademarks of Atmel Corporation or its subsidiaries e Windows and others are registered trademarks or trademarks of Microsoft Corporation in U S and or other countries All trademarks are registered by their respective owners in certain countries only Other brands and their products are trademarks or registered trademarks of their respective holders and should be noted as such Disclaimer This note is provided as is and is subject to change without notice Except to the extent prohibited by law dresden elektronik ingenieurtechnik gmbh makes no express or implied warranty of any kind with regard to this guide and specifically disclaims the implied warranties and conditions of merchantability and fitness for a particular purpose dresden elektronik ingenieurtechnik gmbh shall not be liable for any errors or incidental or consequential damage in connection with the furnishing performance or use of this guide No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or any means electronic or mechanical including photocopying and recording for any purpose other than the purchasers personal use without the written permission of dresden elektronik ingenieurtechnik gmbh Copyright 2014 dresden elektronik ingenieurtechnik gmbh All rights reserved www dresden elektronik de Page 91 of 91
94. registers ccccceessssseceeeeeeeeeeseseaeeeeeeeeeeeeeesaaaees 74 6 10 Remote Manageme il 2 2 103 stent te Scie e een eeuieigusaaithe 75 6 10 1 WPASSWORD Set a paSSWOMd cccceeeeeeeeeeeeeeeeeeeeeeeeeeeenaaees 76 6 10 2 R Remote execution of AT command cccceeetteeeeetteeeeeeeeeeeetetaees 76 Ts Pi ASSIQWINOIUNS wiscirasotatccesetiacsanacanctetelanceigaanecuaecdnciaeelatesunupe teiueedeaasseepurenumeiesadsepoieeaneie 78 7 1 deRFmegai28 and deRFmega256 modules ccccccceeeeeeeeeeeeeteeeeeeeeeeteeeenaaees 79 7 1 1 SUNOCO cascades pecestc ca ces neice ona tach terete esate cetacean ueseaenctes 79 7 1 2 With power amplifier and antenna diversity plain cceeeeeeeeeeeees 80 7 1 3 Standard on deRFbreakout Board eceeeeeeeeeeee eee eeeeceneeeeeeeeeeeeeeeaaees 81 7 1 4 With power amplifier and antenna diversity on deRFbreakout Board 81 7 1 5 Standard on deRFnode for AVR sissivcsetiveccastsstererecarecersssiecenciwtesenesvaweencess 82 7 1 6 With power amplifier and antenna diversity on deRFnode for AVR 83 7 1 7 Standard on deRFtoRCB Adapter cccccceeeeeeeeeeeeeeeeeneeeeeeeeeeeeeeenaees 84 7 1 8 With power amplifier and antenna diversity on deRFtoRCB Adapter 84 7 1 9 Standard on deRFtoRCB Adapter and RCB Breakout Board 85 7 1 10 With power amplifier and antenna diversity on deRFtoRCB Adapter and RGB Breakout B
95. ren nodes are returned as 64 bit hexadecimal numbers if the S30 register is set to 0 The short NWk addresses of children nodes are returned if the S30 register is set to 1 See Table 46 for details The children addresses returned are delimited by commas Notes 1 An end device is removed from the children list if the parent node receives no poll requests from the child during 3 sleep_interval sync_period time interval as configured on the parent device by WPWR and WSYNCPRD commands This command does not cause network operations and just returns copies of the children addresses stored in the parent memory Result codes OK is returned if the module is in the network even though there is no child connected yet ERROR will be returned if the device is not in the connected state or has an end device node role Example AT WCHILDREN WCHILDREN 012345678 9ABCDEF 12345678 9ABCDEFO OK 6 3 6 WNBSIZE Get number of neighbors Table 44 WNBSIZE Get number of neighbors WNBSIZE7 The command requests a number of entries in node s neighbor table Returned result consists of two values the first is the current number of occupied entries in node s neighbor table the second is the maximum possible number of entries size of the neighbor table Result codes OK is returned if the node is in the network If the device is not in the connected state ERROR will be returned E Example AT WNBSIZE
96. ress Table 37 WSRC Set Get short NWK address WSRC lt value gt The command assigns the device short network address value is a 16 bit hexadecimal number that will be used by the device for communication in the network It shall be unique within the network There are two approaches for the short address assignment Stochastic addressing is applied if value is set to FFFF when the device is not in the network In such case short address is assigned randomly by the stack when the device joins the network The stack also automatically resolves all possible address conflicts After network join this parameter contains the current short address of the node but after leaving the network the wSRC value is reset to FFFF Hence the node can get a new short address assigned during the next network join Static addressing is applied if value is set to non FFFF prior to network join After joining the network the device will use the assigned value as its short address Moreover after leaving the network the wSRC_ value will be kept and reused during the next network join attempt unless explicitly overwritten with another value If static addressing is used the user is responsible for ensuring that the node s short address is unique within the network All nodes across the network shall use the same addressing mode Notes 1 The command is not accessible when the node is joined to a network 2 The coordinator node shall a
97. rmat of this response is described in the definition of the parameter Generally the response string begins with lt command gt followed by the character and the values represented in the same form in which they would be generated by the host in a parameter set command If multiple values are supported they will generally be separated by commas as in a parameter set command For example Table 24 Example of parameter read command syntax Command Response Comment AT WRETRY Request for parameter WRETRY WRETRY 3 Returned value Result code 6 1 9 Parameter test command syntax Table 25 Parameter test command syntax Command AT syntax If the module does not recognize the indicated lt command gt it returns the ERROR result code and terminates processing of the command line If the module does recognize the parameter name it returns an information text response to the host followed by the OK result code The information text response will indicate the values supported by the module for each of the sub parameters and possibly additional information The format of this information text response is defined for each parameter See Section 6 1 12 for the general formats for the specification of sets and ranges of numeric values Generally an information text response starts with a lt command gt followed by the character When an action parameter accepts a single numeric sub parameter or the parameter accepts
98. rns the network key configuration on the node WNETKEY The command requests the range of valid values for the network key www dresden elektronik de Page 48 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Result codes OK is returned if val64bitO and val64bit1 are in range otherwise ERROR is returned Example AT WNETKEY CCCCCCCCCCCCCCCC BBBBBBBBBBBBBBBB OK AT WNETKEY WNETKEY CCCCCCCCCCCCCCCC BBBBBBBBBBBBBBBB OK AT WNETKEY WNETKEY 0000000000000000 FFFFFFFFFFFFFFFF 0000000000000000 FFFFFFFFFFFFFFFF OK Default value 0000000000000000 0000000000000000 Persistence val64bit0 and val64bitl1 are stored in the NVRAM Node types Coordinator router end device Supported stack ZigBee Note only available on deRFmega256 based platforms 6 4 4 WTCADDR Set Get Trust Center address Table 52 WTCADDR Set Get Trust Center address WTCADDR lt value gt The command assigns the trust center extended address value is a 64 bit hexadecimal number that defines the extended address of the trust center node in the network The trust center itself shall set it to its own extended address The value shall be config ured on the device prior to network join If the device cannot know the TC address in advance it can use a FFFFFFFFFFFFFA value instead In this case the device considers the first node replying with the transport key
99. s Example to enable PWM channel 0 ATS140 1 Set PWM frequency on channel 0 to 20 kHz ATS143 2 Set PWM duty cycle on channel 0 to 50 ATS146 50 ADC To operate the ADC a single commands is available to read the current A D conversion value see Section 6 9 4 for details Note Use the appropriate parameter Sxxx for configuration see Section 6 9 3 for details Example to enable conversion on pin ADO ats100 01 Read current AD value from AD channel 0 ats101 For completeness the tables list e The according port pin of the microcontroller in the column Port and e The according module and board pin in the columns Module and Board e Depending on the platform some pins are already connected to LEDs buttons or analog inputs like LED1 or VBat Those will be given in the column Board www dresden elektronik de Page 78 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 7 1 deRFmega128 and deRFmega256 modules 7 1 1 Standard plain The term plain means the board is used without any development board Controller ATmega128RFA1 or ATmega256RFR2 Firmware name ATmega128RFA1 wATZ_for_ deRFmegai28 STD UARTO_V1_02 Firmware name ATmega256RFR2 wATZ_for_ deRFmega256 STD UARTO_V1_02 Fuse settings See Section 7 2 Interface UARTO for rns rwwo e Pina GPIOO D7 Pwe e6 Pint eos 60 Pins PWN AD Module k LGA Pad LGA Pad ode Boara Voue Boar pwn Be Pea 25 ar
100. s the parameter usage see Table 78 for details value may be specified in the range of 0 127 Note It is strongly recommended to avoid changing this parameter during network operation Page 63 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 S4 The command requests the actual ASCII code currently used as the response formatting character Result codes The module returns OK if value isin the allowed range and ERROR otherwise Note The changed value of S4 will be used to format the result code and information responses immediately after processing the S4 lt value gt command If the value of s4 is changed in a command line the result code issued in response to that command line will be formatted using the new value of 4 Example ATS4 10 OK ATS4 ar 6 8 3 S5 Command editing character Table 75 S5 Command editing character Syntax Explanation S5 lt value gt The command sets the ASCII code used as the control character to delete the immediately preceding character in the command line see Section 6 1 3 Basic command line operations value may be specified in the range of 0 127 Note It is strongly recommended not to set this parameter to any letter or other symbol that can be a part of a command For example setting it to letter A either upper or lowercase ASCII code 65 or 97 would effectively prevent the entering of any subsequent AT command The
101. s usually only have information about the TC s extended address WTCADDR In such a configuration when a new device tries to enter the network a special message is propagated to the TC informing it about the joining device Then the TC replies with the transport key command that contains the current network key However to allow the joining device to understand this command it is delivered over the last www dresden elektronik de Page 46 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 hop in an un encrypted frame The joining device accepts the key if the sender address of the received transport key command matches its pre configured TC s extended address and rejects the key if the addresses don t match After the key is accepted the device is authenticated and starts exchanging data using the received network key A secured join completely eliminates the un encrypted key transmission performed in an unsecured join For a secured join nodes shall have WSECSTATUS set to 0 and be pre configured with the network key WNETKEY command prior to a network join attempt The WTCADDR setting is required on the joining device only if it has wPANID set to 0 and WSRC set to FFFF stochastic addressing In such a configuration the device expects a transport key command from the TC as in an unsecured join But in this case the command payload contains zeros and hence doesn t reveal the secret network key
102. t networking status Means the node is in the network Set three second timeout to wait for input and send HELLO to the node with short address 10 Simultaneously HELLO will appear on the terminal connected to the router in the form of a DATA event Table 11 Verify networking status on the router terminal Command response Comment DATA 0000 0 5 HELLO Data five bytes came from the device with address 0 by unicast request www dresden elektronik de Page 22 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 5 4 3 Remote execution The ATR command provides a mechanism for AT command execution on a remote node with command response redirection to the originator Thus it allows remote monitoring and configuration over the air Wireless AT command ATR address cmd RF transmission Command Host de radio module 1 Command m de radio module 2 D LT Response Response owe vee oe OK Y Execution Radio modules are the most common usage but command execution can be run on any supported platform Figure 9 Remote AT command execution The example below demonstrates how to execute remote AT commands on any device from a single host using the ATR command Table 12 Remote execution of AT commands ATR10 0 WROLE GSN Get node role and extended address from the router WROLE 1 GSN 00212EFFFFO00056E OK ATR10 0 GMI Get model number from the router GMI dresde
103. t security status WNETKEY Set get network encryption key WTCADDR Set get trust center address Data transmission Send data to a specific node Send binary data to a specific node Send broadcast data Send S register value to a specific node Ping the node Indirect poll rate Data delivery timeout Repetition count Data transmission waiting timeout WPING WSYNCPRD WTIMEOUT WRETRY WWAIT Power management WPWR End device sleep parameters WSLEEP WTXPWR TX power level Generic control Z SC SC d Warmest tsi isCid amp H i iC MIC Cd values Display product identification information www dresden elektronik de Page 17 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 GMI or I1 Request manufacturer identification GMM or I2 Request model identification GMR or I3 Request hardware software revision CRE identification amp F Set to factory defined configuration Host interface commands s3 Termination character 4 Response formatting character 5 Command editing character E Commandecho Q o x E ps m x X _ x X ae ea m x EEE i ps ps m Serial port communication rate aD BTR behavior eE s0 Request the latest resut code cRE 2 o Hardware control 128 sala Pete una 138 S100 AD configuration c z 100 xix x A D CRE Z 101 X 104 140 S141 8142 PWM configuratio
104. the ERROR result code is generated Immediately following that number either a or character hex codes 0x3F or 0x3D respectively should appear is used to read the current value of the indicated S parameter is used to set the S parameter to a new value www dresden elektronik de Page 31 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Table 28 S registers Reading the S register S lt parameter number gt Setting the S register S lt parameter number gt lt value gt If the character is used the new value to be stored in the S parameter is specified in decimal form following the character If no value is given that is the end of the command line occurs or the next command follows immediately the corresponding S parameter will be set to 0 The ranges of acceptable values are given in the description of each S register S registers gives functional representation of S registers associated to the commands 6 1 11 Device responses There are two types of responses that may be generated by the module e Information responses e Result codes Basically any information response consists of three parts header text and trailer The characters generated in the header are determined by the user s setting see V command Table 78 The trailer consists of two characters namely the ordinal value of parameter s3 followed by the ordinal value of parameter s4 Information text may
105. the originating node in the same form as if they were returned over a serial interface Remote execution service is protected by a 32 bit password that can be set during node installation or manufacturing Remote management function is an important tool that allows the organization of commissioning procedures on a PC using commercial off the shelf terminal software www dresden elektronik de Page 75 of 91 User Manual Version 1 2 2014 10 24 Wireless AT for deRFmodules 6 10 1 WPASSWORD Set a password Table 94 WPASSWORD Set a password WPASSWORD lt psw gt Result codes codes Example Default value value CE Explanation The command sets a new password for the remote management command The password is in form of a 32 bit hexadecimal number Note This command is not to be confused with the parameter set commands Unlike those it does not include the symbol Result codes fox is oK is always returned 0 oK is always returned 0 AT WPASSWORD 65432178 OK ooo psw value is stored in the NVRAM Note The password cannot be reloaded with a default value through the F command see Table 72 but it can be rewritten over the air using the remote execution AT command see Table 95 Node types Coordinator router end device 6 10 2 R Remote execution of AT command Table 95 R Remote execution of AT command R lt addr gt lt psw gt lt cmd gt
106. then plugged into an deRFtoRCB adapter and connected to an sensor terminal board The network type is ZigBee and the firmware version 1 00 WAT X_for_ deRFmegaXXX XXXXX XXXXXXX XXX XXXX_ VX_XX Firmware version Interface Board Adapter Special features MCU Stack name Application name The table below lists the different options and their meaning According to this scheme all firmware names as used in Section 7 are constructed Table 2 Wireless AT firmware name options Z_for_ Stack name ZigBee or wAT6 6lowPAN wWATM MAC stack _deRFmega256 deRFmega128 we mene PADIV Special PA Power eae DIV Antenna Diversity PADIV Power Amplifier and Antenna Diversity STD Standard RFtoRCB deRFtoRCB adapter for deRFmega modules STB Board BB deRFbreakout Board or RCB Breakout Board NODE deRFnode ee STB Sensor Terminal Board Most of the Wireless AT commands are hardware independent and can be executed on all supported platforms However a few commands either exhibit platform specific behavior or www dresden elektronik de Page 10 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 are supported on particular hardware platforms only For such cases command descriptions given in the Section 6 provide corresponding differences in the command functionality for various platforms If no reference to a platform is given in a c
107. ular command Table 27 Example of parameter test command syntax AT WSRC Request for valid range of the short address WSRC 0000 FFF7 Returned value When an action parameter accepts more than one sub parameter or the parameter accepts more than one value the set of supported values may be presented as a list of the parenthetically enclosed value range strings separated by commas For example the information text in response to testing an action that accepts three sub parameters and supports various ranges for each of them could appear as follows 0 1 3 0 4 6 9 11 12 This indicates that the first sub parameter accepts only the 0 value the second accepts any value from 1 through 3 inclusively and the third sub parameter accepts any of the values 0 A 5 6 9 11 or 12 6 1 10 S registers S registers represent a group of numerical parameters that can be addressed in a special syntax Each S register has its own address and value Some S registers are standardized by the V 250 recommendations and are used in the module Some of the S registers are non standard defined specifically by the Wireless AT software AT commands that begin with the s character are allowed for S register access These differ from other AT commands in some respects The number following the S character indicates the referenced register number If the number is not recognized as a valid register number register is omitted
108. umber of parameters Parameter value s is out of range example AT IFC 12 34 Unspecified error Requested value cannot be read example WLQI command for nonexistent link Operation is not permitted in current state example setting PAN ID in the connected state or WSLEEP for router Operation cannot be completed due to networking problems example connection loss Data transmission error Example AT WROLE 0 WPWR 30 30 ERROR ATSO 6 Setting WPWR is not permitted for a coordinator OK AT ABCD ERROR Syntax error ATSO 1 OK AT IFC 12 34 ERROR Parameter is out of range ATSO 3 OK Node types Coordinator router end device www dresden elektronik de Page 69 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 9 Hardware control AT commands described in this section provide control over hardware functionality such as GPIO A D conversion and PWM 6 9 1 GPIO configuration Table 85 GPIO configuration Explanation S lt reg gt lt value gt Command selects the configuration of particular GPIO pins reg corresponds to the GPIO pins GPIOO GPIO8 on the module and it is in the range of 120 128 Input pin no internal pull up Input pin internal pull up is turned on Tri state Output Note Use of internal pull up improves noise immunity but also results in increased power consumption The command requests the actual GPIO pin configuration
109. umeric values as defined in the description of the action or parameter command The comma character hex code 0x2C is included as a separator before the second and all subsequent values in the compound value If a value is not specified as missed that is defaults assumed the required comma separator should be specified however trailing comma characters may be omitted if all the associated values are also omitted Note When any of optional parameters is misused in a command the command would be performed as if the parameter was omitted That parameter would be further treated as if the other subsequent command were input probably causing an ERROR message To avoid confusion follow the command syntax Actions may have more than one associated sub parameter and parameters may have more than one value These are known as compound values and their treatment is the same in both the action command syntax and the parameter command syntax www dresden elektronik de Page 27 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Each value may be either a decimal or hexadecimal number The choice depends on whether or not a particular command and hexadecimal number is preceded with 0x Hexadecimal numbers can represent 16 bit 32 bit 64 bit and 128 bit values Decimal numeric constants consist of a sequence of one or more of the characters 0 hex code 0x30 through 9 hex code 0x39 inclusive and can be preceded
110. unktechnik products boards and kits development boards derfgateway description eID dam_frontend_push amp docID 693 6 General Structure of Signals of International Alphabet No 5 Code for Character Oriented Data Transmission over Public Telephone Networks ITU T Recommendation V 4 http www itu int rec T REC V 4 19881 1 l en 7 international Reference Alphabet IRA Formerly International Alphabet No 5 or 1A5 Information Technology 7 Bit Coded Character Set for Information Interchange CCIT Recommendation T 50 09 92 http www itu int rec T REC T 50 199209 l en 8 Atmel AVR2050 Atmel BitCloud Developer Guide http www atmel com Images Atmel 81 99 BitCloud Developer Guide_User Guide_AVR2050 pdf 9 ZigBee PRO Specification Document 053474r17 October 2007 http www zigbee org 10 dresden elektronik deRFusb Driver package http www dresden elektronik de funktechnik service download driver L 1 www dresden elektronik de Page 90 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 dresden elektronik ingenieurtechnik gmbh Enno Heidebroek StraBe 12 01237 Dresden GERMANY Phone 49 351 31850 0 Fax 49 351 31850 10 Email wireless dresden elektronik de Trademarks and acknowledgements e 802 15 4 is a trademark of the Institute of Electrical and Electronics Engineers IEEE e ZigBee is a registered trademark of the ZigBee Alliance e Atmel Atmel logo and Bitcloud are registe
111. urned only after such acknowledgement frame is received If no acknowledgement is received after WRETRY transmission attempts then ERROR is returned as a result code for the DB command If an acknowledgement is not requested arq is set to 0 then OK is returned just upon successful data transmission over the first hop There is no guarantee on frame delivery to the final destination If first hop transmission cannot be performed channel busy route unknown etc or if the sending node is not in the network ERROR is returned ATDB 12 1 5 97CA2 Send 97CA2 to the node with address OK 12 using ARQ ATDB 12 0 97CA2 The same as above but without using ae ARQ and with the node waiting for timeout expiration before sending data Coordinator router end device Page 52 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 5 4 DU Send broadcast data Table 55 DU Send broadcast data Explanation DU lt length gt The command sends data using broadcast transmission neces The length parameter specifies the length in bytes of the data portion to be sent It shall not exceed the maximum allowable number 95 bytes for an un encrypted frame and 77 bytes for an encrypted frame If the length parameter is omitted the maximum possible value is implied by default Data transmission starts either when the specified number of data bytes is received over the serial interface or when th
112. will be specified in the command definition Note that the module may insert intermediate lt cR gt characters in very long information text responses in order to avoid overflow in the host receive buffers If intermediate lt CR gt characters are included the module does not include the character sequences 0 lt CR gt 0x30 0x0D or OK lt CR gt 0x4F 0x4B 0x0D so that the host can avoid false detection of the end of these information text responses 6 2 Networking parameters This section describes Wireless AT commands associated with networking parameters Most of the parameters shall be set on each device according to the desired network characteristics prior to executing the network start join procedure Note that if the default setting or persistent value from the NVRAM see Parameter persistence Section 5 1 1 already has the desired value for a network parameter there is no need to assign it explicitly again prior to the network start join There are also a number of hard coded parameters that cannot be changed by AT commands but which have direct impact on possible network topology and performance Table 29 lists such parameters and provides their values in Wireless AT firmware with and without security support Table 29 Values of ConfigServer parameters applied in Wireless AT firmware CS_NEIB_TABLE_SIZE 40 40 CS_MAX_CHILDREN_AMOUNT CS_MAX_CHILDREN_ROUTER_AMOUNT CS_ROUTE_TABLE_SIZE CS_MAX_NETWORK_DEPTH
113. wise all references to lt LF gt mean the character ASCII coded specified in parameter S4 see Table 74 Numeric and verbose codes are discussed in Section 5 1 1 Parameter persistence Table 79 Response formatting Value ee Information responses lt text gt lt CR gt lt LF gt lt CR gt lt LF gt lt text gt lt CR gt lt LF gt Result codes lt numeric code gt lt cR gt lt CR gt lt LF gt lt verbose code gt lt CR gt lt LF gt www dresden elektronik de Page 66 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 6 8 7 X Result code selection Table 80 X Result code selection X lt value gt This parameter defines whether the module transmits particular result codes see Section 5 2 Result codes to the host or not 0 All result codes are sent to the host 1 EVENT result codes are not sent 2 EVENT and DATA result codes are not sent If value is omitted 0 is implied OK if value is from valid range Otherwise ERROR is returned Example Disable events and data indications OK Default value 1 all result codes will be sent excluding EVENT value is stored in the NVRAM Node types Coordinator router end device 6 8 8 IPR Serial port communication rate Table 81 IPR Serial port communication rate I PR lt value gt The command specifies the data rate at which the DCE will accept commands and respond At minimum 1200b s and 9600b s are supported
114. xchange and remote control 4 2 USB connection Figure 5 USB connection If you connect e g the deRFnode 2TNP2 for the first time to the PC you are requested to install the required USB device drivers All necessary files can be found on the dresden elektronik website Download the deRFusb Driver package from 10 and extract the file to a temporary folder Point to it when asked for www dresden elektronik de Page 14 of 91 User Manual Version 1 2 Wireless AT for deRFmodules 2014 10 24 Driver installation under Windows XP Connect your board to the PC Windows asks if it should connect to Windows Update to find a suitable driver Select No not this time and continue with Next gt Found New Hardware Wizard Welcome to the Found New D Hardware Wizard Windows will search for current and updated software by looking on your computer on the hardware installation CD or on the Windows Update Web site with your permission Read our privacy policy Can Windows connect to Windows Update to search for software Yes this time only Yes now and every time connect a device Click Next to continue lt Back Cancel Figure 6 Installation wizard 1 The next step is to manually choose the directory where the driver files are located To do so select Install from a list or specific location Advanced Found New Hardware Wizard This wizard helps you install software
Download Pdf Manuals
Related Search
Related Contents
soundBlade_HD_20_Rea.. EUROPOWER PMH518M Bleu vers le plafond. Orange pour l`injection. Copyright © All rights reserved.
Failed to retrieve file