Length-Value Frames

CrystalC2's UDC2 listener expects data to be written and read as length-value (LV) frames, where the length is in little-endian format.

The read/write cycle on your 3rd party listener server should resemble the following:

  1. Receive incoming data from Beacon.

  2. Connect to the UDC2 listener.

  3. Write the 4-byte length of incoming data.

  4. Write the incoming data.

  5. Read the 4-byte data length from the UDC2 listener.

  6. Read the outgoing data for Beacon.

  7. Relay the outgoing data to Beacon.

  8. Disconnect from the UDC2 listener.

circle-info

The UDC2 listener does not require you to maintain TCP sessions.

Last updated