Both Tx/Rx packets follows the format showed above. The packet length is 10 bytes.
The length is counting from frame header to checksum.
The packet returned from UD Box to denote UD recived “correct” command format.
- Low byte of target frequency in kHz
- Mid byte of target frequency in kHz
- High byte of target frequency in kHz
- Highest byte of target frequency in kHz
- For the future developed
- Low byte of target frequency in kHz
- Mid byte of target frequency in kHz
- High byte of target frequency in kHz
- Highest byte of target frequency in kHz
- For the future developed
The packet returned from UD Box to denote UD recived “incorrect” command format.
For every Tx pakcet user needs to prepare LRC checksum before sending the command to UD Box. The LRC is generated by frame header and data payload only.
pseudo code
uint8_t LRC(uint8_t *msgPtr, uint8_t len)
{
uint8_t mLRC = 0;
for each element in msgPtr
{
mLRC += each element in msgPtr
}
return ((uint8_t)(-((uint8_t)mLRC))); // two's complement
}