Xbee API Test 3

Dependencies:   XBee mbed

> help
h or help
m <status-in-hex>,. ... Modem status
l <cmd>,<val-in-hex>.   ... exec <cmd> (AT) at this host.
lset fid <val-in-hex>. ... set local frame id. default is 1.
lset cmd <val-in-hex>. ... set local command.
lset val <val-in-hex>. ... set local command value.
q <cmd>,<val-in-hex>.   ... set queue parameter value.
r <cmd>,<val-in-hex>.   ... exec <cmd> (AT)at remote host.
rset a16 <val-in-hex>. ... set remote address high.
rset a64 <val-in-hex>,<val-in-hex>.  ... set remote address low.
rset fid <val-in-hex>. ... set remote frame id. default is 1.

> l D4,0x05
cmd=D4 val=0x05
apiId=88

object 100008c8:35 01 00 10 88 00 05 FE 04 01 00 FF

l OK:

> l D4,0x04
cmd=D4 val=0x04
apiId=88

object 100008c8:35 01 00 10 88 00 05 FE 04 01 00 FF

l OK:

>
Committer:
takashiyamanoue
Date:
Sat Jul 21 04:09:54 2012 +0000
Revision:
0:3edcfa3aba71
xbee test 3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takashiyamanoue 0:3edcfa3aba71 1 /*****************************************************************************
takashiyamanoue 0:3edcfa3aba71 2 * auth.h - PPP Authentication and phase control header file.
takashiyamanoue 0:3edcfa3aba71 3 *
takashiyamanoue 0:3edcfa3aba71 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
takashiyamanoue 0:3edcfa3aba71 5 * portions Copyright (c) 1998 Global Election Systems Inc.
takashiyamanoue 0:3edcfa3aba71 6 *
takashiyamanoue 0:3edcfa3aba71 7 * The authors hereby grant permission to use, copy, modify, distribute,
takashiyamanoue 0:3edcfa3aba71 8 * and license this software and its documentation for any purpose, provided
takashiyamanoue 0:3edcfa3aba71 9 * that existing copyright notices are retained in all copies and that this
takashiyamanoue 0:3edcfa3aba71 10 * notice and the following disclaimer are included verbatim in any
takashiyamanoue 0:3edcfa3aba71 11 * distributions. No written agreement, license, or royalty fee is required
takashiyamanoue 0:3edcfa3aba71 12 * for any of the authorized uses.
takashiyamanoue 0:3edcfa3aba71 13 *
takashiyamanoue 0:3edcfa3aba71 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
takashiyamanoue 0:3edcfa3aba71 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
takashiyamanoue 0:3edcfa3aba71 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
takashiyamanoue 0:3edcfa3aba71 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
takashiyamanoue 0:3edcfa3aba71 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
takashiyamanoue 0:3edcfa3aba71 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
takashiyamanoue 0:3edcfa3aba71 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
takashiyamanoue 0:3edcfa3aba71 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
takashiyamanoue 0:3edcfa3aba71 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
takashiyamanoue 0:3edcfa3aba71 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
takashiyamanoue 0:3edcfa3aba71 24 *
takashiyamanoue 0:3edcfa3aba71 25 ******************************************************************************
takashiyamanoue 0:3edcfa3aba71 26 * REVISION HISTORY
takashiyamanoue 0:3edcfa3aba71 27 *
takashiyamanoue 0:3edcfa3aba71 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
takashiyamanoue 0:3edcfa3aba71 29 * Ported to lwIP.
takashiyamanoue 0:3edcfa3aba71 30 * 97-12-04 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.
takashiyamanoue 0:3edcfa3aba71 31 * Original derived from BSD pppd.h.
takashiyamanoue 0:3edcfa3aba71 32 *****************************************************************************/
takashiyamanoue 0:3edcfa3aba71 33 /*
takashiyamanoue 0:3edcfa3aba71 34 * pppd.h - PPP daemon global declarations.
takashiyamanoue 0:3edcfa3aba71 35 *
takashiyamanoue 0:3edcfa3aba71 36 * Copyright (c) 1989 Carnegie Mellon University.
takashiyamanoue 0:3edcfa3aba71 37 * All rights reserved.
takashiyamanoue 0:3edcfa3aba71 38 *
takashiyamanoue 0:3edcfa3aba71 39 * Redistribution and use in source and binary forms are permitted
takashiyamanoue 0:3edcfa3aba71 40 * provided that the above copyright notice and this paragraph are
takashiyamanoue 0:3edcfa3aba71 41 * duplicated in all such forms and that any documentation,
takashiyamanoue 0:3edcfa3aba71 42 * advertising materials, and other materials related to such
takashiyamanoue 0:3edcfa3aba71 43 * distribution and use acknowledge that the software was developed
takashiyamanoue 0:3edcfa3aba71 44 * by Carnegie Mellon University. The name of the
takashiyamanoue 0:3edcfa3aba71 45 * University may not be used to endorse or promote products derived
takashiyamanoue 0:3edcfa3aba71 46 * from this software without specific prior written permission.
takashiyamanoue 0:3edcfa3aba71 47 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
takashiyamanoue 0:3edcfa3aba71 48 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
takashiyamanoue 0:3edcfa3aba71 49 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
takashiyamanoue 0:3edcfa3aba71 50 *
takashiyamanoue 0:3edcfa3aba71 51 */
takashiyamanoue 0:3edcfa3aba71 52
takashiyamanoue 0:3edcfa3aba71 53 #ifndef AUTH_H
takashiyamanoue 0:3edcfa3aba71 54 #define AUTH_H
takashiyamanoue 0:3edcfa3aba71 55
takashiyamanoue 0:3edcfa3aba71 56 /***********************
takashiyamanoue 0:3edcfa3aba71 57 *** PUBLIC FUNCTIONS ***
takashiyamanoue 0:3edcfa3aba71 58 ***********************/
takashiyamanoue 0:3edcfa3aba71 59
takashiyamanoue 0:3edcfa3aba71 60 /* we are starting to use the link */
takashiyamanoue 0:3edcfa3aba71 61 void link_required (int);
takashiyamanoue 0:3edcfa3aba71 62
takashiyamanoue 0:3edcfa3aba71 63 /* we are finished with the link */
takashiyamanoue 0:3edcfa3aba71 64 void link_terminated (int);
takashiyamanoue 0:3edcfa3aba71 65
takashiyamanoue 0:3edcfa3aba71 66 /* the LCP layer has left the Opened state */
takashiyamanoue 0:3edcfa3aba71 67 void link_down (int);
takashiyamanoue 0:3edcfa3aba71 68
takashiyamanoue 0:3edcfa3aba71 69 /* the link is up; authenticate now */
takashiyamanoue 0:3edcfa3aba71 70 void link_established (int);
takashiyamanoue 0:3edcfa3aba71 71
takashiyamanoue 0:3edcfa3aba71 72 /* a network protocol has come up */
takashiyamanoue 0:3edcfa3aba71 73 void np_up (int, u16_t);
takashiyamanoue 0:3edcfa3aba71 74
takashiyamanoue 0:3edcfa3aba71 75 /* a network protocol has gone down */
takashiyamanoue 0:3edcfa3aba71 76 void np_down (int, u16_t);
takashiyamanoue 0:3edcfa3aba71 77
takashiyamanoue 0:3edcfa3aba71 78 /* a network protocol no longer needs link */
takashiyamanoue 0:3edcfa3aba71 79 void np_finished (int, u16_t);
takashiyamanoue 0:3edcfa3aba71 80
takashiyamanoue 0:3edcfa3aba71 81 /* peer failed to authenticate itself */
takashiyamanoue 0:3edcfa3aba71 82 void auth_peer_fail (int, u16_t);
takashiyamanoue 0:3edcfa3aba71 83
takashiyamanoue 0:3edcfa3aba71 84 /* peer successfully authenticated itself */
takashiyamanoue 0:3edcfa3aba71 85 void auth_peer_success (int, u16_t, char *, int);
takashiyamanoue 0:3edcfa3aba71 86
takashiyamanoue 0:3edcfa3aba71 87 /* we failed to authenticate ourselves */
takashiyamanoue 0:3edcfa3aba71 88 void auth_withpeer_fail (int, u16_t);
takashiyamanoue 0:3edcfa3aba71 89
takashiyamanoue 0:3edcfa3aba71 90 /* we successfully authenticated ourselves */
takashiyamanoue 0:3edcfa3aba71 91 void auth_withpeer_success (int, u16_t);
takashiyamanoue 0:3edcfa3aba71 92
takashiyamanoue 0:3edcfa3aba71 93 /* check authentication options supplied */
takashiyamanoue 0:3edcfa3aba71 94 void auth_check_options (void);
takashiyamanoue 0:3edcfa3aba71 95
takashiyamanoue 0:3edcfa3aba71 96 /* check what secrets we have */
takashiyamanoue 0:3edcfa3aba71 97 void auth_reset (int);
takashiyamanoue 0:3edcfa3aba71 98
takashiyamanoue 0:3edcfa3aba71 99 /* Check peer-supplied username/password */
takashiyamanoue 0:3edcfa3aba71 100 u_char check_passwd (int, char *, int, char *, int, char **, int *);
takashiyamanoue 0:3edcfa3aba71 101
takashiyamanoue 0:3edcfa3aba71 102 /* get "secret" for chap */
takashiyamanoue 0:3edcfa3aba71 103 int get_secret (int, char *, char *, char *, int *, int);
takashiyamanoue 0:3edcfa3aba71 104
takashiyamanoue 0:3edcfa3aba71 105 /* check if IP address is authorized */
takashiyamanoue 0:3edcfa3aba71 106 int auth_ip_addr (int, u32_t);
takashiyamanoue 0:3edcfa3aba71 107
takashiyamanoue 0:3edcfa3aba71 108 /* check if IP address is unreasonable */
takashiyamanoue 0:3edcfa3aba71 109 int bad_ip_adrs (u32_t);
takashiyamanoue 0:3edcfa3aba71 110
takashiyamanoue 0:3edcfa3aba71 111 #endif /* AUTH_H */