meldCX
Smart LED
Firmware version 1.22
13th of April 2023
Command Set
Revision 0.2
Packet Definition
The format of data packet
bytes | 0~3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Name | Header | Channel # | Command | Red | Green | Blue | white | Reserved | Data | Footer |
Value | 0x6D656C64 |
0x01 ~ 0x06 |
0x01 ~ 0xFF |
0x0 ~ 0xFF |
0x0 ~ 0xFF |
0x0 ~ 0xFF |
0x0 ~ 0xFF |
0x0 |
0x0 ~ 0xFF |
0x04 |
Header (fixed value)
Description | Header |
Value | ‘meld’ 0x6D656C64 |
Channel Number (LED controller supports 6 addressable channels)
Description | Channel # |
Value | 0x01 – 0x02 – 0x03 – 0x04 – 0x05 – 0x06 |
Command set
Description | Command |
Value | Hexadecimal values |
Red Color Brightness
Description | Red (brightness) |
Value | 0x0 to 0xFF (0x0 is off - 0xFF is full brightness) |
Green Color Brightness
Description | Green (brightness) |
Value | 0x0 to 0xFF (0x0 is off - 0xFF is full brightness) |
Blue Color Brightness
Description | Blue (brightness) |
Value | 0x0 to 0xFF (0x0 is off - 0xFF is full brightness) |
White Color Brightness
Description | White (brightness) |
Value | 0x0 to 0xFF (0x0 is off - 0xFF is full brightness) |
Reserved
Description | Reserved |
Value | 0x0 |
Data (general use parameter)
Description | Data |
Value | 0x0 to 0xFF |
Footer (fixed value)
Description | Footer |
Value | 0x04 |
Serial Protocol Configuration
Description | Value |
Baud Rate | 57600 |
Data Bits | 8 |
Parity | None |
Stop Bit | 1 |
Flow Control | None |
Pin out
Commands List
# | Command | Value |
1 | Reset the board | 0x7A |
2 | Set strip type | 0x7B |
3 | Get board information | 0x69 |
4 | Set strip length in EEPROM | 0x6C |
5 | Set strip brightness in EEPROM | 0x7C |
6 | Set blink speed in EEPROM | 0x79 |
7 | Turn on/off single pixel in ram | 0x70 |
8 | Turn on/off the strip in EEPROM | 0x71 |
9 | Using RealTerm | |
10 | Firmware Upload |
Note:
- The EEPROM commands are saved in NVRAM. Every time the LED controller gets rebooted, it will load all settings from the EEPROM and turn on all strips connected to the LED controller (according to the last saved color settings) without the need to send any commands to the LED controller.
- The ram commands are temporary settings. By rebooting the LED controller, all of the ram settings will get lost and the EEPROM settings will be loaded and strips will get activated.
Status Code
# | Description | Code |
1 | Successfully | 0xD0 |
2 | Invalid parameters | 0xD1 |
3 | Invalid command | 0xD2 |
4 | Invalid header | 0xD3 |
Sending HEX command to serial port
Use REALTERM serial terminal software to send the HEX commands to the serial port.
For more details, please see how to use RealTerm to send HEX serial commands.
Commands Description
-
Reset the board (Factory Defaults) – 0x7A
Packet send
Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer | |
Value | 6D656C64 | al | cmd | al | al | al | al | al | al | 04 |
cmd: 0x7A
al: 0x78 (alignment)
Packet Receive
Value | Description |
1 byte | See status code table |
0x4 | End of Transmission |
Default Values:
Description | Strip Color | Strip Length |
Channel 1 | Blue | 96 LEDs |
Channel 2 | Blue | 2 LEDs |
Channel 3 | Blue | 2 LEDs |
Channel 4 | Blue | 2 LEDs |
Channel 5 | Blue | 2 LEDs |
Channel 6 | Blue | 2 LEDs |
Strip Type | GRB |
Example:
Packet out: 0x6d 0x65 0x6c 0x64 0x78 0x7a 0x78 0x78 0x78 0x78 0x78 0x78 0x04
Packet in: 0xd0 0x04
-
Set strip type in EEPROM – 0x7B
Packet send
Packet | Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer |
Value | 6D656C64 | ch | cmd | al | al | al | al | al |
Strip Type |
04 |
Parameter:
cmd: 0x7B
ch:
Strip 1: 0x31
Strip 2: 0x32
Strip 3: 0x33
Strip 4: 0x34
Strip 5: 0x35
Strip 6: 0x36
Strip Type: 0x30 ~ 0x4D
RGB: 0x06 | WRGB: 0x18 | RWGB: 0x48 | GWRB: 0x63 | BWRG: 0x6C |
RBG: 0x09 | WRBG: 0x1E | RWBG: 0x4E | GWBR: 0x72 | BWGR: 0x78 |
GRB: 0x52 | WGRB: 0x27 | RGWB: 0x87 | GRWB: 0x93 | BRWG: 0x9C |
GBR: 0xA1 | WGBR: 0x36 | RGBW: 0xC6 | GRBW: 0xD2 | BRGW: 0xD8 |
BRG: 0x58 | WBRG: 0x2D | RBWG: 0x8D | GBWR: 0xB1 | BGWR: 0xB4 |
BGR: 0xA4 | WBGR: 0x39 | RBGW: 0xC9 | GBRW: 0xE1 | BGRW: 0xE4 |
al: 0x78 (alignment)
Packet Receive
Value | Description |
1 byte | See status code table |
0x4 | End of Transmission |
Example:
Set channel # 1 strip type to GRB (0x52)
Packet out: 0x6d 0x65 0x6c 0x64 0x31 0x7b 0x78 0x78 0x78 0x78 0x78 0x52 0x04
Packet in: 0xd0 0x04
Set channel # 2 strip type to RGBW (0xC6)
Packet out: 0x6d 0x65 0x6c 0x64 0x32 0x7b 0x78 0x78 0x78 0x78 0x78 0xC6 0x04
Packet in: 0xd0 0x04
-
Get board information – 0x69
- Firmware version
Packet send
Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer | |
Value | 6D656C64 | al | cmd | al | al | al | al | al | pr | 04 |
cmd: 0x69
pr: 0x33 – get firmware version
al: 0x78 (alignment)
Packet Receive
Bytes | Description |
string | Firmware version (ASCII format) - For errors see status code table |
0x4 | End of Transmission |
Example:
Packet out: 0x6d 0x65 0x6c 0x64 0x78 0x69 0x78 0x78 0x78 0x78 0x78 0x33 0x04
Packet in: 0x46 0x69 0x72 0x6D 0x77 0x61 0x72 0x65 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x0D 0x32 0x2E 0x31 0x2E 0x30 0x0D 0x04
- Firmware date:
Packet send
Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer | |
Value | 6D656C64 | al | cmd | al | al | al | al | al | pr | 04 |
cmd: 0x69
pr: 0x32 – get firmware date
al: 0x78 (alignment)
Packet Receive
Bytes | Description |
string | Firmware date (ASCII format) - For errors see status code table |
0x4 | End of Transmission |
Example:
Packet out: 0x6d 0x65 0x6c 0x64 0x78 0x69 0x78 0x78 0x78 0x78 0x78 0x32 0x04
Packet in: 0x46 0x69 0x72 0x6D 0x77 0x61 0x72 0x65 0x44 0x61 0x74 0x65 0x0D 0x32 0x34 0x2F 0x30 0x36 0x2F 0x32 0x30 0x32 0x32 0x0D 0x04
- Product name:
Packet send
Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer | |
Value | 6D656C64 | al | cmd | al | al | al | al | al | pr | 04 |
cmd: 0x69
pr: 0x34 – get product name
al: 0x78 (alignment)
Packet Receive
Bytes | Description |
string | Product name (ASCII format) - For errors see status code table |
0x4 | End of Transmission |
Example:
Packet out: 0x6d 0x65 0x6c 0x64 0x78 0x69 0x78 0x78 0x78 0x78 0x78 0x34 0x04
Packet in: 0x50 0x72 0x6F 0x64 0x75 0x63 0x74 0x4E 0x61 0x6D 0x65 0x0D 0x4D 0x65 0x6C 0x64 0x43 0x58 0x20 0x4C 0x45 0x44 0x20 0x43 0x6F 0x6E 0x74 0x72 0x6F 0x6C 0x6C 0x65 0x72 0x0D 0x04
- Product model:
Packet send
Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer | |
Value | 6D656C64 | al | cmd | al | al | al | al | al | pr | 04 |
cmd: 0x69
pr: 0x31 – get product model
al: 0x78 (alignment)
Packet Receive
Bytes | Description |
string | Product name (ASCII format) - For errors see status code table |
0x4 | End of Transmission |
Example:
Packet out: 0x6d 0x65 0x6c 0x64 0x78 0x69 0x78 0x78 0x78 0x78 0x78 0x31 0x04
Packet in: 0x4D 0x6F 0x64 0x65 0x6C 0x0D 0x4D 0x43 0x58 0x2D 0x58 0x4C 0x53 0x34 0x33 0x2D 0x55 0x0D 0x04
-
Set strip length in EEPROM – 0x6C
Packet send
Packet | Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer |
Value | 6D656C64 | ch | cmd | al | al | al | al | al | len | 04 |
Parameter:
cmd: 0x6C
ch:
Strip 1: 0x31
Strip 2: 0x32
Strip 3: 0x33
Strip 4: 0x34
Strip 5: 0x35
Strip 6: 0x36
len: number of LEDs in the channel - from 0x1 to 0x40
al: 0x78 (alignment)
Packet Receive
Value | Description |
1 byte | See status code table |
0x4 | End of Transmission |
Example:
Set channel # 1 strip length to 33 LEDs
Packet out: 0x6d 0x65 0x6c 0x64 0x31 0x6c 0x78 0x78 0x78 0x78 0x78 0x21 0x04
Packet in: 0xd0 0x04
-
Set strip brightness in EEPROM – 0x7C
Packet send
Packet | Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer |
Value | 6D656C64 | ch | cmd | al | al | al | al | al | brt | 04 |
Parameter:
cmd: 0x7C
ch:
Strip 1: 0x31
Strip 2: 0x32
Strip 3: 0x33
Strip 4: 0x34
Strip 5: 0x35
Strip 6: 0x36
brt: set the brightness of a LED channel - from 0x1 to 0xff
al: 0x78 (alignment)
Packet Receive
Value | Description |
1 byte | See status code table |
0x4 | End of Transmission |
Examples:
Set channel # 1 strip brightness to 0x10
Packet out: 0x6d 0x65 0x6c 0x64 0x31 0x7c 0x78 0x78 0x78 0x78 0x78 0x10 0x04
Packet in: 0xd0 0x04
Set channel # 1 strip brightness to full (0xff)
Packet out: 0x6d 0x65 0x6c 0x64 0x31 0x7c 0x78 0x78 0x78 0x78 0x78 0xff 0x04
Packet in: 0xd0 0x04
-
Set blink speed in EEPROM – 0x79
Packet send
Packet | Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer |
Value | 6D656C64 | ch | cmd | al | al | al | al | al | bs | 04 |
Parameters:
cmd: 0x79
ch:
Strip 1: 0x31
Strip 2: 0x32
Strip 3: 0x33
Strip 4: 0x34
Strip 5: 0x35
Strip 6: 0x36
al: 0x78 (alignment)
bs: Blink Speed from 0x0 to 0x7f (0x0 is no blink)
Packet Receive
Value | Description |
1 byte | See status code table |
0x4 | End of Transmission |
Example:
Set channel # 1 blink speed to 0x0f in eeprom
Packet out: 0x6d 0x65 0x6c 0x64 0x31 0x79 0x78 0x78 0x78 0x78 0x78 0x0f 0x04
Packet in: 0xd0 0x04
-
Turn on/off single pixel in RAM – 0x70
Packet send
Packet | Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer |
Value | 6D656C64 | ch | cmd | r | g | b | w | al | ad | 04 |
Parameters:
ch:
Strip 1: 0x31
Strip 2: 0x32
Strip 3: 0x33
Strip 4: 0x34
Strip 5: 0x35
Strip 6: 0x36
cmd: 0x70
r: 0x0 to 0xff
g: 0x0 to 0xff
b: 0x00 to 0xff
w: 0x0 to 0xff
al: 0x78 (alignment)
ad: LED address - starting from 0 (the address of the first LED in the strip is 0)
Packet Receive
Value | Description |
1 byte | See status code table |
0x4 | End of Transmission |
Example:
In the second channel (strip 2), Turn the color of third LED in the strip to Blue (full brightness)
Packet out: 0x6d 0x65 0x6c 0x64 0x32 0x70 0x00 0x00 0xff 0x00 0x78 0x02 0x04
Packet in: 0xd0 0x04
-
Turn on/off the strip in EEPROM - 0x71
Packet send
Packet | Header | Channel | Cmd | Red | Green | Blue | white | Reserved | Data | Footer |
Value | 6D656C64 | ch | cmd | r | g | b | w | al | al | 04 |
Parameters:
ch:
Strip 1: 0x31
Strip 2: 0x32
Strip 3: 0x33
Strip 4: 0x34
Strip 5: 0x35
Strip 6: 0x36
cmd: 0x71
r: 0x0 to 0xff
g: 0x0 to 0xff
b: 0x00 to 0xff
w: 0x0 to 0xff
al: 0x78 (alignment)
Packet Receive
Value | Description |
1 byte | See status code table |
0x4 | End of Transmission |
Example:
Turn the color of channel #1 (strip 1) to green in eeprom (full brightness)
Packet out: 0x6d 0x65 0x6c 0x64 0x31 0x71 0x00 0xff 0x00 0x00 0x78 0x78 0x04
Packet in: 0xd0 0x04
Using RealTerm
- Download RealTerm from the following link:
https://realterm.sourceforge.io/
- Install RealTerm on your windows based computer
- Open RealTerm, click on Display tab and select ASCII
- Click on Port tab and select the Smart LED com port then set the following:
Baud: 57600
Parity: none
DataBits: 8
Stop Bit: 1
Hardware flow control: none
Then click on Open twice
- Open the Smart LED Command set documentation and copy the command you want to test
In this example, we are going to copy “get firmware version command”
- Go back to RealTerm and click on Send tab then paste the command you copped in step 5 on the left of Send Numbers (as showed in the following screen capture)
- Click on Send Numbers, You should receive the firmware version in ASCII format.
- If you need to show the results in HEX format; Click on Display tab then select:
Hexadecimal [space]
- Click on Send tab, the click on Send Number.
You will get the firmware displayed in hexadecimal [space] format
Firmware Upload
1. You will need to use windows-10 operating system.
2. Disconnect all usb devices on your computer.
3. Connect the the smart LED board to your PC USB port.
4. run CMD as administrator.
5. unzip the attached file "boot-loader-6-channels.zip"
6. type fw-update.bat then press enter.
Example
D: \ boot-loader-6-channels >fw-update
Comments
0 comments
Please sign in to leave a comment.