Program Switching and Retrieval
# Program Switching and Retrieval
Retrieve Currently Playing Program ID
Request format: <STX><FLAG><Command><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “601” |
Response format: <STX><FLAG><Command><Programs ID><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “601” |
| Programs ID | AN | 3 | “001” … “500” |
Example: Retrieve the currently playing program (internal ID of the program: 500)
Control PC sends:
<STX><FLAG><36H><30H><31H><ETX><LRC>
Device responds:
<ACK>
<STX><FLAG><36H><30H><31H>><35H><30H><30H><ETX><LRC>
Example of command sent: 02 11 36 30 31 03 32
Example of device response:
02 11 06 03 14
02 11 36 30 31 30 30 33 03 17
Retrieve Program Name with Specified ID
Request format: <STX><FLAG><Command><Program ID><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “602” |
| Program ID | AN | 3 | “001” … “500” |
Response format: <STX><FLAG><Command><Program Name(UTF-8) Length><Program Name (UTF-8)><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “602” |
| ProgramName Length | AN | 2 | “00”...“99” |
| ProgramName | AN | Program name |
Example: Retrieve the program name with ID 30 (program name: Playlist9582.vsn)
Control PC sends:
<STX><FLAG><36H><30H><32H><30H><33H><30H><ETX><LRC>
Device responds:
<ACK>
<STX><FLAG><36H><30H><32H><31H><36H><50H><6CH><61H><79H><6CH><69H><73H><74H><39H><35H><38H><32H><2EH><76H><73H><6EH><ETX><LRC>
Example of command sent: 02 11 36 30 32 30 33 30 03 32
Example of device response:
02 11 06 03 14
02 11 36 30 32 31 38 E6 96 B0 E5 BB BA E8 8A 82 E7 9B AE 32 34 2E 76 73 6E 03 7B
Switch to Program with Specified ID
Request format: <STX><FLAG><Command><Program ID><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “603” |
| Program ID | AN | 3 | “001” … “500” |
Example: Switch to the program with ID 30
Control PC sends:
<STX><FLAG><36H><30H><33H><30H><33H><30H><ETX><LRC>
Device responds:
<ACK>
Example of command sent: 02 11 36 30 33 30 33 30 03 32
Switch Program Based on Program Name
Request format: <STX><FLAG><Command><ProgramName Length><ProgramName><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “604” |
| ProgramName Length | AN | 2 | “00”...“99” |
| ProgramName | AN | Playlist9582.vsn |
Example: Switch to a program named "Playlist9582.vsn" with a length of 16 characters
Control PC sends:
<STX><FLAG><36H><30H><34H><31H><36H><50H><6CH><61H><79H><6CH><69H><73H><74H><39H><35H><38H><32H><2EH><76H><73H><6EH><ETX><LRC>
Device responds:
<ACK>
Example of command sent: 02 11 36 30 34 31 36 50 6C 61 79 6C 69 73 74 39 35 38 32 2E 76 73 6E 03 32
Retrieve Currently Playing Program Name
Request format: <STX><FLAG><Command><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “605” |
Response format: <STX><FLAG><Command><Program Name(UTF-8) Length><Program Name (UTF-8)><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “605” |
| ProgramName(UTF-8) Length | AN | 2 | “00”...“99” |
| ProgramName(UTF-8) | AN | “Playlist9582.vsn” |
Example: Retrieve the program name of the currently playing program (current program name: Playlist9582.vsn)
Control PC sends:
<STX><FLAG><36H><30H><35H><ETX><LRC>
Device responds:
<ACK><STX><FLAG><36H><30H><35H><31H><36H><50H><6CH><61H><79H><6CH><69H><73H><74H><39H><35H><38H><32H><2EH><76H><73H><6EH>><ETX><LRC>
Example of command sent: 02 11 36 30 35 03 32
Example of device response:
02 11 06 03 14
02 11 06 03 14 02 10 36 30 35 31 38 E6 96 B0 E5 BB BA E8 8A 82 E7 9B AE 32 34 2E 76 73 6E 03 7C
Switch Program Based on Program Name and Timestamp
Request format:
<STX><FLAG><Command><ProgramNameLength><ProgramName> <TimeStamp><ETX><LRC >
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “618” |
| ProgramName Length | AN | 2 | “00”...“99” |
| ProgramName | AN | / | hello.vsn |
| TimeStamp | AN | 13 | 1677225183986 (in milliseconds) |
Control PC sends:
<STX><FLAG><36H><31H><38H><ProgramName Length><ProgramName> <TimeStamp><ETX><LRC>
Device responds:
<ACK>
Example of command sent: 02 11 36 31 38 30 39 68 65 6C 6C 6F 2E 76 73 6E 31 36 37 37 32 32 35 31 38 33 39 38 36 03 32
Insert Program Based on Program Name
Request format: <STX><FLAG><Command><ProgramName Length><ProgramName><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “619” |
| ProgramName Length | AN | 2 | “00”...“99” |
| ProgramName | AN | Playlist9582.vsn |
Example: Insert a program named "Playlist9582.vsn" with a length of 16 characters
Control PC sends:
<STX><FLAG><36H><30H><34H><31H><36H><50H><6CH><61H><79H><6CH><69H><73H><74H><39H><35H><38H><32H><2EH><76H><73H><6EH><ETX><LRC>
Device responds:
<STX><FLAG><ACK><ETX><LRC>
Example of command sent:
02 12 36 31 39 31 36 50 6C 61 79 6C 69 73 74 39 35 38 32 2E 76 73 6E 03 32
Example of response:
02 12 06 03 14
Retrieve Program Count
Request format: <STX><FLAG><Command><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “699” |
Response format: <STX><FLAG><Command><Program count><ETX><LRC>
| Field | Format | Length | Description |
|---|---|---|---|
| Command | AN | 3 | “699” |
| Program count | AN | 3 | “001” … “500” |
Example: Retrieve the total number of programs (500 programs)
Control PC sends:
<STX><FLAG><36H><39H><39H><ETX><LRC>
Device responds:
<ACK>
<STX><FLAG><36H><39H><39H><35H><30H><30H><ETX><LRC>
Example of command sent: 02 11 36 39 39 03 32
Example of device response:
02 11 06 03 14
02 11 36 39 39 30 30 33 03 16