New version of Lenkeng HDMI over IP extender – LKV373A (Update 31. jan 2017)

Last week I’ve got the new version of Lenkeng HDMI extender – LKV373A. This version states incompatibility with previous version and usage of new HDbitT protocol so I was wondering what did Chinese engineers invent this time.

Getting the stream

After plugging HDMI input into sender and connecting sender directly with notebook, I saw following packets in tcpdump:

11:06:02.781619 IP 192.168.1.238.5004 > 239.255.42.42.5004: UDP, length 1328
 11:06:02.781892 IP 192.168.1.238.5004 > 239.255.42.42.5004: UDP, length 1328
 11:06:02.782172 IP 192.168.1.238.5004 > 239.255.42.42.5004: UDP, length 1328
 11:06:02.782542 IP 192.168.1.238.5004 > 239.255.42.42.5004: UDP, length 1328
 11:06:02.782775 IP 192.168.1.238.5004 > 239.255.42.42.5004: UDP, length 1328
 11:06:02.783042 IP 192.168.1.238.5004 > 239.255.42.42.5004: UDP, length 1328

This was a great news because so heavy multicast traffic means a lot of data (most probably video) and no need to send control packets to start the stream.

So I started vlc and set udp://@239.255.42.42:5004 as input. Some choppy video appeared, but it was unusable and following errors were appearing in console:

Invalid UE golomb code
 [h264 @ 0x7f73c4ce78e0] cbp too large (3199971767) at 74 44
 [h264 @ 0x7f73c4ce78e0] error while decoding MB 74 44
 [h264 @ 0x7f73c4d76920] mb_type 535 in P slice too large at 18 41
 [h264 @ 0x7f73c4d76920] error while decoding MB 18 41
 [h264 @ 0x7f73c4d2f100] mb_type 264 in P slice too large at 78 32
 [h264 @ 0x7f73c4d2f100] error while decoding MB 78 32
 [h264 @ 0x7f73c4ce78e0] dquant out of range (-270) at 10 13
 Invalid UE golomb code
 [h264 @ 0x7f73c4d76920] cbp too large (3199971767) at 74 44
 [h264 @ 0x7f73c4d76920] error while decoding MB 74 44
 [h264 @ 0x7f73c4ce78e0] error while decoding MB 10 13
 [h264 @ 0x7f73c4cd35c0] cbp too large (540) at 35 16
 [h264 @ 0x7f73c4cd35c0] error while decoding MB 35 16
 [h264 @ 0x7f73c4d2f100] cbp too large (540) at 77 7
 [h264 @ 0x7f73c4d2f100] error while decoding MB 77 7
 [h264 @ 0x7f73c4d76920] dquant out of range (-270) at 44 36
 [h264 @ 0x7f73c4d76920] error while decoding MB 44 36
 [h264 @ 0x7f73c4ce78e0] mb_type 535 in P slice too large at 35 2
 [h264 @ 0x7f73c4ce78e0] error while decoding MB 35 2
 Invalid UE golomb code
 [h264 @ 0x7f73c4cd35c0] cbp too large (3199971767) at 70 44
 [h264 @ 0x7f73c4cd35c0] error while decoding MB 70 44
 [h264 @ 0x7f73c4d2f100] P sub_mb_type 7 out of range at 37 6
 [h264 @ 0x7f73c4d2f100] error while decoding MB 37 6
 [h264 @ 0x7f73c4cd35c0] dquant out of range (135) at 35 16
 [h264 @ 0x7f73c4cd35c0] error while decoding MB 35 16
 Invalid UE golomb code

So I tried to proxy video thru ffmpeg (latest compiled version)

./ffmpeg -i udp://@239.255.42.42:5004 -vcodec copy -f mpegts udp://127.0.0.1:1234

