SiK icon indicating copy to clipboard operation
SiK copied to clipboard

Error in the serial encryption for non mavlinkframe

Open gustavokcouto opened this issue 7 years ago • 1 comments

https://github.com/ArduPilot/SiK/blob/48faed2bf97f1b5fb379efa2b4d3bd63ee81050e/Firmware/radio/packet.c#L246

gustavokcouto avatar Sep 14 '17 17:09 gustavokcouto

if (!feature_mavlink_framing) {
    // simple framing
    if (slen > 0 && serial_read_buf(buf, slen)) {
        last_sent_len = slen;
        return encryptReturn(last_sent, buf, slen);
    }
    return 0;
}

it should write the encrypted mensage in buf, and the plaintext in last_sent, but is doing the inverse

gustavokcouto avatar Sep 14 '17 18:09 gustavokcouto