Lorex

Did you follow the instructions here - Lorex

Another method - if trying to update using the "run up" command might be to try to update individual parts of the firmware one by one using this method - Lorex

I did compare and according to Lorex mine and yours use the same firmware. So one of the Dahua 4KS2 firmware versions should work for yours.

Also the firmware you are updating to is a very old one from 2017. That also might be the issue. The v164 Lorex firmware is from 2019 so it might be erroring out since you are trying to flash a much older version over a much newer version.

The most current 4KS2 version from Dahua is DH_NVR5XXX-4KS2_MultiLang_V4.002.0000000.6.R.221115.bin which I am running on mine now. The current versions do not have a single "update.img" file in them though so crossflashing directly to a current version would have to be done manually one file at a time.

I'd suggest maybe trying to go to a later version than the Lorex version. It looks like Dahua also stopped including the single command line file "update.img" in all of the firmware versions. That being said - I still have an early 4.x Dahua version that has that file. I've uploaded it here -

Once you do have an actual Dahua version running, then you can update to the latest Dahua version in the web interface.

Hard to say if any of this will help though.... maybe on later models they introduced something to the firmware to prevent crossflashing. I know they did this on later and current IP cameras - on the newest ones there is no way to crossflash.



Thank you very much for your help am gonna try this firmware you linked,
however i would be most grateful if you could type exactly what i should type because i know nothing about commands...

this is what i typed in NCOM that MixmanSC shared but am not too sure if i have configured the TFTP server correctly "i copied all the firmware files in the root folder
but most of all i dont know if or how to start the TFTP server, i simply have the TFTP app opened???

1680415019644.png

so yours and others guidance would be most grateful, thanks
 
i set my pc static ip to 192.0.0.128
i set my nvr static ip to 192.0.0.64
i had my NVR on DHCP before, so gonna try again

Antivirus disabled
Firewall now off
 
should i type A this?

setenv serverip 255.255.255.255
setenv ipaddr 255.255.255.255
setenv gatewayip 255.255.255.255
setenv netmask 255.255.0.0
saveenv

B This?

setenv serverip 192.168.0.100
setenv ipaddr 192.168.0.101
setenv gatewayip 255.255.255.0
setenv netmask 192.168.0.1
saveenv

OR C This?

setenv 192.168.0.100 255.255.255.255
setenv 192.168.0.101 255.255.255.255
setenv 255.255.255.0 255.255.255.255
setenv 192.168.0.1 255.255.0.0
saveenv

OR D?

setenv serverip 192.0.0.128
setenv ipaddr 192.0.0.64
setenv gatewayip 255.255.255.0
setenv netmask 192.0.0.1
saveenv

????
 
ok so i tried this firmware DH_NVR5XXX-4KS2_MultiLang_NP_V4.000.0000000.1.R.20190809.zip
and it bricked the NVR, i wasn't worried because it was useless anyways, i restarted twice but still nothing

so i tried this firmware DH_NVR5XXX-4KS2_EngSpnFrn_V3.215.0000000.3.R.20171211.zip and WOW, now i have Dahua on my once Dead Lorex NVR
Thanks a lot everyone for your help and guidance

this is what i did
1) set my PC ip settings to
ipv4 192.0.0.128
sub mask 255.255.255.0
gateway 192.0.0.1

2) then i used and run as admin Tftpd64 Server by Ph. Jounin

3) extracted all the firmware files in C:\Program Files\Tftpd64 folder
changed the Server interfaces to 192.0.0.128, just leave it open changed nothing

4)open NCOM v1.02
Hit *** before the countdown ends
typed: printenv
and hit enter

setenv bootdelay 9
enter
saveenv
enter


setenv serverip 192.0.0.128
enter
setenv ipaddr 192.0.0.64
enter
setenv gatewayip 255.255.255.0
enter
setenv netmask 192.0.0.1
enter
saveenv
enter

type: reset
hit enter

Hit *** before the countdown ends
type: run up
hit enter

then the Magic happens

You guys are Geniuses

Special Thanks to
MixManSC
TheDude
Coachtech
 
  • Like
Reactions: observant1
Great to hear you got it to finally work right on the NVR! Now you can use the Dahua web interface and update it to the most current versions of Dahua software.

From what I have found, the Lorex branded cameras cannot be flashed to Dahua firmware. They are made by Dahua but have a custom firmware on the that is Lorex specific that will not accept Dahua firmware.
 
I'd love to be able to upgrade this Lorex NVR with Dahua Firmware. I've had it in my basement for several years. Stole the purple 3T HDD out of it several years ago. It was working great, just got replaced during a camera upgrade.

I may even have some serial cables along with an ancient computer with a serial connector and hyper terminal on it or at lest putty. I wish i could grab the right firmware and upgrade it via a flash drive, cause thats about my skill level.


