IPTV_CMD - v3l0c1r4pt0r/lkv-wiki GitHub Wiki
IPTV_CMD is a control service for IPTV Control Center. It uses two connections - one for each direction. Device listens for requests on TCP port 9001.
Basic structure

IPTV_CMD packets consists of header and payload. Header has always same meaning regardless of function selected. Payload is dependent on the exact function.
General header consists of:
- cb_ipv4and- cb_port- Callback IP and callback port - LKV373A will try to connect to this address to provide its response
- cmd- command identifier - number of function to call. Responses always have id incremented by one
- len- length of payload
- payload- function dependent
- checksum- least significant byte of sum of bytes - there are two checksums - first secures- cmdand- len, second the- payload
Command List
| Value | Function | Notes | 
|---|---|---|
| 0x1 | set_dhcp | |
| 0x3 | set_static_ip | |
| 0x5 | Set multicast address? | |
| 0x7 | set_uart_baudrate | |
| 0x9 | set_mac_address | |
| 0xB | ||
| 0xD | ||
| 0xF | get_hdcp | |
| 0x11 | get_video_lock | |
| 0x13 | Get multicast address? | |
| 0x15 | get_dhcp | |
| 0x17 | get_uart_baudrate | |
| 0x19 | get_static_ip | |
| 0x1b | get_mac_address | |
| 0x1d | set_device_name | |
| 0x1f | get_device_name | |
| 0x21 | ||
| 0x23 | factory_reset | |
| 0x25 | Upgrade? | |
| 0x27 | ||
| 0x29 | (*) | |
| 0x2b | set_company_id ? | (*) | 
| 0x2d | get_company_id ? | (*) | 
| 0x2f | (*)Set multicast mode ? | |
| 0x31 | (*) | |
| 0xf0 | Reboot | |
| 0xfe | Discovery (second, hidden handler) | |
| 0x101 | set_video_bitrate | |
| 0x105 | ||
| 0x107 | Set video modes? | |
| 0x109 | get_video_bitrate | |
| 0x10b | ||
| 0x10d | Get video modes? | |
| 0x10f | get_fw_version | |
| 0xffff | 
(*) - only in IPTV firmware
Command description
0x1 - 0x2: set_dhcp()
Parameters
| Name | Type | Range | Meaning | 
|---|---|---|---|
| ? | 
Return value
enum { fail = -1, success = 0 } retcode;
0xd - 0xe: ?
- answer payload length: 0x2
- return values: 0, 0
0xf - 0x10: get_hdcp()
Return value
enum status { off = 0, on = 1 };
uint16_t status = (enum status) payload;