Library to easily communicate with XBee modules.
Fork of XBeeLib by
Diff: XBeeZB/XBeeZB.cpp
- Revision:
- 8:b5f4a0e92249
- Parent:
- 6:06522f3a6642
- Child:
- 9:780db84ce891
--- a/XBeeZB/XBeeZB.cpp Thu Jul 28 15:36:36 2016 +0200 +++ b/XBeeZB/XBeeZB.cpp Fri Jul 29 12:10:38 2016 +0200 @@ -261,6 +261,17 @@ return cmdresp == AtCmdFrame::AtCmdRespOk ? Success : Failure; } +RadioStatus XBeeZB::set_tc_link_key(const uint8_t * const key, const uint16_t length) +{ + if (key == NULL || length == 0 || length > 16) { + return Failure; + } + AtCmdFrame::AtCmdResp cmdresp; + + cmdresp = set_param("KY", key, length); + return cmdresp == AtCmdFrame::AtCmdRespOk ? Success : Failure; +} + void XBeeZB::radio_status_update(AtCmdFrame::ModemStatus modem_status) { /* Update the radio status variables */