try this, i have the exact Lorex NVR and got Dahua firmware on it
 
H, Im trying to upgrade a NR916n to dahua firmware, converting the cams was explained very well and help me convert all the cams to dahua.

So my question is should I use the same IP info on the PC which we use to upgrade the lorex cams to dahua ?

Also what are the folder names we have to create in the TFTP I have already downloaded the firmware and unzipped it.

Thanks a lot for any advice and guidence.


try this, i have the exact Lorex NVR and got Dahua firmware on it
 
H, Im trying to upgrade a NR916n to dahua firmware, converting the cams was explained very well and help me convert all the cams to dahua.

So my question is should I use the same IP info on the PC which we use to upgrade the lorex cams to dahua ?

Also what are the folder names we have to create in the TFTP I have already downloaded the firmware and unzipped it.

Thanks a lot for any advice and guidence.

How did you get the Lorex Cameras to Dahua firmware, did you use like any special cable connected inside the camera or any special commands use, i have some Lorex LNE8974AB which are exact match to DH-IPC-HDW5830RN-Z and dont know how to convert, fwi i tried update via webui and didnt work only rebooted the camera
 
Yes - the Lorex version does include a remote control.... and has the fancier face with all the buttons. Ok - this was a pain to document and write out....

First of all – I am not responsible for your warranty or if this somehow goes wrong and you brick your NVR. I cannot provide personal support for this. Much of what I learned on here regarding how this is done is thanks to cor35vet and others before me who ventured into modding firmware and unbricking Dahua IP cameras that have been bricked for various reasons. There was just not a lot of info on the NVR’s though and what info there is, is scattered all over the place. So it is quite difficult to put all the info you need in a short number of steps. This really is way far above the average person’s skill set in regards to computers and electronics. If you are not a typical computer nerdy type, you might need to just move on or find someone who is.

Ok – so here are instructions to cross-flash your Lorex NR9163 NVR over to Dahua NVR5216-16P-4KS2 firmware. I also should point out that it is possible that Lorex has changed the internals at some point and kept the same model number. I doubt it but be warned that your Lorex NVR should have the same general specs for this to work like 4K, POE ports, and potentially even take the top cover off and verify that the mainboard is identical to this one.

You will need a few things to do this as well as some grasp of TFTP, networking, and working in a terminal emulator. You will also need a null-modem serial cable, a computer with a serial port (sorry, I cannot help or vouch for the many USB to serial adapters available), and the correct firmware update file. I will also point out that the NVR firmware has what is called a watchdog program that runs in the earliest boot stages – I have no idea how to disable that. What the watchdog does is checks if the systems main software is running and if not it tries to start the main system software. This WILL interrupt you when you are working in the console mode. One thing you can do is extend the timer that it counts down when it tells you to press a key to interrupt the boot process.

I used the official firmware from the Dahua Wiki from here-

USA/NVR/Pro/DHI NVR52A16 16P 4KS2 - Dahua Wiki

This is an English, Spanish, French firmware which is also the same languages available in the stock Lorex firmware. In case the Wiki page gets updated, the zipped archive is named

DH_NVR5XXX-4KS2_EngSpnFrn_V3.215.0000000.3.R.20171211.zip

When extracted this firmware has the same firmware in several formats. One is used for updating firmware via the web interface, another for the recovery mode which is what we are going to use, and there are also the actual individual file system partition images as well. The one you want for this is update.img.

I used the terminal program that Dahua recommends which is NCOM which I downloaded from some thread or another around here – I have attached it to this post. You will need a TFTP server – I use the free one from SolarWinds.

Download and extract the firmware. Start the TFTP server and configure its folder. Copy the update.img to that folder. Have your serial cable connected to the NVR and have NCOM open and looking at COM1. Power up the NVR and you should start seeing some text in the NCOM window. When it gets to where it says Hit any key to stop autoboot you need to quickly press the asterisk * key. If it goes past you are too late, switch the power off and cut the NVR back on and try again. Also if you get nothing in the NCOM window then your serial connection is not right.

Anyways once you interrupt autoboot you will get a #Hisilicon prompt. The commands might be case sensitive and either way spelling is critical. First thing is to document your current boot environment variables. At the prompt type printenv and hit enter. Copy (select it in the windows and right click it to copy) and paste this output into a text document and save it. You can also type help for a list of valid commands. I’d strongly discourage typing ANY command that you are not 100% sure what it does. Another important command is saveenv – this will save the variables you change. The printenv command will list the default values for you to change back when you are done.

Now lets set the environment variables we need. Each command is started with setenv – for example, setenv bootdelay 9.

