2 * Copyright (c) 2011, Olivier MATZ <zer0@droids-corp.org>
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the University of California, Berkeley nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 #include <aversive/pgmspace.h>
34 #include "xbee_atcmd.h"
36 prog_char atcmd0_name[] = "WR";
37 prog_char atcmd0_desc[] = "write-param";
38 prog_char atcmd0_help[] =
39 "Write parameter values to non-volatile memory.";
41 prog_char atcmd1_name[] = "RE";
42 prog_char atcmd1_desc[] = "restore-defaults";
43 prog_char atcmd1_help[] =
44 "Restore module parameters to factory defaults.";
46 prog_char atcmd2_name[] = "FR";
47 prog_char atcmd2_desc[] = "soft-reset";
48 prog_char atcmd2_help[] =
49 "Software Reset. Responds with 'OK' then performs a "
52 prog_char atcmd3_name[] = "AC";
53 prog_char atcmd3_desc[] = "apply-changes";
54 prog_char atcmd3_help[] =
55 "Apply Changes without exiting command mode.";
57 prog_char atcmd4_name[] = "R1";
58 prog_char atcmd4_desc[] = "restore-compiled";
59 prog_char atcmd4_help[] =
60 "Restore module parameters to compiled defaults.";
62 prog_char atcmd5_name[] = "VL";
63 prog_char atcmd5_desc[] = "version-long";
64 prog_char atcmd5_help[] =
65 "Shows detailed version information including"
66 "application build date and time.";
68 prog_char atcmd6_name[] = "DH";
69 prog_char atcmd6_desc[] = "dst-addr-high";
70 prog_char atcmd6_help[] =
71 "Upper 32 bits of the 64-bit destination address (0 "
72 "to 0xFFFFFFFF, default is 0x0000FFFF).";
74 prog_char atcmd7_name[] = "DL";
75 prog_char atcmd7_desc[] = "dst-addr-low";
76 prog_char atcmd7_help[] =
77 "Lower 32 bits of the 64-bit destination address (0 "
78 "to 0xFFFFFFFF, default is 0x0000FFFF).";
80 prog_char atcmd8_name[] = "DD";
81 prog_char atcmd8_desc[] = "device-type-id";
82 prog_char atcmd8_help[] =
83 "Device Type Identifier, it can be used to differentiate "
84 "multiple XBee-based products (0 to 0xFFFFFFFF, read-only, "
85 "default is 0x40000).";
87 prog_char atcmd9_name[] = "SH";
88 prog_char atcmd9_desc[] = "src-addr-high";
89 prog_char atcmd9_help[] =
90 "Upper 32 bits of the 64-bit source address (read-only).";
92 prog_char atcmd10_name[] = "SL";
93 prog_char atcmd10_desc[] = "src-addr-low";
94 prog_char atcmd10_help[] =
95 "Lower 32 bits of the 64-bit source address (read-only).";
97 prog_char atcmd11_name[] = "SE";
98 prog_char atcmd11_desc[] = "src-endpoint";
99 prog_char atcmd11_help[] =
100 "The application source endpoint for all data transmissions "
101 "(0 to 0xFF, default is 0xE8).";
103 prog_char atcmd12_name[] = "DE";
104 prog_char atcmd12_desc[] = "dst-endpoint";
105 prog_char atcmd12_help[] =
106 "The application destination endpoint for all data "
107 "transmissions (0 to 0xFF, default is 0xE8).";
109 prog_char atcmd13_name[] = "CI";
110 prog_char atcmd13_desc[] = "cluster-id";
111 prog_char atcmd13_help[] =
112 "Cluster Identifier for all data transmissions (0 to 0xFFFF, "
115 prog_char atcmd14_name[] = "NP";
116 prog_char atcmd14_desc[] = "max-rf-payload";
117 prog_char atcmd14_help[] =
118 "Maximum RF Payload Bytes that can be sent in a unicast "
119 "transmission based on the current configuration (0 to "
122 prog_char atcmd15_name[] = "CE";
123 prog_char atcmd15_desc[] = "coord-end-device";
124 prog_char atcmd15_help[] =
125 "Coordinator/End Device, messaging mode of the module "
126 "(0 - Normal, 1 - Indirect coordinator, 2 - Polling, default "
129 prog_char atcmd16_name[] = "AP";
130 prog_char atcmd16_desc[] = "api-mode";
131 prog_char atcmd16_help[] =
132 "API mode (0 - off, 1 - on, 2 - on with escape sequences).";
134 prog_char atcmd17_name[] = "AO";
135 prog_char atcmd17_desc[] = "api-output-format";
136 prog_char atcmd17_help[] =
137 "API Output Format (0 - standard [0x90 for RX], 1 - explicit "
138 "addressing [0x91 for RX]).";
140 prog_char atcmd18_name[] = "BD";
141 prog_char atcmd18_desc[] = "baud-rate";
142 prog_char atcmd18_help[] =
143 "Baud rate of serial interface (0-8 select preset standard "
144 "rates, and 0x39 to 0x1c9c38 select baud rate).";
146 prog_char atcmd19_name[] = "RO";
147 prog_char atcmd19_desc[] = "packetization-timeout";
148 prog_char atcmd19_help[] =
149 "Packetization Timeout: the inter-character silence required "
150 "before packetization specified in character times (0 to 0xFF, "
153 prog_char atcmd20_name[] = "FT";
154 prog_char atcmd20_desc[] = "flow-control-thres";
155 prog_char atcmd20_help[] =
156 "Flow Control Threshhold. De-assert CTS and/or send XOFF when "
157 "FT bytes are in the UART receive buffer. Re-assert CTS when "
158 "less than FT - 16 bytes are in the UART receive buffer (0x11 "
159 "to 0xEE, default is 0xBE).";
161 prog_char atcmd21_name[] = "NB";
162 prog_char atcmd21_desc[] = "parity";
163 prog_char atcmd21_help[] =
164 "Parity (0 - no parity, 1 - even parity, 2 - odd parity, 3 - "
165 "forced high parity, 4 - forced low parity). Default is 0.";
167 prog_char atcmd22_name[] = "D7";
168 prog_char atcmd22_desc[] = "dio7";
169 prog_char atcmd22_help[] =
170 "DIO7 Configuration (0 - unmonitored input, 1 - CTS, 3 - "
171 "digital input, 4 - digital output low, 5 - digital output "
172 "high, 6 - RS-485 low Tx, 7 - RS-485 high Tx). Default is "
175 prog_char atcmd23_name[] = "D6";
176 prog_char atcmd23_desc[] = "dio6";
177 prog_char atcmd23_help[] =
178 "DIO6 Configuration (0 - unmonitored input, 1 - RTS, 3 - "
179 "digital input, 4 - digital output low, 5 - digital output "
180 "high). Default is 0.";
182 prog_char atcmd24_name[] = "P0";
183 prog_char atcmd24_desc[] = "dio10-pwm0";
184 prog_char atcmd24_help[] =
185 "DIO10/PWM0 Configuration. (0 - unmonitored input, 1 - RSSI, 2 "
186 "- PWM0, 3 - digital input, 4 - digital output low, 5 - "
187 "digital output high). Default is 1.";
189 prog_char atcmd25_name[] = "P1";
190 prog_char atcmd25_desc[] = "dio11-pwm1";
191 prog_char atcmd25_help[] =
192 "DIO11/PWM1 Configuration. (0 - unmonitored input, 2 "
193 "- PWM1, 3 - digital input, 4 - digital output low, 5 - "
194 "digital output high). Default is 0.";
196 prog_char atcmd26_name[] = "P2";
197 prog_char atcmd26_desc[] = "dio12";
198 prog_char atcmd26_help[] =
199 "DIO12 Configuration. (0 - unmonitored input, "
200 "3 - digital input, 4 - digital output low, 5 - "
201 "digital output high). Default is 0.";
203 prog_char atcmd27_name[] = "RP";
204 prog_char atcmd27_desc[] = "rssi-pwm";
205 prog_char atcmd27_help[] =
206 "Time RSSI signal will be output after last transmission. "
207 "When RP[] = 0xFF, output will always be on (0 - 0xFF, default "
208 "is 0x28[] = 4 seconds).";
210 prog_char atcmd28_name[] = "1S";
211 prog_char atcmd28_desc[] = "sensor-sample";
212 prog_char atcmd28_help[] =
213 "Forces a sample to be taken on an XBee Sensor device.";
215 prog_char atcmd29_name[] = "D0";
216 prog_char atcmd29_desc[] = "dio0-ad0";
217 prog_char atcmd29_help[] =
218 "AD0/DIO0 Configuration. (0 - unmonitored input, 1 - "
219 "commission button enabled, 2 - analog input, 3 - digital "
220 "input, 4 - digital output low, 5 - digital output high). "
223 prog_char atcmd30_name[] = "D1";
224 prog_char atcmd30_desc[] = "dio1-ad1";
225 prog_char atcmd30_help[] =
226 "AD1/DIO1 Configuration. (0 - unmonitored input, "
227 "2 - analog input, 3 - digital input, 4 - digital output "
228 "low, 5 - digital output high). Default is 0.";
230 prog_char atcmd31_name[] = "D2";
231 prog_char atcmd31_desc[] = "dio2-ad2";
232 prog_char atcmd31_help[] =
233 "AD2/DIO2 Configuration. (0 - unmonitored input, "
234 "2 - analog input, 3 - digital input, 4 - digital output "
235 "low, 5 - digital output high). Default is 0.";
237 prog_char atcmd32_name[] = "D3";
238 prog_char atcmd32_desc[] = "dio3-ad3";
239 prog_char atcmd32_help[] =
240 "AD3/DIO3 Configuration. (0 - unmonitored input, "
241 "2 - analog input, 3 - digital input, 4 - digital output "
242 "low, 5 - digital output high). Default is 0.";
244 prog_char atcmd33_name[] = "D4";
245 prog_char atcmd33_desc[] = "dio4-ad4";
246 prog_char atcmd33_help[] =
247 "AD4/DIO4 Configuration. (0 - unmonitored input, "
248 "2 - analog input, 3 - digital input, 4 - digital output "
249 "low, 5 - digital output high). Default is 0.";
251 prog_char atcmd34_name[] = "D5";
252 prog_char atcmd34_desc[] = "dio5-ad5";
253 prog_char atcmd34_help[] =
254 "AD4/DIO4 Configuration. (0 - unmonitored input, 1 - LED, "
255 "2 - analog input, 3 - digital input, 4 - digital output "
256 "low, 5 - digital output high). Default is 1.";
258 prog_char atcmd35_name[] = "D8";
259 prog_char atcmd35_desc[] = "dio8-sleep-rq";
260 prog_char atcmd35_help[] =
261 "DIO8/SLEEP_RQ Configuration. (0 - unmonitored input, 1 - LED, "
262 "2 - analog input, 3 - digital input, 4 - digital output "
263 "low, 5 - digital output high). Default is 0. When used as "
264 "SLEEP_RQ, the D8 parameter should be configured in mode 0 "
267 prog_char atcmd36_name[] = "D9";
268 prog_char atcmd36_desc[] = "dio9-on-sleep";
269 prog_char atcmd36_help[] =
270 "DIO9/ON_SLEEP Configuration. (0 - unmonitored input, 1 - "
271 "ON/SLEEP, 2 - analog input, 3 - digital input, 4 - digital "
272 "output low, 5 - digital output high). Default is ?.";
274 prog_char atcmd37_name[] = "PR";
275 prog_char atcmd37_desc[] = "pull-up-resistor";
276 prog_char atcmd37_help[] =
277 "Pull-up Resistor. Bit field that configures the internal "
278 "pull-up resistors for the I/O lines (bit set = pull-up "
279 "enabled). Range is from 0 to 0x1FFF, default is 0x1FFF.";
281 prog_char atcmd38_name[] = "M0";
282 prog_char atcmd38_desc[] = "pwm0-out-level";
283 prog_char atcmd38_help[] =
284 "PWM0 Output Level. The line should be configured as a PWM "
285 "output using the P0 command (0 to 0x3FF, default is 0).";
287 prog_char atcmd39_name[] = "M1";
288 prog_char atcmd39_desc[] = "pwm1-out-level";
289 prog_char atcmd39_help[] =
290 "PWM1 Output Level. The line should be configured as a PWM "
291 "output using the P1 command (0 to 0x3FF, default is 0).";
293 prog_char atcmd40_name[] = "LT";
294 prog_char atcmd40_desc[] = "led-blink-time";
295 prog_char atcmd40_help[] =
296 "Associate LED Blink Time (should be enabled through D5 ";
298 prog_char atcmd41_name[] = "IS";
299 prog_char atcmd41_desc[] = "force-sample";
300 prog_char atcmd41_help[] =
301 "Forces a read of all enabled digital and "
302 "analog input lines.";
304 prog_char atcmd42_name[] = "IC";
305 prog_char atcmd42_desc[] = "digital-change-detect";
306 prog_char atcmd42_help[] =
307 "I/O Digital Change Detection. If a pin is enabled as a "
308 "digital input/output, the IC command can be used to "
309 "force an immediate I/O sample transmission when the DIO "
310 "state changes. IC is a bitmask, range is 0 to 0xFFFF, "
313 prog_char atcmd43_name[] = "IR";
314 prog_char atcmd43_desc[] = "io-sample-rate";
315 prog_char atcmd43_help[] =
316 "IO Sample Rate for periodic sampling. If zero, periodic "
317 "sampling is disabled. Else the value is in milliseconds "
318 "(range 0 to 0xFFFF, default is 0).";
320 prog_char atcmd44_name[] = "CB";
321 prog_char atcmd44_desc[] = "comissioning-button";
322 prog_char atcmd44_help[] =
323 "Commissioning Pushbutton, simulate commissioning button "
324 "in software. The parameter value should be set to the number "
325 "of button presses to be simulated (range is 0 to 4).";
327 prog_char atcmd45_name[] = "VR";
328 prog_char atcmd45_desc[] = "firmware-version";
329 prog_char atcmd45_help[] =
330 "Firmware version of the module (read only).";
332 prog_char atcmd46_name[] = "HV";
333 prog_char atcmd46_desc[] = "hardware-version";
334 prog_char atcmd46_help[] =
335 "Hardware version of the module (read only).";
337 prog_char atcmd47_name[] = "CK";
338 prog_char atcmd47_desc[] = "config-code";
339 prog_char atcmd47_help[] =
340 "Configuration Code, that can be used as a quick "
341 "check to determine if a node has been configured as "
342 "desired (read-only, 0-0xFFFFFFFF).";
344 prog_char atcmd48_name[] = "ER";
345 prog_char atcmd48_desc[] = "rf-errors";
346 prog_char atcmd48_help[] =
347 "Number of times a packet was received which contained errors "
348 "of some sort. Read-only, saturate at 0xFFFF.";
350 prog_char atcmd49_name[] = "GD";
351 prog_char atcmd49_desc[] = "good-packets";
352 prog_char atcmd49_help[] =
353 "Number of good received frames. Read-only, saturate at "
356 prog_char atcmd50_name[] = "RP";
357 prog_char atcmd50_desc[] = "rssi-pwm-timer";
358 prog_char atcmd50_help[] =
359 "RSSI PWM timer, the time in tenth of seconds that the RSSI "
360 "output indicating signal strength will remain active after "
361 "the last reception (1 to 0xff, default is 0x20 = 3.2 secs).";
363 prog_char atcmd51_name[] = "TR";
364 prog_char atcmd51_desc[] = "tx-errors";
365 prog_char atcmd51_help[] =
366 "Transmission Errors, the number of MAC frames that "
367 "exhaust MAC retries without ever receiving a MAC "
368 "acknowledgement message. Read-only, saturate at 0xFFFF.";
370 prog_char atcmd52_name[] = "TP";
371 prog_char atcmd52_desc[] = "temperature";
372 prog_char atcmd52_help[] =
373 "Temperature. Read module temperature in (tenths of ?) "
374 "Celsius. Negatives temperatures can be returned (read-only, "
375 "from 0xff74 [-140] to 0x0258 [600]).";
377 prog_char atcmd53_name[] = "DB";
378 prog_char atcmd53_desc[] = "rx-signal-strength";
379 prog_char atcmd53_help[] =
380 "Received Signal Strength of the last received RF data "
381 "packet measured in -dBm. For example if DB returns 0x60, "
382 "then the RSSI of the last packet received was -96dBm "
385 prog_char atcmd54_name[] = "DC";
386 prog_char atcmd54_desc[] = "duty-cycle";
387 prog_char atcmd54_help[] =
388 "Duty Cycle. Returns a current usage percentage of the "
389 "10% duty cycle measured over the period of 1 hour "
390 "(read-only, from 0 to 0x64).";
392 prog_char atcmd55_name[] = "RC";
393 prog_char atcmd55_desc[] = "rssi-for-channel";
394 prog_char atcmd55_help[] =
395 "Reads the dBm level (RSSI) of the designated "
398 prog_char atcmd56_name[] = "R#";
399 prog_char atcmd56_desc[] = "reset-number";
400 prog_char atcmd56_help[] =
401 "Tells the reason for the last module reset (0 - Power up "
402 "reset, 2 - Watchdog reset, 3 - Software reset, 4 - Reset "
403 "line reset, 5 - Brownout reset). Read-only.";
405 prog_char atcmd57_name[] = "TA";
406 prog_char atcmd57_desc[] = "tx-ack-errors";
407 prog_char atcmd57_help[] =
408 "Transmit Acknowlegement Errors. Incremented once for "
409 "each failed ack retry (read-only, from 0 to 0xFFFF).";
411 prog_char atcmd58_name[] = "%V";
412 prog_char atcmd58_desc[] = "supply-voltage";
413 prog_char atcmd58_help[] =
414 "Voltage on the Vcc pin in mV (read-only, from 0 to 0xF00).";
416 prog_char atcmd59_name[] = "CT";
417 prog_char atcmd59_desc[] = "cmd-mode-timeout";
418 prog_char atcmd59_help[] =
419 "Command Mode Timeout: the period of inactivity (no valid "
420 "commands received) after which the RF module automatically "
421 "exits AT Command Mode and returns to Idle Mode (2 to 0x1770, "
424 prog_char atcmd60_name[] = "CN";
425 prog_char atcmd60_desc[] = "exit-cmd-mode";
426 prog_char atcmd60_help[] =
427 "Exit Command Mode.";
429 prog_char atcmd61_name[] = "GT";
430 prog_char atcmd61_desc[] = "guard-times";
431 prog_char atcmd61_help[] =
432 "Guard Times: period of silence in ms before and after the "
433 "Command Sequence Characters of the AT Command Mode Sequence, "
434 "used to prevent inadvertent entrance into AT Command Mode "
435 "(0 to 0xFFFF, default is 0x3E8).";
437 prog_char atcmd62_name[] = "CC";
438 prog_char atcmd62_desc[] = "command-chars";
439 prog_char atcmd62_help[] =
440 "Command Character used between guard times of the AT Command "
441 "Mode Sequence (0 to 0xFF, default is 0x2B).";
443 prog_char atcmd63_name[] = "ID";
444 prog_char atcmd63_desc[] = "network-id";
445 prog_char atcmd63_help[] =
446 "Network ID. Nodes must have the same network identifier "
447 "to communicate (0 to 0x7FFF, default is 0x7FFF).";
449 prog_char atcmd64_name[] = "NT";
450 prog_char atcmd64_desc[] = "ndisc-timeout";
451 prog_char atcmd64_help[] =
452 "Node Discover Timeout, time in tenth of secs a node will "
453 "spend discovering other nodes when ND or DN is issued (0 "
454 "to 0xFC, default is 0x82).";
456 prog_char atcmd65_name[] = "NI";
457 prog_char atcmd65_desc[] = "node-id";
458 prog_char atcmd65_help[] =
459 "Node Identifier in printable ASCII characters. This string is "
460 "returned as part of the ATND (Network Discover) command. This "
461 "identifier is also used with the ATDN (Destination Node) "
462 "command. The string contains up to 20 byte ASCII string, "
463 "default is a space character.";
465 prog_char atcmd66_name[] = "DN";
466 prog_char atcmd66_desc[] = "disc-node";
467 prog_char atcmd66_help[] = /* XXX */
468 "Resolves a Node Identifier string to a physical address "
469 "(case sensitive). 0xFFFE and the 64bits extended address are "
472 prog_char atcmd67_name[] = "ND";
473 prog_char atcmd67_desc[] = "network-discover";
474 prog_char atcmd67_help[] = "Network Discovery, see doc"; /* XXX */
476 prog_char atcmd68_name[] = "NO";
477 prog_char atcmd68_desc[] = "ndisc-options";
478 prog_char atcmd68_help[] =
479 "Network Discovery Options, a bitfield value that changes the "
480 "behavior of the ND command (bit0 - Append DD value, bit1 - "
481 "Local device sends ND response frame when ND is issued). "
484 prog_char atcmd69_name[] = "EE";
485 prog_char atcmd69_desc[] = "security enable";
486 prog_char atcmd69_help[] =
487 "Enable or disable 128-bit AES encryption (0 or 1, 0 is the "
490 prog_char atcmd70_name[] = "KY"; /* XXX */;
491 prog_char atcmd70_desc[] = "security-key";
492 prog_char atcmd70_help[] =
493 "The 128bits security key (the command is write-only).";
495 prog_char atcmd71_name[] = "MT";
496 prog_char atcmd71_desc[] = "bcast-multi-xmit";
497 prog_char atcmd71_help[] =
498 "Number of additional MAC-level broadcast transmissions. All "
499 "broadcast packets are transmitted MT+1 times to ensure "
500 "it is received (0 to 0xF, default is 3).";
502 prog_char atcmd72_name[] = "RR";
503 prog_char atcmd72_desc[] = "unicast-retries";
504 prog_char atcmd72_help[] =
505 "Number of additional MAC-level packet delivery attempts for "
506 "unicast transactions. If RR is non-zero, packets sent from "
507 "the radio will request an acknowledgement, and can be resent "
508 "up to RR times if no acknowledgement is received. (0 to 0xF, "
511 prog_char atcmd73_name[] = "PL";
512 prog_char atcmd73_desc[] = "power-level";
513 prog_char atcmd73_help[] =
514 "Power Level of RF transmitter (0 - 1mW, 1 - 23mW, 2 - 100mW, "
515 "3 - 158 mW, 4 - 316 mW). Default is 4.";
517 prog_char atcmd74_name[] = "SM";
518 prog_char atcmd74_desc[] = "sleep-mode";
519 prog_char atcmd74_help[] =
520 "Sleep Mode (0 - disabled, 1 - pin sleep, 4 - async cyclic "
521 "sleep, 5 - async cyclic sleep with pin wakeup). Default "
524 prog_char atcmd75_name[] = "SO";
525 prog_char atcmd75_desc[] = "sleep-options";
526 prog_char atcmd75_help[] =
527 "Sleep Options bitmask (bit8 - always wake for ST time). "
530 prog_char atcmd76_name[] = "ST";
531 prog_char atcmd76_desc[] = "wake-time";
532 prog_char atcmd76_help[] =
533 "Wake Time: the amount of time in ms that the module will stay "
534 "awake after receiving RF or serial data (from 0x45 to "
535 "0x36EE80, default is 0x7D0 = 2 secs).";
537 prog_char atcmd77_name[] = "SP";
538 prog_char atcmd77_desc[] = "sleep-period";
539 prog_char atcmd77_help[] =
540 "Sleep Period: the amount of time in 10ms unit the module will "
541 "sleep per cycle. For a node operating as an Indirect "
542 "Messaging Coordinator, this command defines the amount of "
543 "time that it will hold an indirect message for an end device. "
544 "The coordinator will hold the message for (2.5 * SP). Range "
545 "is from 1 to 1440000, default is 200 (2 secs).";
547 prog_char atcmd78_name[] = "SN";
548 prog_char atcmd78_desc[] = "num-sleep-periods";
549 prog_char atcmd78_help[] =
550 "Number of Sleep Periods that must elapse between assertions "
551 "of the ON_SLEEP line during the wake time of asynchronous "
552 "cyclic sleep (1 to 0xFFFF, default is 1).";
554 prog_char atcmd79_name[] = "WH";
555 prog_char atcmd79_desc[] = "wake-host";
556 prog_char atcmd79_help[] = "Wake Host time. If it is set to a non-zero value, it "
557 "specifies the time in ms that the device should allow after "
558 "waking from sleep before sending data out the UART or "
559 "transmitting an I/O sample. If serial characters are "
560 "received, the WH timer is stopped immediately. Range is "
561 "from 0 to 0xFFFF, default is 0.";
563 struct xbee_atcmd_pgm xbee_atcmd_list[] = {
568 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
575 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
582 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
589 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
596 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
603 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
610 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
617 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
624 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ,
631 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ,
638 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ,
645 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
652 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
659 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
666 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ,
673 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
680 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
687 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
694 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
701 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
708 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
715 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
722 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
729 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
736 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
743 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
750 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
757 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
764 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
771 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
778 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
785 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
792 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
799 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
806 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
813 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
820 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
827 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
834 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
841 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
848 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
855 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
862 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
869 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
876 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
883 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ,
890 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ,
897 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ,
904 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ,
911 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ,
918 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
925 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ,
932 XBEE_ATCMD_F_PARAM_S16 | XBEE_ATCMD_F_READ,
939 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ,
946 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ,
953 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ,
960 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ,
967 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ,
974 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ,
981 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
988 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
995 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1002 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1009 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1016 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1023 XBEE_ATCMD_F_PARAM_STRING_20B | XBEE_ATCMD_F_READ |
1031 XBEE_ATCMD_F_PARAM_STRING_20B | XBEE_ATCMD_F_READ |
1039 XBEE_ATCMD_F_PARAM_NONE | XBEE_ATCMD_F_WRITE,
1046 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1053 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1060 XBEE_ATCMD_F_PARAM_HEXBUF_16B | XBEE_ATCMD_F_WRITE,
1067 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1074 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1081 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1088 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1095 XBEE_ATCMD_F_PARAM_U8 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1102 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1109 XBEE_ATCMD_F_PARAM_U32 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1116 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1123 XBEE_ATCMD_F_PARAM_U16 | XBEE_ATCMD_F_READ | XBEE_ATCMD_F_WRITE,
1134 struct xbee_atcmd_pgm *xbee_atcmd_lookup_name(const char *atcmd_str)
1136 struct xbee_atcmd_pgm *cmd;
1137 struct xbee_atcmd copy;
1139 for (cmd = &xbee_atcmd_list[0], memcpy_P(©, cmd, sizeof(copy));
1141 cmd++, memcpy_P(©, cmd, sizeof(copy))) {
1143 if (!strcmp_P(atcmd_str, copy.name))
1147 if (copy.name == NULL) /* not found */
1153 struct xbee_atcmd_pgm *xbee_atcmd_lookup_desc(const char *desc)
1155 struct xbee_atcmd_pgm *cmd;
1156 struct xbee_atcmd copy;
1158 for (cmd = &xbee_atcmd_list[0], memcpy_P(©, cmd, sizeof(copy));
1160 cmd++, memcpy_P(©, cmd, sizeof(copy))) {
1161 if (!strcmp_P(desc, copy.desc))
1164 if (copy.name == NULL) /* not found */