Applicable models
LBE-LEI-M-00, LBE-LES-M-00, LBE-LES-M-01, LBE-LEC-M-00, LBE-LEE-M-00
LBE-KEI-M-00, LBE-KES-M-00, LBE-KES-M-01, LBE-KEC-M-00, LBE-KEE-M-00
| Date | Version | Description |
|---|---|---|
| 2024/10/28 | 0.1 | Protocol reorganization |
| 2025/03/12 | 0.2 | Add Ethernet protocol |
| 2025/03/20 | 0.4 | Fix document description errors |
| 2025/06/27 | 0.5 | Fix some document description errors |
System Introduction
System Definition
Stop Playing
Play folder 0 to stop the current playback.
Number of folders
The system supports a maximum of 256 folders [0255].
Folder Definition
- Folder 0 is a system reserved folder and a silent folder; When the user needs to mute or interrupt the current playback, simply switch to folder 0.
- Folder 0 is hidden by default and cannot be edited.
- The folders numbered 1-255 are user folders, and audio files can be freely imported.
- There is no limit to the number of songs imported into a single folder, as long as the capacity allows.
- The playback system can only specify folders and cannot specify which file to play; If you need to specify a file, this folder only needs to hold one audio file.
- When the playback system specifies to play a folder, the system will determine the playback strategy based on the "playback mode" and "selection mode": loop or single, order or random, as detailed in the next section "Mode Definition".
Support file formats
The audio file format supports. mp3 and. wav.
Support interfaces
At present, the player supports four control interfaces:
| interface | Remark |
|---|---|
| serial port | RS232 / RS485 |
| CAN | CAN2.0B |
| Input | 12V~36V NPN or PNP |
| Ethernet | Ethernet |
Pattern definition
Volume mode
| pattern | Value range | Description |
|---|---|---|
| 100 equal parts | [0,100] | In this mode, the volume is divided into 100 equal parts, and the maximum volume is reached when the volume is 100. |
| 28 equal parts | [0,28] | In this mode, the volume is divided into 28 equal parts, and the volume is at its maximum when it is 28. |
PlaybackState
| Status | Value | Description |
|---|---|---|
| Stop | 0x01 | Player in stop state |
| Playing | 0x02 | Player in play state |
Voice playback mode Playback Mode
| Mode | Value | Description |
|---|---|---|
| Loop mode | 0x00 | folder are played in a continuous loop. |
| Single mode | 0x01 | The files in the folder are played sequentially, and the player stops after playing the last file. |
Select Mode
| Mode | Value | Description |
|---|---|---|
| Sequential Mode | 0x00 | Sort files by folder name and select files in ascending order. |
| Random Mode | 0x01 | Randomly select files from the specified folder; When in random mode, the file will continue to play randomly in a loop. |
Allow ignoring playback command IgnorePlayCMD
| Whether to enable | Value | Description |
|---|---|---|
| Close | 0x00 (false) | The system will unconditionally respond to playback commands in real-time; If the same folder playback command is received again, the current playback will be stopped and restarted. |
| Enable | 0x01 (true) | If a folder is currently playing, it will be ignored and the original playback will be maintained when the same folder playback command is received again. |
Ethernet
Protocol: LD-NET2
Protocol Description
- Based on TCP/IP; Please maintain a minimum interval of 50 ms between TCP disconnection and connection: TCP disconnection → delay of 50 ms → TCP connection. The
- protocol consists of 7 bytes: head function param1 param2 param3 xor tail. Function code parameter 1 parameter 2 parameter 3 xor checksum.
- Head code: 0x01
- Tail code: 0x02
- xor checksum: XOR obtained from the first 5 bytes.
xor = header ^ function ^ param1 ^ param2 ^ param3 - Instruction interval: Please keep the interval between each instruction sent at least 200 ms. Please refer to the "LD-SP2" chapter for the composition and analysis of protocol instructions
.
Protocol: Modbus TCP
Protocol Description
- Support Instructions:
- Read and Hold Register (0x03)
- Write a single hold register (0x06)
- Write multiple hold registers (0x10)
- Instruction interval: 200 ms or more.
Related registers
| Register address | Function description | Value range | Read only |
|---|---|---|---|
| 0x03 | Play register | [0,255] | No |
| 0x04 | Volume Register | [0100] or [0,28] | No |
| 0x05 | Play Mode Register | [0,1] | No |
| 0x06 | Select Mode Register | [0,1] | No |
| 0x07 | Ignore Play Instruction Register | [0,1] | No |
| 0x08 | Play Status Register | [1,2] | is |
Protocol Instruction
Write Single Register Instruction
Send Format:
| Transaction Identifier | Protocol Identifier | Length | Unit Identifier | Function Code | Register Address | Register Value |
|---|---|---|---|---|---|---|
| 2 Byte | 2 Byte | 2 Byte | 1 Byte | 1 Byte | 2 Byte | 2 Byte |
- Transaction identifier: Message number, usually self increasing.
- Protocol identifier: default 0x0000.
- Length: Subsequent byte length, fixed 0x06 for writing to a single register.
- Unit identifier: default 0x01.
- Function code: 0x06.
Reply format:Consistent with sending.
Example 1:Play folder 1 (write 0x03 as 1)
Controller → Player (HEX):00 01 00 00 00 06 01 06 00 03 00 01
Player → Controller (HEX):00 01 00 00 00 06 01 06 00 03 00 01
Example 2:Stop playing (write 0x03 as 0)
Controller → Player (HEX):00 02 00 00 00 06 01 06 00 03 00 00
Player → Controller (HEX):00 02 00 00 00 06 01 06 00 03 00 00
Example 3:Set volume to 100% (write 0x04 as 100=0x64)
Controller → Player (HEX):00 03 00 00 00 06 01 06 00 04 00 64
Player → Controller (HEX):00 03 00 00 00 06 01 06 00 04 00 64
Read register instruction
Send format:
| Transaction identifier | Protocol identifier | Length | Unit identifier | Function code | Starting register address | Number of registers |
|---|---|---|---|---|---|---|
| 2 Byte | 2 Byte | 2 Byte | 1 Byte | 1 Byte | 2 Byte | 2 Byte |
Reply format:
| Transaction identifier | Protocol identifier | Length | Unit identifier | Function code | Byte Count | Register Value |
|---|---|---|---|---|---|---|
| 2 Byte | 2 Byte | 2 Byte | 1 Byte | 1 Byte | 1 Byte | 2 Byte |
Example:Read playback status (read 0x08)
Controller → Player (HEX):00 04 00 00 00 06 01 03 00 08 00 01
Player → Controller (HEX):00 04 00 00 00 05 01 03 02 00 02
→ Current playback status is 2 (playing).
Protocol: HTTP-GET
Protocol Description
- Based on HTTP, the player has built-in HTTP services.
- Instruction interval: 500 ms or more.
Protocol Instruction
Play Instruction
URL:http://{IP}:{port}/control/play?id={dir}http://{IP}:{port}/control/play?id={dir}&volume={vol}
Parameters:
| Parameters | Description | Is it mandatory |
|---|---|---|
| IP | HTTP server IP address | must |
| port | HTTP server port | must |
| dir | The folder number that needs to be played | must |
| vol | Volume (0-100 or 0-28) | Optional |
Reply:{"Code":0,"Msg":"ok"}
Example 1:Play folder 1 at 100% volume (default IP/port)
Controller → Player:http://192.168.168.254:7890/control/play?id=1&volume=100
Player → Controller:{"Code":0,"Msg":"ok"}
Example 2:Stop playing (id=0)http://192.168.168.254:7890/control/play?id=0&volume=100
Reply as above.
Example 3:Play folder 2 (without volume)http://192.168.168.254:7890/control/play?id=2
Reply as above.
Set Volume
URL:http://{IP}:{port}/control/set?volume={value}
Example:Set to 90%http://192.168.168.254:7890/control/set?volume=90
Reply:{"Code":0,"Msg":"ok"}
Set playback mode
URL:http://{IP}:{port}/control/set?loopmode={value}
value: 0=loop, 1=single
Example:Set as loophttp://192.168.168.254:7890/control/set?loopmode=0
Set selected mode
URL:http://{IP}:{port}/control/set?selectmode={value}
value: 0=order, 1=random
Example:Set as orderhttp://192.168.168.254:7890/control/set?selectmode=0
Set to allow ignoring playback instructions
URL:http://{IP}:{port}/control/set?ignorecmd={value}
value: 0=not allowed, 1=allowed
Example:Allow to ignorehttp://192.168.168.254:7890/control/set?ignorecmd=1
Query player status
URL:http://{IP}:{port}/control/get
Reply example:{"Volume":100,"SelectMode":0,"LoopMode":0,"IsIgnorePlayCmd":1,"State":2,"GroupId":2,"FileIndex":0,"Code":0}
Field description:
| Field name | Description |
|---|---|
| Volume | Current volume |
| SelectMode | Current selected mode (0 order 1 random) |
| LoopMode | Current playback mode (0 loops, 1 time) |
| IsIgnorePlayCmd | Is it allowed to ignore the same playback command (0 No 1 Yes) |
| State | Current playback status (1 stop 2 in progress) |
| GroupId | Current playback folder |
| FileIndex | Current file index (reserved) |
| Code | Exception code, default 0 |
serial port
Protocol: LD-SP2
Protocol Description
- Frame format: 7 Byte head function param1 param2 param3 xor tail function code parameter 1 parameter 2 parameter 3 xor verification tail code
- Headcode: 0x01
- Tail code: 0x02
- XOR verification: XOR of the first 5 bytes
- Instruction interval: above 200ms.
Protocol Instructions
Play command
Request:01 51 dir 00 volume xor 02
Reply:01 52 dir 00 volume xor 02
Example:Play folder 2 at 96% volume
Controller → Player (HEX):01 51 02 00 60 32 02
Player → Controller (HEX):01 52 02 00 60 31 02
Set volume command
Request:01 41 00 00 volume xor 02
Reply:01 42 00 00 volume xor 02
Example 1:Set to 10001 41 00 00 64 24 02
Reply:01 42 00 00 64 27 02
Example 2:Set to 2801 41 00 00 1C 5C 02
Reply:01 42 00 00 1C 5F 02
Set playback mode instruction
Request:01 43 00 00 playback_mode xor 02
Reply:01 44 00 00 playback_mode xor 02
Example:Set to loop01 43 00 00 00 42 02
Reply:01 44 00 00 00 45 02
Set selected mode command
Request:01 45 00 00 select_mode xor 02
Reply:01 46 00 00 select_mode xor 02
Example:Set as random01 45 00 00 01 45 02
Reply:01 46 00 00 01 46 02
Set to ignore playback commands
Request:01 47 00 00 ignore_play_cmd xor 02
Reply:01 48 00 00 ignore_play_cmd xor 02
Example:Enable ignore01 47 00 00 01 47 02
Reply:01 48 00 00 01 48 02
Query Status Instruction 1
Request:01 53 00 00 00 52 02
Reply:01 54 00 playback_state volume xor 02
Example:
Controller → Player:01 53 00 00 00 52 02
Player → Controller:01 54 00 02 5A 37 02
→ Status: Playing; Volume: 90
Query Status Instruction 2
Request:01 55 00 00 00 54 02
Reply:01 56 playback_mode select_mode ignore_play_cmd xor 02
Example:
Controller → Player:01 55 00 00 00 54 02
Player → Controller:01 56 00 01 01 57 02
→ Play mode: Loop; Selection mode: Random; Ignore the same instruction: Yes
Query Status Instruction 3
Request:01 57 00 00 00 56 02
Reply:01 58 dir 00 00 xor 02
Example:
Controller → Player:01 57 00 00 00 56 02
Player → Controller:01 58 02 00 00 5B 02
→ Current playback folder: 2
Protocol: Modbus RTU
(Omitted, completely consistent with the Modbus TCP register definition, only the link layer is changed to RTU, as shown in the original text for an example)
CAN
Protocol: LD-CAN1
- Frame format: 8 Byte header function param1 param2 param3 param4 xor tail, function code parameter 1 parameter 2 parameter 3 parameter 4 xor tail
- Headcode: 0x01; Tail code: 0x02; XOR: XOR for the first 6 bytes.
- The frame ID can be modified by the upper computer. The default request from the factory is 0x200, and the reply is 0x201.
- Instruction interval: 100 ms or more.
(The format of each instruction frame is exactly the same as the instruction parameters corresponding to LD-SP2, with only the addition of param4 placeholder, as shown in the original example)
Protocol: LD-CAN2
- Frame format: 8 bytes, no tail code, no xor, header code 0x01, and the rest reserved 0x00.
- Frame ID default: Request 0x200, reply 0x201.
- Instruction interval: 100 ms or more.
(All instructions are the same as LD-CAN1, except for xor and tail code, see example in the original text)
IO input
LD-INPUT1
- Trigger condition: Maintain the corresponding input port trigger state.
- Input type: NPN/PNP can be wired for selection.
- The 8-bit input port status determines the folder number (binary weighted, supports 0-255, 0 is stopped).
- The example table and calculation process can be found in the original text.
LD-INPUT4
- Trigger condition: At least 100 ms pulse signal.
- The rest of the rules are the same as LD-INPUT1, except that the triggering method is changed to pulse.
- Example table and calculation process can be found in the original text.
Leave a Reply