Now lets extend the auto boot timer so that you at least have a few more seconds to hit the * key to stop the auto boot - this the bootdelay variable. It defaults to 3 seconds. I set it to 9 which was plenty of time and you can set it back later. Realistically, you should not even need to bother with the boot delay. On boot it takes it about 10 seconds to get to where you interrupt the boot already.

Type each line exactly as below and hit enter after each. Warning – at some point it WILL try to start booting. You must hit the * key again to interrupt that or you will need to power it off and on again to start over. I typed saveenv after every several variables I changes because one you have to stop it with the * key again anything not saved is lost.

setenv bootdelay 9
saveenv

The next main things you need are the below – these are at their default values. You must type setenv before each one. Change the addresses to match your network configuration. Serverip is your computer that you have the TFTP server running on, ipaddr is the temporary IP you are assigning to the NVR, gateway is your networks gateway, netmask is your subnet. If this is beyond you, you should probably call someone who has more experience to help you through all of this.

setenv serverip 255.255.255.255
setenv ipaddr 255.255.255.255
setenv gatewayip 255.255.255.255
setenv netmask 255.255.0.0
saveenv

At this point everything should be ready for the firmware upgrade. Due to the timer I’d suggest at this point one final reboot of the unit. Type reset and hit enter. Stop it again when it gets to the wait timer with the * key. Time to upgrade – type

run up

Now wait and watch a bunch of programming and write commands go by. Once its done it will try to start the kernel. Mine then kicked out to a root prompt #. At this point, cut the power switch off and then on again. Stop the autoboot when prompted with the * key again. Now go and set the environment variables back to their original values using the same commands as before and saveenv.

Reboot the NVR one last time and hope that you eventually hear that beep. Give it another minute or so and login via the web ui. Now one final step is needed. The new firmware has a little wizard you go through. Do that. The final step will be to fully reset the NVR factory defaults. This is because during a firmware upgrade certain things are kept like logins and apparently some things Lorex puts in like their DDNS and email configuration. So go to the Setup>System>Default page and push the Factory Reset button.

Now once it finishes this reset you will have to find the NVR's IP address with the config tool. Then open that IP address in Internet Explorer and go through the Setup Wizard again. Now you can enjoy the new Dahua firmware. :)

Updated certain steps based on feedback on 07/15....

====================================================


It helps if you can type. I can't. Maybe i could set up a meta key? or something with the characters necessary. Just thinking out loud. I can't hit the * key in time to slow rhings down and then try to type my command in.

Yep i've had a beer or two. but my starement stands. You made it clear - Type each line exactly as below and hit enter after each. Warning – at some point it WILL try to start booting. You must hit the * key again to interrupt that or you will need to power it off and on again to start over.

 
I remember the day one of our older specialists asked me a question that seemed so simple to me...he was a top level tech for many years.
 
Half my problem is getting my older laptop setup, (it's a great dell presision m50 serial cables galore) setting up in an area to do he work...then trying to do a step by step tftp ...puty is a thing of old days...it's just a pain for an old guy like me.

---------------------------------------------------------------------
If I spent that time installing a system for a customer I could buy a pro series NVR. I 'm looking for some good cameras like the ones i might win with my lorrery tickets. :p
Basically, it's not easy for me. I wish it was. (id be using my BI computer) ..more than i do.

I love it when some tech savey person does a firmware remodel !

I've got 5 other computers that have win 10. I grew up on the M50...... win XP.
 
Last edited:
It’s nice being able to take an old Lorex NVR that’s useless for any thing other than recording and get the features of a 4KS2. One of the other ones I gave to a friend along with a couple Lorex cameras and two from Andy. Now he’s purchased 3 more from Andy and wants a bigger NVR, 8 ports isn’t cutting it
 
I've got an 8 port LOREX. NR908N ...i tink it could be flashed/ upgraded ro a Dahua . I ned to spend more time on my BI computer. That's the ticket for me.

......and Roll Tide. We are in the Elite Eight ! ...final four!

:p
 
Last edited:
OK...starting back on this project.

Having some trouble but too confused to know what to ask.

You can type saveenv after each line then if it restarts whatever was entered before that will be saved

May use this as i get pretty far along and then look uo and it's no longer taking my comands...happens toward the end of the process.

So ive got my nvr connected via db9 null cable from my computer. I also have a network switch between the nvr and computer. Uning tftp64 by Ph. Jounin. with NCOM i got from here. The db9 on the nvr is set to console. I don't have ftp turned on in the lorex although i did at 1 time.
 
Last edited:
I use Blue Iris to get my camera feeds from my NVR - a cheap Uniview knock off, i think. But after repairing a broken PTZ ( PDN49I425H-XR) that we replaced I didnt want it to connect to my cheap nvr.....wanted to try and make the Lorex into a Dahua. It's too rainy to cut my grass.