and I’ve got significantly better video in VLC (udp://@:1234).

But then I noticed in pcap, that packet length was 1328B but I knew it should  be integer multiply of 188 (typicaly 1316 bytes) if it was mpegts stream.So my next thought was: this must be RTP!

I started VLC, set input to rtp://@239.255.42.42:5004 and the result is here:

vlc_rtp
I’ve got beautifully clean stream of my other desktop. Job’s done!

Stream quality

Bitrate of the stream is quite high, about 15Mbps, but unfortunately, it doesn’t stream in FullHD, but in strange resolution 1728×1080@30fps.  If i lowered the resolution to 1280×720, I’ve got 60fps. Used codecs are H264 and mpga.

lkv373a_bitrate lkv373a_codecs

You can stream directly to youtube with audio reencoding with this command:

ffmpeg -i udp://239.255.42.42:5004 -vcodec copy -codec:a aac -b:a 128k -f flv rtmp://a.rtmp.youtube.com/live2/<stream key>

Latency

In following videos you can compare the latency of the old and the new HDMI extender. Left monitor shows source (secondary output is fed to HDMI sender), right monitor shows HDMI receiver output and notebook shows stream captured from network.

Old extender has latency of about 100ms.

New extender is slightly slower, latency is about 400-500ms.

HDCP

All this was done with PC output without HDCP encoding. When I connected sender to a DVD player, receiver was working OK but VLC couldn’t play the stream. Although it was showing high bitrate, nothing was played. If you want to examine the stream, you can look into this PCAP.

This could be possibly solved by HDMI splitter which removes HDCP encoding. I’ll update this section later when I test it.

Network

The device acquires its IP address from DHCP. If there is no DHCP server in the network, it sets default IP 192.168.1.238 as you can see in first tcpdump.

Builtin web interface allows only firmware upgrade. There are some signs (in commented parts of the page) it could set some stream parameters. I’ll investigate this later and update.

Price

You can buy the sender for about 40$ with shipping which is really not bad price for “HDMI to RTP” converter. On the other side, I don’t recommend you to buy the receiver. You can buy other more capable device (e.g. Raspberry PI) which can do the same job for less money or better. Well, you can buy it, if you want to save yourself from some fun with building it 🙂

This time it was not much about hacking, I’d say it was more discovering. I hope you liked my post and will give some feedback. Looking forward for it.

Let’s stream!

Update 12. jun 2016

I’ve got my own sender yesterday. These are new findings.

When I tried to use the sender the same way I used the borrowed one, it was not working. So I started with the first thing: capturing packets:

11:18:45.134036 IP 10.1.0.99.5004 > 239.255.42.42.5004: UDP, length 1316
11:18:45.134287 IP 10.1.0.99.5004 > 239.255.42.42.5004: UDP, length 1316
11:18:45.134542 IP 10.1.0.99.5004 > 239.255.42.42.5004: UDP, length 1316
11:18:45.134787 IP 10.1.0.99.5004 > 239.255.42.42.5004: UDP, length 1316
11:18:45.135133 IP 10.1.0.99.5004 > 239.255.42.42.5004: UDP, length 1316
11:18:45.135394 IP 10.1.0.99.5004 > 239.255.42.42.5004: UDP, length 1316
11:18:45.135639 IP 10.1.0.99.5004 > 239.255.42.42.5004: UDP, length 1316

You can see, these packets are only 1316 bytes long what corresponds to standard mpegts encapsulation. So I tried to run VLC like this: vlc udp://@239.255.42.42:5004 and it worked:

Screenshot from 2016-06-11 11-04-36Screenshot from 2016-06-11 11-04-43It was a sad surprise, when I saw the resolution 1280×720. I tried to restart the device, change computer resolution but nothing helped. Btw, even when this sender uses pure mpegts, it works with the other receiver (I didn’t expect that).

Embedded webserver

Embedded webserver shows only forms for firmware upgrade:

lkv_mainThere are some commented parts (everything is in data zip below if you want to see) about audio settings, but I wasn’t able to construct correct command to set anything. The webpage includes also some .js script from where I was able to construct few commands which worked:

- set audio settings (doesn't work)
http://192.168.1.238/dev/info.cgi?action=audioinfo&selaudio_type=1_AAC&selaudio_sprate=48000&selaudio_brate=256

- reboot device (works OK)
http://192.168.1.238/dev/info.cgi?action=reboot&reboot=Reboot

- set network settings (works OK)
http://192.168.1.238/dev/info.cgi?action=network&ipaddr0=10&ipaddr1=1&ipaddr2=0&ipaddr3=99&netmask0=255&netmask1=255&netmask2=255&netmask3=0&gw0=10&gw1=0&gw2=0&gw3=1

- reset to default (doesn't work)
http://192.168.1.238/dev/info.cgi?action=Reset&Reset=Reset

- this should set MAC address (untested)
http://192.168.1.238/dev/info.cgi?action=macaddr&macaddr0=yy&macaddr1=yy&macaddr2=yy&macaddr3=yy&
macaddr4=yy&macaddr5=yy

This was a dead end so I started hardware hacking.

Hardware

The mainboard contains two (probably custom made) chips. I guess one receives data from hdmi and encodes them. The other communicates over network, runs webserver and packetizes the stream. Let’s see the pictures:

PHOTO_20160611_093204 PHOTO_20160611_095005 PHOTO_20160611_094941

On the top side you can see two serial eeproms 25Q32 which are 32Mbit (4MB) flashes holding the firmware.

So I tried to extract the firmware:

PHOTO_20160611_121025The result is in this zip.

It contains lkvm-4M.bin file downloaded from the eeprom. This file has a few sections:

  • 0x00000000 – 0x00024e03 – SMEDIA02 …….456789ABCDEF 18.02.2016 14:44:42  (encoded – some strings suggesting bootloader)
  • 0x00080000 – 0x0016ee5d – SMEDIA02 …….456789ABCDEF 28.022016 14:44:47 (encoded – probably the main firmware)
  • 0x00250000 – 0x00250200 – some zeroes with some data
  • 0x00257e00 – FAT with webroot
  • 0x00367e00 – FAT with config
  • 0x003e0000 – MAC + 2 unknown bytes

I couldn’t decode the first two sections but they seem to be a bootloader and the main code. If someone is able to help with that I’d be very thankful.

But the forth and fifth section is interesting. They both contain valid FAT partition. You can see files from both in the zip.

One contains files available via web server (webroot):
./snapshot.jpg
./jedi.rom
./info.js
./backup
./backup/B
./backup/B/iptv.ini
./jquery.min.js
./user_login.html
./backdoor.html
./devmode.html
./iptv_info.html

iptv_info is the default page with firmware upgrade. Interesting file is backdoor.html which contains two iframes, one with iptv_info and one with small_view.html which I suspect to contain forms for setting stream parameters. Unfortunately, this file (small_view.html) doesn’t exist on fat partition and it is unaccessible when requested via web (probably removed from production firmware). devmode.html allows setting device MAC address. iptv.ini holds probably default configuration. Unfortunately it doesn’t contain info.cgi which is used for setting parameters – this is probably embedded into firmware.

Second FAT partition contains only single file:
./iptv.ini – this is the actual configuration (double square brackets because of wordpress):

[[tcpip]]
dhcp                           = n
autoip                         = n
ipaddr                         = 10.1.0.99
netmask                        = 255.255.255.0
gw                             = 10.0.0.1

[video]
hdmi                           = y
cvbs                           = n
videoin_res                    = 1920x1080_60P
videoin_frate                  = 60
videoout_fhd                   = 0videoout_hd=1videoout_brate_fhd=15000
videoout_brate_hd              = 12000
videoout_brate_sd              = 4000

[audio]
audio_type                     = 0_MPEG
audio_sprate                   = 48000
audio_brate                    = 128

[[rtc]]
rtcalarm                       = y
rtcalarm_h                     = 0
rtcalarm_min                   = 0

[[stream]]
udp                            = y
rtp                            = n
multicast                      = y
unicast                        = n
mcastaddr                      = 239.255.42.42
port                           = 5004

[[uart]]
baud_rate                      = 115200

[[user]]]
devicename                     = TX_008BC0095B64
name                           = admin
pwd                            = 123456


I think this is the key! If we know how to online edit this (without writing eeprom), I could probably change videoout_fhd to 1 or change used audio coder or video bitrate.

Serial port

You can see 6 pin header in the middle of board (J4). Voltage on pins is following:

  1. 3,3V
  2. GND
  3. 0V
  4. 2,7V
  5. 3,3V
  6. 0V

I tested all pins with USB-to-Serial TTL adapter, but valid signal was only on pin 1, you can see output here:

Rd 38ee
Rd 38ee
Rd 38ee
Rd 38ee
Rd 38ee
Rd 38ee
Rd 38ee
Rd 38ee
Rd 38ee
Rd 38ee
Mem Addr (0x3a6) 0
Mem Addr (0x340) 2a45
Mem Addr (0x342) 2b8a
Mem Addr (0x344) 1121
Mem Addr (0x346) 1
Mem Addr (0x348) a2
Mem Addr (0x34a) 38ee
Mem Addr (0x34e) 0
Mem Addr (0xb4) 22f8
[MY01]REG (0x005c): 8001
Timer Init
version: 7.1.2.0.11.20160218 ������
iic clock 200000 !
HDMITX I2C Read error, reg = 02
regDeviceID:0x7
---Disable HDMITx---
(382), threshold[0][0] = 0x4da, threshold[0][1] = 0x5b3
(382), threshold[1][0] = 0x40b, threshold[1][1] = 0x4c0
(382), threshold[2][0] = 0x67, threshold[2][1] = 0x79
(382), threshold[3][0] = 0xce, threshold[3][1] = 0xf2
(382), threshold[4][0] = 0xb53, threshold[4][1] = 0x3ff
audio queue_id: 1
video queue_id: 2
MPS_COMMAND_SET_CAPTURE_DEVICE 3 mode 5
MPS_COMMAND_SET_ISP_MODE 0
channel name: AIR_CH_521_6M
--xcpu init--
cmd info addr: 0x2c1eb18
ir data buf addr: 0x2c1f720
ir data write porinter: 0x2c1e928
[MY02]REG (0x005c): 8000
[MainLoop] *irdataddr: 0x2c1f720, *irwptrddr: 0x2c1e928
[MainLoop] irwptr: 0x2c1e928, irbuf: 0x2c1f720
alloc addr: 0x2C20C88, buffer start: 0x2C20C88
tsbitrate: 23751336
after setting: 0x8001, tsoDivider: 1, oriClock: 800, tsBitRate: 80000000, tsoMBitRate: 80
tso out byte rate: 10000000 Bps, null count: 0
pcrClockSrc: 0, pcrDivider: 4
oriClock: 800, clockDivider: 5, pllClock: 160.000000
pcr clock: 40.000000
Enable Hw pcr
tso.c(199), PCR clock : 40.000000 Mhz, regVal: 0xA0
set gpio 13
start write buffer: 0x2C20C88
injectBound: 1063, tso: 10000000, period: 20, injectTime: 1800
90K value per 188 packet: 1, tick in micro: 200
pcr Pid: 0x7D1
service 0: video: 0x7D1, audio: 0x7D2
PCR Pid: 0x7D1 is video pid
9919 Block = 1, (0)
change device ID(3)
Htotal = 2200, Vtotal = 1125, w = 1920 h = 1080, res = 6, fps = 4
Htotal = 2200, Vtotal = 1125, w = 1920 h = 1080, res = 6, fps = 4
Fire Capture and ISP Engine Device(3)!
AV_SYNC_TIMER_INIT -- baseTime = 0
RawVTotal = 3052 MCLK_Freq = 190000.000000 framerate = 59995
dur(17) frame rate(4) = (59995)
Frame rate 4
Encode w 1280 h 720 b 12000 deinter 0 0 fps 4
AV_SYNC_DO_SYNC_INIT Vid 66  Aud 49 FR 59995 FP 16 initDiff 0
First Out Video Timestamp: 316
encoder firmware string: 7.1.2.0.11.20160218
date: 20160218
threshold byte rate: 1228800, per frame size: 20480 bytes
[Debug] Capture Error State Code = 0x704
prev: 0, new: 1
Not Pull HPD
Reset Capture and ISP Engine Device(3)!
Htotal = 1840, Vtotal = 1080, w = 1680 h = 1050, res = 15, fps = 0
Htotal = 1840, Vtotal = 1080, w = 1680 h = 1050, res = 15, fps = 0
E:/lenkeng/case_code/ITE_Extender/FINAL_720P_IPTV_ENCODER_SDK/core/task_stream_mux.c(820), video is reset
pcrClockSrc: 0, pcrDivider: 4
oriClock: 800, clockDivider: 5, pllClock: 160.000000
pcr clock: 40.000000
Enable Hw pcr
tso.c(199), PCR clock : 40.000000 Mhz, regVal: 0xA0
set gpio 13
alloc addr: 0x2C20C88, buffer start: 0x2C20C88
tsbitrate: 23751336
after setting: 0x8001, tsoDivider: 1, oriClock: 800, tsBitRate: 80000000, tsoMBitRate: 80
tso out byte rate: 10000000 Bps, null count: 0
pcrClockSrc: 0, pcrDivider: 4
oriClock: 800, clockDivider: 5, pllClock: 160.000000
pcr clock: 40.000000
Enable Hw pcr
tso.c(199), PCR clock : 40.000000 Mhz, regVal: 0xA0
set gpio 13
start write buffer: 0x2C20C88
injectBound: 1063, tso: 10000000, period: 20, injectTime: 1800
90K value per 188 packet: 1, tick in micro: 200
pcr Pid: 0x7D1
service 0: video: 0x7D1, audio: 0x7D2
PCR Pid: 0x7D1 is video pid
Fire Capture and ISP Engine Device(3)!
AV_SYNC_TIMER_INIT -- baseTime = 0
RawVTotal = 309e MCLK_Freq = 190000.000000 framerate = 59628
dur(34) frame rate(14) = (29814)
Frame rate 14
Encode w 1680 h 1050 b 13500 deinter 0 0 fps 14
AV_SYNC_DO_SYNC_INIT Vid 133  Aud 100 FR 29814 FP 33 initDiff 0
First Out Video Timestamp: 333
threshold byte rate: 1382400, per frame size: 46080 bytes
Time error -- Modified PTS : add (-33) fc 161  Cur 0 Init 33
Time error -- Modified PTS : add (-33) fc 320  Cur 0 Init 33
Time error -- Modified PTS : add (-33) fc 479  Cur 0 Init 33
Time error -- Modified PTS : add (-33) fc 638  Cur 0 Init 33
Time error -- Modified PTS : add (-33) fc 797  Cur 0 Init 33
[Debug] Capture Error State Code = 0x87c4
prev: 0, new: 1
Not Pull HPD
Reset Capture and ISP Engine Device(3)!
Htotal = 1688, Vtotal = 1066, w = 1280 h = 1024, res = 15, fps = 4
Htotal = 1688, Vtotal = 1066, w = 1280 h = 1024, res = 15, fps = 4
E:/lenkeng/case_code/ITE_Extender/FINAL_720P_IPTV_ENCODER_SDK/core/task_stream_mux.c(820), video is reset
pcrClockSrc: 0, pcrDivider: 4
oriClock: 800, clockDivider: 5, pllClock: 160.000000
pcr clock: 40.000000
Enable Hw pcr
tso.c(199), PCR clock : 40.000000 Mhz, regVal: 0xA0
set gpio 13
alloc addr: 0x2C20C88, buffer start: 0x2C20C88
tsbitrate: 23751336
after setting: 0x8001, tsoDivider: 1, oriClock: 800, tsBitRate: 80000000, tsoMBitRate: 80
tso out byte rate: 10000000 Bps, null count: 0
pcrClockSrc: 0, pcrDivider: 4
oriClock: 800, clockDivider: 5, pllClock: 160.000000
pcr clock: 40.000000
Enable Hw pcr
tso.c(199), PCR clock : 40.000000 Mhz, regVal: 0xA0
set gpio 13
start write buffer: 0x2C20C88
injectBound: 1063, tso: 10000000, period: 20, injectTime: 1800
90K value per 188 packet: 1, tick in micro: 200
pcr Pid: 0x7D1
service 0: video: 0x7D1, audio: 0x7D2
PCR Pid: 0x7D1 is video pid
Fire Capture and ISP Engine Device(3)!
AV_SYNC_TIMER_INIT -- baseTime = 0
RawVTotal = 304e MCLK_Freq = 190000.000000 framerate = 60014
dur(17) frame rate(15) = (60014)
Frame rate 15
Encode w 1280 h 720 b 13500 deinter 0 0 fps 15
AV_SYNC_DO_SYNC_INIT Vid 66  Aud 49 FR 60014 FP 16 initDiff 0
First Out Video Timestamp: 316
threshold byte rate: 1382400, per frame size: 23040 byt

I expected pin 3 or 6 to be serial RX but it didn’t respond.

Network

I scanned all TCP ports on the device and found these are open:

Starting Nmap 7.01 ( https://nmap.org ) at 2016-06-12 14:53 CEST
Nmap scan report for 10.1.0.99
Host is up (0.0047s latency).
Not shown: 65531 closed ports
PORT     STATE SERVICE
80/tcp   open  http
7000/tcp open  afs3-fileserver
7002/tcp open  afs3-prserver
9001/tcp open  tor-orport

Nmap done: 1 IP address (1 host up) scanned in 6.03 seconds

I was able to open TCP session to 7000, 7002, 9001 but the device doesn’t send any identification on any of them and doesn’t respond on any input.

Next, I’ll try on to find out how to change streamer settings via http. If you want to help, try to decrypt the firmware or analyze the webroot files to discover the protocol.

I’ll post any results later. See you.

Update 14. jun 2016

I discovered some new http urls:

- this one successfully set video bitrate but unfortunately, still no fullHD

http://192.168.1.238/dev/info.cgi?action=videoinfo&hdmi=y&cvbs=n&videoin_res=1920x1080_60P&videoin_frate=20&videoout_fhd=1&videoout_hd=0&videoout_brate_fhd=30000&videoout_brate_hd=40000&videoout_brate_sd=4000

- this one successfully set destination IP (even to unicast one) but only until device reboot :(

http://10.1.0.99/dev/info.cgi?action=streaminfo&udp=y&rtp=n&multicast=y&unicast=n&mcastaddr=239.255.43.43&port=5004

Today I’ve also got a firmware upgrade package from ebay seller. It seems it flashes iptv.ini in config partition so it might be possible to change video/audio/network settings by modifying this firmware file!

Will test it during the weekend. Stay tuned!

Update 5. jul 2016

Last days I’ve had some heavy communication with the e-bay seller about reseting the device. I managed to get a few firmware upgrade packages from him but none have reset the device configuration file to default. I also tried manually change the contents of the file in config partition but the device always screwed the content after reboot somehow. On the other side, with these changes I managed to get that full resolution I wasn’t able to get before (I don’t know how…).

So far, I haven’t tried to upgrade to the latest firmware because I’ve just got it today and meanwhile I’ve happen to damage the flash chip (it’s read-only now). So for now, I’m waiting for the replacement spi flash.

Btw, I’ve also bought a soic clip to easily flash the device:

soic-clipWe should be able to change the config file easily by modifying firmware upgrade package and upgrading it but it seems to have checksum in last 4 bytes of the file. If you are willing to help, you can try find the algorithm used for computation of these 4 bytes:

lkv-checksum

Iptables rule

If your ffmpeg breaks after receiving zero length MPEGTS packet, try adding this iptables rule:

iptables -t raw -A PREROUTING -p udp -m length --length 28 -j DROP

Update 14. dec

Great news! One of my reader (huge thanks to ftp21!) has got an alternative fimware for different device but with the same chipset. I was able to flash it to my device as usual and it works! This firmware contains full settings via web interface, there is a windows app for changing settings and finally: changed destination IP PERSISTS AFTER REBOOT.

Quick howto:

  1. Install FW from usual source (folder IPTV_command_library_and_tool_20160303/TX)
  2. Connect device and your PC to the same network with DHCP
  3. Run IPTV_Control_Center.exe and hit Start Scan (your extender should be detected)
  4. Change to Tx Setup Page and select your device, you will see this:
  5. Write down the IP in right top corner.
  6. Hit Factory Reset to reset login settings to default
  7. Open Device IP in your browser and login as
    user: admin
    pass: 123456
  8. Now you should see this screen. You can set the same settings as in app here, e.g. bitrate, downscale, IP, etc.:
  9. But to set your unicast destination you need to use following URL:
    http://DEV_IP/dev/info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=DST_IP
    e.g.:
    http://192.168.0.87/dev/info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=192.168.0.227

    Maybe some other settings can be changed in this FW version too, I’ll post update when I find out more.

And it also supports more suitable resolution 1920×1090:

Update 31. jan 2017

Hi all!

turtleish (thank you turtleish, others see comments for more) discovered telnet interface in latest firmware (IPTV_command_library_and_tool_20160303/TX). You can simply reset device to factory defaults without messing with crappy Windows utility like this:

$ telnet 192.168.0.73 9999
Trying 192.168.0.73...
Connected to 192.168.0.73.
Escape character is '^]'.
==============================
========IPTV TX Server========
==============================
input>list
set_group_id        get_group_id        set_dhcp            get_dhcp           
set_uart_baudrate   get_uart_baudrate   set_static_ip       get_static_ip      
set_mac_address     get_mac_address     get_lan_status      get_hdcp           
get_video_lock      get_ip_config       set_session_key     set_device_name    
get_device_name     set_video_bitrate   get_video_bitrate   set_downscale_mode 
get_downscale_mode  set_video_out_mode  get_video_out_mode  set_streaming_mode 
get_streaming_mode  get_fw_version      get_company_id      factory_reset      
reboot              list                exit                
input>factory_reset
Processing factory reset!
System will reboot after few seconds!
Connection closed by foreign host.

After googling some commands, I found this manual which explains many telnet commands and features of similar device from Hall Research: http://www.hallresearch.com/files/manuals/HHD264.pdf
Product info here: http://www.hallresearch.com/page/Products/HHD264-S

There are not much more settings available compared to the web UI except one interresting command: set_session_key . This should “Set session key for encryption”. I tried to set it to zeroes but don’t have HDCP encrypted source at hand. Can someone please experiment with some default keys (0x0000, 0xffff, 0x1111, …) to see if it removes encryption with HDCP secured sources?  Thank you for all your support guys!

$ telnet 192.168.0.73 9999
Trying 192.168.0.73...
Connected to 192.168.0.73.
Escape character is '^]'.
==============================
========IPTV TX Server========
==============================
input>set_session_key 
======Invalid Input - Command Format is======
set_session_key [0xhhhh(1~32)] 
=============================================
input>set_session_key 0x0000
Ok
input>exit
Good Bye!!!
Connection closed by foreign host.

 

220 thoughts on “New version of Lenkeng HDMI over IP extender – LKV373A (Update 31. jan 2017)”

  1. Can more than one device receive the stream at the same time? Have multiple computers running VLC each receiving the stream from the one source?

    1. Yes. For best network performance, you should use switch with IGMP snooping to stop broadcasting the stream to whole network.

  2. What about LKV383 “HDbitT” version also sold as monoprice “bit-path”? Any plans to test it?

    1. I acquired a pair of the LKV383 HDbitT ones. The built-in webserver on the sender reports:

      Version :4.0.0.0.20160131
      Encoder Version :7.1.2.0.11.20160131

      The stream is 1316 byte packets. Running vlc udp udp://@239.255.42.42:5004 reports a 1280×720 video stream but VLC does not display anything (just a black box).

        1. Sources were a Macbook with a thunderbolt-HDMI adapter and another laptop with a VGA-HDMI converter (https://www.amazon.ca/gp/product/B017OZRCZO/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1) as the input – I don’t think it should have HDCP.

          As an aside, I found that the LKV383 will pass through video at 800×600, 1024×768 and 1280×800 without scaling. It accepted and converted to 1280×720 all of 1280×960, 1440×900, 1280×1024, 1680×1050 and 1920×1080. 640×480, 1152×864 and 1600×1200 produced a “Resolution not support” message.

  3. >1728×1080@30fps

    your screenshot actually shows 1728×1090 @30fps 🙁
    WTF, why would they scale in both dimensions? and more importantly could this be modified in this box firmware?

    1. + why is there interlacing on your pictures? does it really produce interlaced picture or was it the source

  4. Looks good… but what about audio support? One of the main problems for me with these types of encoder is the lack of multichannel audio support. Whilst the Lenkeng site says multichannel input is supported it also suggests that audio is down converted to stereo… is there a way to push multichannel audio through the 373A units?

  5. This is really cool. Trying to dream up a usecase but the fact it’s RTP gives it some possibilities for usage with a softswitch such as Asterisk.

  6. Nice work Dan. I’m waiting for mine to arrive in the mail and once it’s here I’m keen to have a crack at the web/config side of things.

    I find the multi/unicast option interesting. Would be nice to use it unicast.

  7. Hi,
    Great work danman! Perhaps the setting of video modes is not working because of incorrect field values in the URI? I’ve done a quick parse of the lkvm-4M.bin file through strings, and the supported framerates are given as [0,24,25,30,50,60] – in your URL, you set “20”?

    I’m waiting for my device to arrive (probably another week yet), but I’ll keep looking through the binary code to see if anything leaps out at me.

  8. Does anyone know how to get the stream to work in XBMC/Kodi? I have tried a .strm file with each of the following:
    udp://239.255.42.42:5004
    udp://239.255.42.42:5004/
    udp://@239.255.42.42:5004
    udp://@239.255.42.42:5004/

    The stream works in VLC using udp://@239.255.42.42:5004

      1. Thanks Neil, I will have to give it a try, I don’t currently use tvheadend. I was hoping it would be a bit easier. Also need to upgrade my switch with one that has IGMP snooping as it destroys the wireless side to my network.

  9. @danman – my unit seemed to only output 720p as well… until I fed it a “proper” stream. Using an RPi as the input on a static screen, the 373A unit only output 720p; using a Sky+HD box I get 1080p every time.

    Now if only I could figure out how to support the 5.1 Dolby audio on input, I’d be laughing.

    1. These units seem to be VERY finicky about input format. I’m trying to feed it with a Sony A6000 at the moment.

      With the “original” 4.0.0.0 (June date, UDP default), I would get corrupted 720p video.

      Now I get 1728×1088 video. With my current network setup, I need to force it to unicast:
      wget “http://192.168.2.29/dev/info.cgi?action=streaminfo&udp=n&rtp=y&multicast=n&unicast=y&mcastaddr=192.168.2.100&port=5004”

      (while the parameter is mcastaddr, it seems to switch it to unicast that works)

      1. The following changed resolution not to 1920×1080, but to 1280×720:
        wget “http://192.168.2.29/dev/info.cgi?action=videoinfo&hdmi=y&cvbs=n&videoin_res=1920x1080_60P&videoin_frate=30&videoout_fhd=1&videoout_hd=0&videoout_brate_fhd=30000&videoout_brate_hd=40000&videoout_brate_sd=4000”

        I’ve tried changing videoin_res to multiple values with no success so far. Same for changing videoin_res to 0 (from the config file in the PKG) and videoout_res to 1920x1080P

    2. OK, found some interesting behavior with videoout_fhd:

      No matter whether this was 0 or 1, no matter what videoout_hd was set to, the bitrate always matched videoout_brate_fhd

      Setting videoout_fhd=0 and videoout_hd=1 caused me to get 1728×1088 video

      So I stopped touching videoout_hd and started trying videoout_fhd at varying values.
      0 = 1728×1088 video (display resolution of 1728×1080)
      1 = 1280×720 video (display resolution of 1280×720)
      2 = 720×480 video (display resolution of 720×480) – Note that this is NOT scaled to a 16:9 aspect ratio, it’s square pixels. I haven’t yet determined if it’s cropping or scaling the input yet.

      I suspect videoout_hd is only used when the input signal is 720p, and videoout_fhd is always used for a 1080p input.

      I am unable to change the framerate to anything but 29.97 fps – even though I’m 90% certain the camera is outputting 24p

      1. Thanks for sharing your findings. Which FW version are you on? Can you please provide flash dump? Because what you describe, doesn’t work for me… :\

        1. For some reason I can’t reply to your original comment – I don’t have a dump at the moment. However my original flash appears to have been identical to the one you dumped. In my experience, “downgrading” to the November build seems to work better.

          I have, however, observed that if you drop the bitrate way down and into 720×480 mode, you start getting frequent corrupt packets/audio dropouts. Seems to be OK in 1280×720 mode.

          Also, in your case, some of your issues MIGHT be a function of input resolution. I think the output resolution is determined based on the input resolution provided, and if the unit thinks that you have HD instead of FHD input, it may behave differently. I noticed in a few cases you had 1680×1050 and 1280×1024 inputs in the serial log?

          Probably, for certain input resolutions, videoout_hd changes settings instead of videoout_fhd… Unfortunately my current source doesn’t do anything less than 1080i – and the LKV373 does NOT like when that source is in 1080i mode.

          1. Hello Entropy512,

            I’ve just got firmware from 20160722. Would you please mind testing it? I don’t have my unit at hand at the moment. The file is on google drive with others.

      2. could you post your full working command for setting video size and bitrate? I want to setup a simple html interface to set commands (resolution, bitrate, static ip, destination) and then send to device

  10. I have just flashed the firmware upgrade package you linked onto one of my newer HDMI extenders which previsously used UDP, it now does RTP streaming.
    *hmm* need to figure out what kind of file format is used there.

  11. You got me interessted.

    But getting the LKV373A is difficult in Germany plus I’m not even sure if I can import this due to safety regularities and other stuff with electronic devices. But I could easily get a LKV372A (notice the “2” before the “A”). Do you know anything about the LKV372A that you could share with me?

    1. LKV372A doesn’t have ethernet port. It only support cat6 cables as transport medium because they have good electrical characteristics.

      1. Wait WHAT? That’s not Ethernet on the 372? Maybe that’s why it isn’t working (Well it isn’t working with itself either…)

        1. Exactly. I think they use just some amplifier to boost the signal but it will not work over network. also they claim 60m range, while with ethernet it should be 100m (per segment). It would be interesting if you can post some photo of the mainboard.

          1. I already sent it back for a return. I don’t have any CAT6 so I wasn’t even able to get it working by itself. Gonna pick up the 373A when the money credits back.

  12. Hi, are those files actually upgrades or downgrades because the stock firmware is dated 20160218 (2016-02-18) but the ones in the download are dated 20151130 (2015-11-30) and 20151028 (2015-10-28). Do you have any way of getting back to the firmware it came with?

    1. Hi,
      I’m still communicating with the seller about the firmware so I hope he will provide some more recent firmware. I also have dump from the original firmware but it needs spi programmer to restore.

      1. If anything, the older firmware (despite being “3.0.0.0” instead of “4.0.0.0” seems to work better.

        Flashing the 20151130 package reverts the unit to behaving similar to the one you originally used – RTP instead of UDP, and an “odd” resolution.

        Stream metadata and also the PKG file contents indicate that ITE Tech is somehow involved – http://www.ite.com.tw/ – It appears the PKG files are created with some custom tool, ITEPKG. I suspect many firmwares are basically the same but with different contents for configuration in the PKG file.

  13. Hi, running blu ray through a splitter (that is meant to strip LKV373A through a splitter (that supposedly strips HDCP) but I get either a grey screen or a resolution not supported. Anyone had any luck ?

  14. .. lol messed up previous post. Apologies!

    Hi, running blu ray through a splitter (that is meant to strip HDCP) to the LKV373A but I get either a grey screen or a resolution not supported. Anyone had any luck ?

      1. I can’t get it working at the moment, I have a Chromecast plugged into the TX box. Link light is solid but when I plug it into my computer (NetworkManager set to share the Ethernet connection) I don’t see it connecting at all. Post says it should pull DHCP.

  15. Does the firmware upgrade help with the Delay? V2 100ms was much better, also I am getting a random white noise screen randomly with v3 even with sender to receiver that I did not get with v2

  16. Hi danman,
    I got hold of the 373A v3 myself, for some reason when I plug it in it jams up the entire network! The WiFi drops off completely, other ethernet connected devices can’t communicate at all! It’s like it’s being flooded to death by the multicast traffic.
    Have you seen this yourself?
    Any ideas how I could stop it doing it? I’m thinking turning off the multicasting. I dont suppose you could show how to set it up for unicast only?
    Thanks!

      1. Thanks for the response guys. I’ll give the unicast reconfig trick a go, as I dont have anything that would snoop IGMP.
        Today I got a rather awesome HDMI splitter which does a great job stripping the HDCP off the stream, now my Sky HD box works thru it, and I can plug it into my TV AND rip the stream at the same time!
        Sweet!

  17. Hi,
    I received my LKV373A yesterday, but I still have to wait for my EEPROM reader/writer.
    I the meantime I’ll try to dump with my buspirate.
    Which flash did you dump exactly ?
    I will try to flash file jedi.rom on the eeprom because it might be part of an internal debricking system.

    1. He links here and makes numerous references to danman’s work – However he does not appear to be talking about the version discussed in this article, but the v2 predecessor.

      v2 was very similar to the v1 units danman covered a while ago, except the logic to trigger transmission was different. Looks like he figured out the “magic trigger” for v2.

      Quite a few people (including myself) ordered “new” units after reading danman’s original post here, and wound up getting v2 units and not v3 units. danman’s original work wouldn’t trigger transmission from the v2 units.

  18. You mention trying pins 3 and 6 looking for serial RX. Suggest trying pin 5 or perhaps 4, remember your basics of rs232, high is idle, low is a start bit so the serial input would almost certainly have a pullup on it to stop a constant stream of NULLs that also throw a framing error or be read as a break when the stop bit didn’t appear.

    About to order one for myself so hopefully I can try it myself in a few weeks.

  19. I got my soic clip and my CH341A before I had time to try with my buspirate. It seems that my CH341A (or my USB port) does not provide enough current to power up the 25Q32 : in dmesg I had “device disconnected” when attaching the soic clip. Therefore I tried while powering the TX unit with it’s power adaptater : it works, but only if I press reset right before (probably because the firmware is already using the chip).
    Have you seen such powering problems ? Would a big capacitor solve my problem ?

    I did dump the two 25Q32 and it seems that the ASICs are doing some kind of log : the sha1sum is different between two reboots. I will try to make a binary diff to see the changes.

    1. You should unsolder and lift Vcc pin when connecting programmer to not power the main chip. You are probably getting different images because the communication is distorted by the main chip. I solved it by adding a diode on power pin, see here: https://blog.danman.eu/wp-content/uploads/2016/07/PHOTO_20160709_173349.jpg Now I can read/write the flash without desoldering it when the board is disconnected from everything (power, HDMI, net) without any problem.

      1. I had not understood that I was powering the main chips !
        Nice idea about the diode, I’ll try that.

  20. Hey great work so far, I had a question:

    “On the other side, with these changes I managed to get that full resolution I wasn’t able to get before (I don’t know how…).”

    Does that mean FullHD@60Hz? It’s not very clear what quality you’re getting with what firmware version on what version of the hdmi over ip device. What device would you recommend? And what does the latency look like (not super important to me but im wondering if the change in resolution/(firmware/)version for example changes the latency.

  21. I added a switch on the Vcc pin of the main 25Q32 , it allows me to read the flash without powering the main ASICs. Yet I still see the checksum changing between two boots. A binary diff yield strings that look like logs of the serial console.

  22. What parameters did you use to connect via serial ?
    115200 baud/s seems to be the speed but neither screen 115200 nor screen 115200 8n1 display line feed correctly.

    1. I logged my GNU Screen session with Ctrl-a then :log on, and when opening the log file with cat or vim the line feeds display correctly.

      1. Thanks for the flash dump. They differ from mine only in mac and config partition. For serial I used minicom with these settings (not sure which one did the trick):
        P – Add linefeed : Yes
        R – Line Wrap : Yes
        T – Add carriage return : Yes

  23. (Sorry for multiple posts)
    – The two jumpers (one close to the reset button, the other to the HDMI’s 25Q32) do not seem to have any effect on the serial log. They are probably something else than jumpers
    – If I plug my USB-to-serial-TTL TX pin into pin 5, the boot stops at line : ir data write porinter: 0x2c1e928. We should try to see which protocol is related to pin 5 (“I2C” appears in the serial log).
    – Having an ethernet connected does not seem to modify the serial log
    – If I unplug the ethernet flash shortly after boot, it keep on booting as if everything was normal : the binary section of the flash must be decoded and then loaded in RAM.

  24. I run a local user group and I was looking for a cheap way to include the slides into my video. I use an HDMI splitter and the LKV373a V3 to intercept the beamer signal.
    It works like Danman described it here, but sometimes I get trouble after 1 minute of video streaming.
    It seems that ffplay starts to drop large parts of the incoming packages and does not get any video frames any more.

    See for the output https://gist.github.com/arBmind/e0f63508f8036f89005574f4e6091df1

    Did anyone experienced the same issue?

    1. I’ve only seen that sort of behavior (large numbers of corrupt/dropped frames) when using extremely low bitrates and 480p

      I was using a raspi to transcode audio to AAC and video to a much lower bitrate and used the setup to livestream for 2-2.5 hours almost continuously last night – all interruptions were on the output RTMP side, not the input from the LKV373A.

      1. Nice, so either my TX unit is faulty or you were lucky. Sometimes it works here as well. But I could not figure out what is wrong. It seems to depend on the video source or the temperature.
        Playing around with VLC seems to support the fact that the frame timings are wrong which leads to synchronization issues with other streams.

  25. Hey, pretty cool 🙂 Are you aware of any product that would do the same (VIDEO encoder to RTP ) but that supports full HD? I was searching also for more “professional” products but no luck 🙁

    There are many professional extenders, but my objective is to capture the stream and embed it in a software I’m writing (basically the video would be inside my app).

    If you have any idea let me know!

  26. Great job!

    I just purchased the sender . vlc is asking for a sdp file. Can you help help with the command lines you are currently using along with the versions needed?

  27. I’m getting the same – SDP required:
    A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (7).

    VLC version 2.2.4 Weatherwax

    HDMI extender V3.0
    Version :4.0.0.0.20160722
    Encoder Version :7.1.2.0.11.20160722

    Does anyone know how to fix this?
    Many thanks,
    Giles.

    1. Giles, I see your version is dated 22 July. Was yours shipped with that version or did you upgrade from somewhere?

      Mine is:
      Version :4.0.0.0.20160218
      Encorder Version :7.1.2.0.11.20160218

      It works well streaming to vlc (not completely error free but the few errors dont seem to cause any problems) but ffmpeg throws errors and chokes immediately no matter what I do.

        1. Could you post the ffmpeg line you’re using? I’m guessing that the box uses an mpeg audio codec that’s not supported in FLV container, so you will have to do a bit of transcoding or try to switch to AAC using info.cgi (if it works) first.

  28. i was try like this ffmpeg -i udp://239.255.42.42:5004 -vcodec copy -codec:a aac -b:a 128k -f flv rtmp://…….
    but ffmpeg not understend codec……

    how swich to aac?

    1. You are mixing two types of notation:
      -vcodec / acodec
      -codec:a / codec:v
      You should try which one works for your version of ffmpeg.

      1. oh… Now I see I also did that… Either way, you should test which one works for you. Obviously, for me they both work.

  29. Is there a way to minimize the latency? I’ve installed the system with the transmitter and receivers, and need to use the system to transmit live video to 20 tv’s. I’m not sure which syntax to use. I have a feeling the settings won’t be persistent?

    Thanks in advance!
    Clint

  30. Hi Dan,

    I’m using WireShark, and I’m getting a mix of UDP (length 60) and MPEG TS packets. Playing the stream in VLC as UDP, but only got black screen

    I’ve tried to access the TX Server on http://192.168.1.238/, but it’s can’t seem to find the page (I can’t ping it either)

    I’m really new to analysing packets, would you have any pointers on how I should proceed on this?

      1. Lincoln Reiss
        19. OCTOBER 2016 AT 15:33
        Thanks for your really quick reply! I’m testing with the output of a WiiU, which is HDCP-free, so I’m thinking VLC might not be able to process the packets properly?

        The MPEG TS seem to be 1358 in length, which is longer than anything I’ve read through here so far? Or maybe I’m reading it wrong?

        [21 0.006303 192.168.1.238 239.255.42.42 MPEG TS 1358 5004→5004 Len=1316]

      2. Hey Dan,

        I just purchased this unit from eBay, and I’m also getting MPEG-TS packets of length 1358 interspersed with empty UDP packets. VLC plays the video but the audio is garbage, just sounds like a fast series of ticks.

        Also, ffmpeg doesn’t recognize the stream at all. I actually get a different error message each time I try, usually:

        Could not find codec parameters for stream 0 (Video: h264 ([27][0][0][0] / 0x001B), none): unspecified size

        Could not find codec parameters for stream 1 (Unknown: none): unknown codec

        Interestingly enough, if I remove the empty UDP frames from the pcap and play it back with tcpreplay, ffmpeg no longer crashes but it also does not produce any output, it does not produce any packets on the network at all that I can see.

        If you have any insight into the audio or ffmpeg issues I’d be interested in figuring this out.

        1. Well, I solved my FFMPEG problem by just inserting an iptables rule that drops the empty packets. Now I have FFMPEG pushing the frame back out to 1920×1080 and republishing. Still no audio, although I tried a few other sources and it’s about 50/50 whether the audio works or not. Could be an audio channel/format thing with the sources. I’ll have to play around with it some more.

    1. Ok, I found the v3.0 pdf on your Google Drive, and I now have access to the TX Server. The Version and Encoder version seem to be more up to date.

      Which Version did you get the RTP stream running on natively may I ask? I might downgrade the Firmware, as I’m just looking for a 720p stream

      1. Thanks for your really quick reply! I’m testing with the output of a WiiU, which is HDCP-free, so I’m thinking VLC might not be able to process the packets properly?

        The MPEG TS seem to be 1358 in length, which is longer than anything I’ve read through here so far? Or maybe I’m reading it wrong?

        [21 0.006303 192.168.1.238 239.255.42.42 MPEG TS 1358 5004→5004 Len=1316]

          1. The TX Sender is on
            Firmware Version :4.0.0.0.20160722 and
            Encoder Version :7.1.2.0.11.20160722, which could be why it’s sending MPEG-TS instead of UDP?

          2. Thank you for testing that! I’ve tried disabling my firewall, and removing WiFi connection, etc, but haven’t gotten anywhere. But this means it must be an environment issue, so I’ll do some further testing on my side, and let you guys know if I find what the exact problem is!

  31. Hi, looking around i found multiple similar devices that had almost the exact same web interface, and the manuals to some of these referenced a “IPTV Control Center Tool”, after some searching I eventually found it on the following page http://www.foxun.com/product_detail_735.html direct link -> http://img.keyizi.com/MySpace/28/Content/1/IPTV_Control_Center.rar. I have tried it and it finds my TX device and displays all its information, I have been to scared to make any changes though as I have no way of restoring mine is something went wrong.

    1. Nice catch, man! I don’t have my TX at hand but I’ll definitely test this soon! I was hopping that the app would be able to set audio codec or destination address params but I don’t see such options there. But it still may be abe to replace the whole ini config. I’ll have to look at it closely. Thanks again!

    2. This control center check RX/TX by send an UDP packet on port 9002 with Payload “IPTV_CMD”.
      I try an UDP relay but not work with LKV 🙁

  32. Hi. I got extender LKV373. And after flashing it with 2015date firmware, i`ve lost it. Now there is no activity in wireshark, when i`m turning it on. Is there any procedure to recover it?
    Thanks/

  33. Thank you a lot. I`ll search for programmer. But i have a lower version of LKV – without “A” index in the end. At the bottom of my unit i see “Version 2.0”. Do you have extracted firmware for this one?

  34. Hi,

    I have 2 questions, if you could help me.

    1) How I can play the stream from raspberry pi?

    2) Can I put 2 LKV373A Transmitters in the same network, to stream 2 different setboxes ?

    Thanks in advance

    1. 1) I guess that with some HW accelerated player (I don’t know what people use these days… omxplayer?)
      2) Yes, but you should change IP address of one of those transmitters or use DHCP server to be able to differentiate between sources. In ffmpeg then you can do it like this: ffmpeg -i udp://[multicast-address]:port?sources=address More info here: https://www.ffmpeg.org/ffmpeg-protocols.html#udp

  35. Thank you very much for your work,
    My boxes are marked v3.0 on the sender/receiver and the sender has this version:
    Version : 4.0.0.0.20160615
    Encoder Version : 7.1.2.0.11.20160608
    I got the error:
    cannot join multicast group: No such device
    solved adding the route:
    sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
    and I had to disable my iptables (firewall) but I have quite aggressive policies so its’ ok, I’ll troubleshoot the rule blocking the traffic.
    after that the bare command:
    vlc udp://@239.255.42.42:5004
    worked well for the test I done today.
    thank you again to everybody working on this little box

  36. Hello,
    I bought a pair of LKV383 with ir Remote and with some experiments i can say that if pair can reacheable on the same network RX can send ir codes. I suppose that the open ports are for IR send.

  37. Thank you so much for this. I just ordered one now, and I’m very excited. So the idea- lenkeng device to USB Ethernet adapter to Raspberry Pi B
    Raspberry pi forwards UDP stream to our studio, plays out via OMXplayer. I saw that you were able to set the bitrate by:
    http://192.168.1.238/dev/info.cgi?action=videoinfo&hdmi=y&cvbs=n&videoin_res=1920x1080_60P&videoin_frate=20&videoout_fhd=1&videoout_hd=0&videoout_brate_fhd=30000&videoout_brate_hd=40000&videoout_brate_sd=4000

    I want to use HDMI source from Sony a6000 (it outputs 1080i 60fps), I am hoping that the device can downscale input to 720p 60fps and set bitrate of 2000kbps. Is this possible? Any step- by- step instructions on sending the command to device?

    1. So it came in the mail and I bricked it all in the same night =D Ordered another with 1 day shipping. I’m not sure why, but I was unable to get the video stream from it. I unhooked all internet sources, hit tcpdump and saw the network traffic, 1316 packets so I tried to put in vlc udp://@239.255.42.42:5004 and got nothing but errors. Then I set the network and disabled firewall like matteo- and now vlc would open, but no info- it just sat there. I then looked at firmware images and found the chinese guide on flashing. Set manual IP address, and was now able to point browser to firmware page. I was running a newer firmware that ended in 722, so I figured I would downgrade to the pkg ending in 612. After “upgrading” the pkg, a prompt came on to reboot the device so me being stupid, pulled the power. Now only the green light comes up and no info over tcpdump. Live and learn. Can anyone share some step by step instructions on use/ firmware flashing?

      1. New box received today and tested, it’s giving great 720p video from the udp on vlc. I hope that we can get a write up of commands that work with the device. I’m having some trouble getting the video into avconv
        avconv -i udp://239.255.42.42:5004avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
        built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
        [h264 @ 0x85d340] non-existing SPS 0 referenced in buffering period
        [h264 @ 0x85d340] non-existing PPS referenced
        [h264 @ 0x85d340] non-existing PPS 0 referenced
        [h264 @ 0x85d340] decode_slice_header error
        [h264 @ 0x85d340] no frame!
        [mpegts @ 0x845920] Could not find codec parameters (Video: h264)
        [mpegts @ 0x845920] Estimating duration from bitrate, this may be inaccurate
        Guessed Channel Layout for Input Stream #0.1 : stereo
        Input #0, mpegts, from ‘udp://239.255.42.42:5004’:
        Duration: N/A, start: 554.098000, bitrate: 192 kb/s
        Program 256
        Metadata:
        service_name : AIR_CH_521_6M
        service_provider: ITE
        Stream #0.0[0x7d1]: Video: h264, 90k tbn
        Stream #0.1[0x7d2]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
        I will be testing with gstreamer as soon as possible.

        1. I get those sorts of error messages with ffmpeg. Try dropping the empty packets with the iptable rule mentioned in an update near the top (it helped with my ffmpeg crashes but still have problems with video):

          Iptables rule

          If your ffmpeg breaks after receiving zero length MPEGTS packet, try adding this iptables rule:

          iptables -t raw -A PREROUTING -p udp -m length –length 28 -j DROP

          1. sudo iptables -t raw -A PREROUTING -p udp -m length –length 28 -j DROP
            [sudo] password for guideus:
            Bad argument `–length’
            Try `iptables -h’ or ‘iptables –help’ for more information.

          2. @Joshua Lee should be two dashes “-” before the second word length. I think the page blog software is converting the double dash into a longer single dash. I will try as code block:
            `iptables -t raw -A PREROUTING -p udp -m length –length 28 -j DROP`

          3. @Joshua Lee – didnt work the page comments are not accepting markup. See the command line about one third of the way down from top of page just before section “Update 14. dec”

          4. Yes, I was able to fix. Thanks for this. I was able to restream to rtmp server and was able to re-stream to udp. Wonderful device. I also found that if I set the source to 1080i, it gives fullHD (in its own strange resolution) Just trying to figure out how to set the device on the network and let my friend access the udp stream. Any info is helpful, thanks for your replies!

  38. For those suffering from some dropped packets with VLC. I found I had to increase the networking cache to between 8000ms and 16000ms. This provides about 8 to 16 seconds of video buffer, in case some udp packets get dropped. I haven’t figured out the magic formula to get VLC to ignore the dropped UDP packets entirely like you can with ffmpeg.

    vlc –network-cache 16000 udp://@239.255.42.42:5004/

    I also got the best results once I added the following splitter to the chain.

    https://smile.amazon.com/gp/product/B0089DSLMY/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

    It seems to output a non hdcp source that this HDMI extender seems to like fairly well. Before this even with the hdmi output from the laptop being sent into the extender, video was getting corrupted. This splitter outputs a signal that the extender seems to handle better.

    Thanks for the article, @danman, saved me about $300 as I was about to buy a Magwell HDMI to USB 3.0 dongle.

    1. Hi ftp21,

      I installed that firmware and it works with my device. But I can’t login into settings page, it still shows “Login Failed, Please retry again!” Can you login with admin:123456 ?

      But what interests me more is possibility to set Unicast mode in app. Could you please get more info from your supplier, how does this work? Or get some documentation?

      Thanks for your effort!

      1. Ok i solve that problem.

        Connect with IPTV Control Center and reset to factory.

        Now user and password are admin 123456

        1. AMAZING! After reset I was able to set unicast destination and it PERSISTS after reboot! :))) Thank you!!! Will post update about this.

    2. When i open the case of RX and TX i see some unpopulated header.
      Pct-Max RX/TX have switch for resolution (????) i’ll try to connect with GND and i see changes on video output

    3. Hi, do you know what F/W your device was on originally? I’m nervous about bricking my device so I’d like to confirm it’s compatible.

      Also, do you have the original F/W or any other information?

      Thanks

      1. I have full original dump of my tx. And the device checks uploaded pkg and it won’t update unless the checksum is ok.

  39. I updated the firmware and was able to set the iptables rule, everything is working pretty well. Very nice app as well to set bitrate and static address. Question- how can I set this device on my network and forward a port to it? I have tried all variations of: wget http://192.168.115.234/dev/info.cgi?action=streaminfo&udp=y&rtp=n&multicast=y&unicast=y&mcastaddr=192.168.115.234&port=5004

    but still nothing. It still plays from 239.255.42.42:5004 and of course I can’t forward the router port to this address. Any helpful info?

  40. Hi again, and thank you to everyone who has been working on this device. This is really promising! I wanted to share my own- I installed ffmpeg and nginx (with rtmp) onto raspberry pi (running jessie). I use ffmpeg to capture and rewrap to flv, then send to nginx for rtmp stream to share. Command: ffmpeg -i “udp://@239.255.42.42:5004 live=1” -vcodec copy -acodec libmp3lame -ar 44100 -f flv rtmp://127.0.0.1:1935/live/live
    don’t use -re, I had a problem with long delay. All in all, 1.5 second delay in final output. If anyone has a way to directly set this device on the network and forward a port to it, please let me know! I wish I knew more about rtp/udp streaming.

    1. Hi Joshua,

      you can do it vice versa. Let’s say, your public server, where you will have your nginx is 1.2.3.4. You can set extender to stream to 1.2.3.4:5004. Then you will run ffmpeg on that server like: ffmpeg -i “udp://@:5004 live=1” -vcodec copy -acodec libmp3lame -ar 44100 -f flv rtmp://127.0.0.1:1935/live/live . And you are done. You don’t need to “connect from server to extender”. You can set your extender to stream directly to you server.

          1. wget “http://192.168.115.234/dev/info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=192.168.115.235:5004” doesn’t work, command sends fine: wget “http://192.168.115.234/dev/info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=192.168.115.235:5004”
            –2016-12-18 18:30:12– http://192.168.115.234/dev/info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=192.168.115.235:5004
            Connecting to 192.168.115.234:80… connected.
            HTTP request sent, awaiting response… 200 OK
            Length: 172
            Saving to: ‘info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=192.168.115.235:5004’

            100%[======================================>] 172 –.-K/s in 0s

            2016-12-18 18:30:12 (15.3 MB/s) – ‘info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=192.168.115.235:5004’ saved [172/172]

            But output still is udp://@239.255.42.42:5004
            Any clues?

          2. Sorry for delay, updates to the comments don’t show up in my email and I’ve been experimenting with openwrt on raspberry pi using my home network. I’m hoping to get a travel sized broadcast encoder using the lenkeng device, a network switch, and raspberry pi with bonded cellular modems. The last part is the hardest. (Atleast for me) I can confirm that the lenkeng device is working great to send video directly to server, I was able to stream across the network to our studio in Ohio. Please, if you can find the time, add an update to show all commands for the device. I am hoping to get some help to make a simple html page that someone can put all their broadcast settings, then save to bin/ash script on openwrt. This could then send this commands to lenkeng whenever it starts up. I can’t thank you enough for this development. These devices have many pending applications.

          3. Glad to read that. Maybe one tip for you… you could possibly use some generic router with USB (e.g. TP-Link they have many such) which supports OpenWRT. You would save one device in that case.

          4. I finalized my design idea to use just the raspberry pi and the encoder, then wifi for other devices to connect (to set the stream destination, etc) but I’m still working on the link aggregation. I wish there was a simple step by step guide for the raspberry pi on openwrt. I thought to use a compatible router but skipped due to size.

      1. In this example, is nginx necessary as I would assume ffmpeg is utilising port 1935 and sharing the rtmp stream? I’ve cracked the first part of this, so upgrading the firmware, unicasting to an arbitrary IP and viewing this via VLC, but my end desire is to make the stream available in Plex, TVHeadend or Emby. Any tips or pointers on getting this working?

        1. No, ffmpeg is remuxing and publishing it to rtmp server.
          Tvheadend should be able to receive the original multicast output and stream it to clients (eventually transcode).

    1. I guess they won’t provide it unless you are a big contractor buying dozens of their chips. But I’ll keep my fingers crossed for you 🙂

  41. Hi again Dan,

    I’ve just tried to follow the steps for your latest update (14 Dec), but I’ve had some issues. I’ve updated BOTH the Encoder Firmware and PKG Firmware, and set my ethernet IP back to auto (DHCP). But the IPTV isn’t finding anything, and I’m unsure what IP the Web server will be on now? Is there a way to restore the factory settings on the 373A, because I really hope I haven’t bricked these… Thank you for your help so far 🙂

    1. Ok, using Wireshark, I found the IP Source. I then changed my IPv4 settings to use that address as the default gateway. This let me access the IPTV web server on that address. But I still can’t rest username and password, as the IPTV Tool won’t detect the TX

          1. try to disable all other network adapter. one created by virtualbox blocked the tool from detecting my TX unit.

  42. Do all of the ‘firmware updates’ being discussed here to open the full web ui require a physical flash, or are there options via the web interface that will achieve the same with the recent developments? thanks, James

      1. Perfect, thank you for confirming this. I have received the following model: HSV373 with a v2.0 designation printed to the back, it looks identical to the LKV373. I have an LKV373A on order, but this will take some time to arrive, the HSV373 is with me now.

        Would you have any idea which device this is most close to? The 373A perhaps? Which firmware would you recommend for this model (if you could recommend based on this limited information)?

  43. Hi Dan,

    Could you list the environment specs you’re using, such as OS, network etc? I still can’t receive through VLC port 5004, and I can’t detect the device using the IPTV tool, and I think these might both be attributed to the environment.

    1. I found the simplest solution was to make sure everything was plugged in by Ethernet to the router or to a switch. You can then use tcpdump on ubuntu like this: “sudo tcpdump” and you’ll see the network traffic and on windows, use IPTV Control.

  44. @danman or anyone try to reverse IPTV_CONTROL_CENTER protocol? I want write a simple python script on my raspberry to send also IR codes

  45. …just wish to ask the same, how to send IR codes from pc to LKV.
    I used a cheaper hub to avoid HDCP and it streaming perfectly to all pc in my home, but not in wifi mode, only by cable…. strange!

  46. I have been working with both the LKV373a and LKV383.

    I haven’t had any luck connecting the LKV383. It is not recognized by any utility so I have moved back to the 373a.

    I am able to flash firmware from the Dec 14 post, reset settings, and login into the device with default username and password.

    I have tried to use the command you had posted for configuring unicast changing only the ip addresses with a cut and paste. No matter what I do it still continues to run in multicast mode. Do I need to change the option to disable multicast in the web interface before issuing the commands. I am kind of at a loss. I’ve been trying various things for over a week with the 373a.

    Please help…..

  47. I have LKV383 and the utility find it (if you have only one interface, since with multiple eth interface it use the first, which is often wrong) but the utility is not needed.

    I have uploaded the firmware with web interface and then LKV383 has worked without reset password step.

    Unicast string is often multicast but forwarded to another ip.
    Default setting is “push stream from transmiter to 239.255.42.42” which the ethernet switchs forward as multicast to all device.
    With the string it will be “push stream from transmiter to your ip” which the ethernet switchs forward only to that ip.

    But it is still in multicast mode.
    The real unicast mode is probably something like “pull stream from transmiter” but if activated in webif then we need to know how to ask on-demand stream to trasmiter.

    I have noticed that if the multicast-ip is not set (mcastaddr=) the result is “push stream from transmiter to 255.255.255.255 or your network broadcast address” which supplies a result similar to push to 239.255.42.42 (i.e. all node on network received the stream).
    I have not tried but it is possible that with this mode even wifi will receive it.

    I am interested too with how to use the IR sender , but unfortunately I have only LKV383 transmiter and so I cannot grab the traffic generated by LKV383 receiver

  48. I ran into a fun problem today. I upgraded to the latest firmware that danman and ftp21 via the web interface… but found that I couldn’t do a factory reset (no Windows Machine and IP_Control_Center doesn’t run under Wine), so I didn’t have the password or a way to update (downgrade?) the Encoder Firmware.

    I poked around a little and found that there’s a TUI listening on port 9999.

    $ nc 192.168.2.65 9999
    ==============================
    ========IPTV TX Server========
    ==============================
    input>list
    set_group_id get_group_id
    set_dhcp get_dhcp
    set_uart_baudrate get_uart_baudrate
    set_static_ip get_static_ip
    set_mac_address get_mac_address
    get_lan_status get_hdcp
    get_video_lock get_ip_config
    set_session_key set_device_name
    get_device_name set_video_bitrate
    get_video_bitrate set_downscale_mode
    get_downscale_mode set_video_out_mode
    get_video_out_mode set_streaming_mode
    get_streaming_mode get_fw_version
    get_company_id factory_reset
    reboot list
    exit
    input>factory_reset
    Processing factory reset!
    System will reboot after few seconds!
    $

    From the looks of it, you can manipulate things with a script instead of going to the “password protected” WebUI.

    1. Thank you! I did not find the device through IPTV Control Center ever I was using Windows. This works perfektly.

  49. From comments on a big store (a company which names starts with A 🙂 ) i read that there is a version which works with HDCP without using a HDMI Splitter.
    Some users confirm that they see some sat channels throught a pair of transmiter + receiver

    My transmiter with the same sat channels not works because HDCP present (but using hdmi splitter I have resolved).

    So the question is : there is a firmware version that do hdcp removing or hdcp works only if you have the complete set TX + RX ?

    Some time ago I had the LKV373 (model LKV373IR) and with it the HDCP was not a problem.
    But I had TX + RX, now I have buyed LVK383 TX only.

    1. RX can accept HDCP secured signal but it scrambles it before sending over network to preserve security. So HDCP works if you have complete set: data is sent scrambled via network and then descrambled in RX.
      But maybe there is some way how to turn it off or set the key to none. Maybe via telnet interface.

      LKV373 didn’t use any scrambling.

  50. Ok so we need someone with a pair of LKV383 (TX+RX) which grab for us the tcp/udp traffic from RX to reverse eng. the IR protocol

  51. Just to say thanks to all the people who worked on this. I got one of these today and it was relatively simple… I have it unicasting to VLC across the LAN.

    Only slight hiccup was when it is first plugged in it starts spewing multicast, and my LAN isn’t well set up for that (no IGMP snooping) so it killed my wifi. Using a wired connection to flash the firmware, then set it to unicast, fixed that…

  52. I got a little free time so I downloaded the firmware pkg of the device and opened in gedit. https://drive.google.com/open?id=0B3mWuDyxrXyKNXRuM2NsYkVJY0U

    After opening, I found that (duh) the webpage code is right there and could (possibly) be edited. Has anyone successfully edited the pkg file and with what software? (Gedit gives a bunch of scary errors) I want to simply edit the lines at 12466 to add checkbox for unicast and the address section to have an inout box where I can just type in an address I want to stream to.

    1. I tried but there is a checskum in the end of th file (4Bytes) and I don’t know how to calculate it. It won’t upgrade if it’s wrong.

  53. Any hints to changing the port?
    I want to use a few units all streaming to 1 machine but after this update I can’t change port anymore.

    Thanks for the awesome work so far everyone!

    1. try
      “http://your_device_ip/dev/info.cgi?action=streaminfo&rtp=on&multicast=on&mcastaddr=ip_address&port=yourport”

        1. update the firmware and encoder from Danman’s drive folder and then try again. I’ve also been getting issues with a new device ordered.

          1. It seems that the new firmware locks out the “port” function.

            Worse, rolling back the firmware doesn’t fix this, so if you need to use ports other than 5004, the new firmware kind of bricks it for you 🙁

            We want to run multiple devices into the same dest IP, so its screwed up that…. unless the port command has changed or there’s something we’re missing.

  54. Do you have the firmware/iptv tool for the LKV373IR?
    I can do a wireshark capture for the ir decoding if it works with this model.

  55. Hi all and congrats for the job !!!
    I don’t have enough time to work on but you can find some informations on IR in googling “hdbaset specification ir uart draft” .
    Hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *