Commit 74ea02f4 authored by PhiBo's avatar PhiBo 🚀

Add function to get key

parent 12ad314b
......@@ -125,6 +125,22 @@ uint8_t ArduRPC_SensorNode::call(uint8_t cmd_id)
return RPC_RETURN_SUCCESS;
} else if (cmd_id == 0x22) {
/* getKey() */
eeprom_pos = NODE_EEPROM_KEY_OFFSET;
len = EEPROM.read(eeprom_pos);
eeprom_pos++;
if(len > 64) {
len = 64;
}
for(i = 0; i < len; i++) {
s[i] = EEPROM.read(eeprom_pos);
eeprom_pos++;
}
this->_rpc->writeResult_string(s, len);
return RPC_RETURN_SUCCESS;
} else if (cmd_id == 0x23) {
/* setCredentials() */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment