Library to easily communicate with XBee modules.
Fork of XBeeLib by
Diff: XBee802/XBee802.cpp
- Revision:
- 8:b5f4a0e92249
- Parent:
- 6:06522f3a6642
- Child:
- 9:780db84ce891
--- a/XBee802/XBee802.cpp Thu Jul 28 15:36:36 2016 +0200 +++ b/XBee802/XBee802.cpp Fri Jul 29 12:10:38 2016 +0200 @@ -137,6 +137,17 @@ return Success; } +RadioStatus XBee802::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; +} + RadioStatus XBee802::get_node_discovery_timeout(uint16_t * const timeout_ms) { AtCmdFrame::AtCmdResp cmdresp;