Blinkenlights RF packet format

The packets sent by the Blinkenlights OpenBeacon control system is defined by the following C struct. Check out our OpenBeacon git repository for more information.


 * 1) define GAMMA_DEFAULT  200
 * 2) define FIFO_DEPTH     256
 * 3) define RF_PAYLOAD_SIZE 16

enum { RF_CMD_SET_VALUES, RF_CMD_SET_LAMP_ID, RF_CMD_SET_GAMMA, RF_CMD_WRITE_CONFIG, RF_CMD_SET_JITTER, RF_CMD_SEND_STATISTICS, RF_CMD_SET_DIMMER_DELAY, RF_CMD_SET_DIMMER_CONTROL, RF_CMD_PING, RF_CMD_RESET, RF_CMD_ENTER_UPDATE_MODE = 0x3f };

typedef struct { unsigned short mac; unsigned char wmcu_id; unsigned char cmd; union {   unsigned char payload[RF_PAYLOAD_SIZE]; unsigned char dummy[6]; struct {     unsigned char id; unsigned char wmcu_id; } PACKED set_lamp_id; struct {     unsigned char block; unsigned short val[8]; } PACKED set_gamma; struct {     unsigned short jitter; } PACKED set_jitter; struct {     unsigned short emi_pulses; unsigned long packet_count; unsigned long pings_lost; unsigned long fw_version; unsigned long tick_count; } PACKED statistics; struct {     unsigned short delay; } PACKED set_delay; struct {     unsigned char off; } PACKED dimmer_control; struct {     unsigned int sequence; } PACKED ping; } PACKED;                    /* union */ unsigned int sequence; unsigned int crc; } PACKED BRFPacket;