Unbricking the Mini PTZ V2

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
pretty sure I took it out while trying to recover it and before sending it to greener pastures..
Yes, you did, the card slot was empty.
 

vasycara

Getting the hang of it
Joined
Jun 22, 2015
Messages
227
Reaction score
48
huisun now.JPG


Me huisun v2 now,apear with audio and alarm,but audio not work,... no problem.
 

klasipca

Banned
Joined
Mar 27, 2014
Messages
3,146
Reaction score
750
View attachment 12526From my experience with this min PTZ :
I tried it IPNC_S2l2.0.1_build201602010919 update firmw, in me Mini ptz v2.Another time was fine with this firmw, so this firmw is good. I had several times put this file in me Mini ptz. Mini PTZ .BEGINNING UPDATING AND ON THE 88% FAILED.Mini PTZ was still visible brauser, and I tried to firmw IPNC_S2l2.0.1_build201603031830, all the same ON THE 88% FAILED.
Another time was fine with this firmw, so this firmw is good. I knew that if I reboot and mini PTZ will be dead. I did not reboot, I accessed the telnet, seemed to have an error in sd card.
I removed the mini sd card from mini PTZ and I put everything in telnet mtdblock4 tab, reboot, and everything is ok.
Then after reboot, everything was ok and I tried updating to the same tab in brauser and did update ok. But with sd card out.
I suspect failed due to firmware bug sd card.
I then tried the update with firmw IPNC_S2l2.0.1_build201607221508 in brauser updated ok with this firmw. (sd card is removed) .I'm mentioning ,that ,with this firmw I brycuited
first time ,mini PTZ and now she goes perfectly ,with sd memory card out of the mini PTZ.
I will make updates firmw just outside sd card.
I mention that without help from Mr. Alastairstevenson .. me mini PTZ was now dead.
This is my experience with this min PTZ maybe help someone.
Can you please explain how you "put everything in telnet mtdblock4 tab"? I am having exactly the same issue with the same firmware.

EDIT: This is what I have done

1. Mounted nfs to windows pc with my working cam that has IPNC_S2l2.0.1_build201607221508 firmware
2. Extracted mtdblock4 file
3. Mounted nfs to windows pc with my bricked cam that had IPNC_S2l2.0.1_build201603031830 firmware
4. Copied previously extracted mtdblock4 to the bricked cam

I am still not sure whether it matters from which firmware you extract mtdblock4. I don't have mtdblock4 for 03031830 firmware unfortunately. If you have one could you email it to me?
Also, does this look ok before I reboot?

 
Last edited by a moderator:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
Wow! You're turning into a real hacker - in the proper sense of the word.
Copied previously extracted mtdblock4 to the bricked cam
That's good - especially if it was from the 'about to be bricked' camera.
If it's over in the camera right now, all you need to do to apply it is

flashcp mtdblock4 /dev/mtd4

and watch nervously as it erases, writes, and verifies the data.
Then
reboot
or power cycle if that doesn't work.
Good luck!


*edit*
Looking more closely at your screenshot - if that folder is /dev then there is a big problem as the block device mtdblock4 is missing - maybe you replaced it with the file you copied over.
The /dev/mtdblock4 needs to be recreated, after the mtdblock4 file is moved or renamed.
mv mtdblock4 mtdblock4_new

First of all find the major,minor for the remaining mtdblocks
*edit 2* Actually, the major,minor numbers are in you screenshot - you need 31 4 for mtdblock4

ls -al /dev/mtdblock*

Then pick the next minor number for the missing mtdblock4, using the same major number.
The command will be something like (I'm guessing a bit here)

/bin/mknod /dev/mtdblock4 b 31 4

And if / when it's back again you can use the
flashcp mtdblock4_new /dev/mtd4



*edit 3*
On thinking about this - I'm surprised there is enough storage for you to have mtdblock4 over in the same area as /dev
Normally you'd have to copy it to a RAM area such as /tmp or simply leave it on your external NFS share which you have mounted somewhere - maybe /tmp? or /mnt?
If you hit a problem with space, get the mtdblock4 out of the way (rm it) and simply reference the path to it's mounted location wherever that is.
 
Last edited by a moderator:

klasipca

Banned
Joined
Mar 27, 2014
Messages
3,146
Reaction score
750
Thank you @alastairstevenson!

I performed all the steps, still have two concerns:

Mtdblock4 that I applied was from newer firmware. Does it matter?
Mtdblock4 permissions are different in a bricked cam and it says root. Is that ok?


Working cam mtdblock4 view:
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
I performed all the steps, still have two concerns:
Looking much better than it might have been. Good for you!

Mtdblock4 that I applied was from newer firmware. Does it matter?
The other partitions are the bootstrap, bootloader, Linux kernel, and ptb (I forget what this is, something to do with the board) and they don't seem to change these between minor firmware revisions.
So mtdblock4 IS essentially the firmware and I don't think there will be any inconsistencies.
You could always re-apply the firmware if you wanted to ensure everything lined up .... you do know pretty well how to fix it now!
 

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
This is a cool thread.

I just bricked a V1 and a V2 within 5 seconds of each other, by using the "enable DHCP" checkbox in SADP. I get no network and no self-test motion. I wonder if this method offers any hope? I had thought SADP's network settings were compatible with Huisun cameras, but it's apparently just compatible enough to log in and stomp all over something that's required to boot.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
(Just back from a week away)
I get no network and no self-test motion.
With no network, there isn't any alternative but to make contact (physically and logically) with the serial console on the camera.
And then there will be a need to assess the cause of the problem, which will determine the recovery method.
I've found that the type of problems to be fixed can vary, requiring different solutions.
The most interesting one so far was an erased 'ptb partition', the flash segment that holds the flash partition data, and, crucially, the 'device tree block, dtb'.
Only Linux gurus will know what this is - it holds the detailed low-level hardware definitions specific to the board, without it, Linux will not run.
But with a bit of lateral thinking, it was able to be re-written from a known good copy.
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
My PTZ v2 mini died after some months.. First it would work for some moments minutes with POE.. then I had to connect it with a separate power supply, worked for 2 days.. now nothing.. when i connect power I see the 2 bottom infrared lights verry short. network lights go on but no traffic, no movement on power up. so same sympthons but I didn't even try to flash it...
I'll hook up a ttl serial console ...
 

thap143

n3wb
Joined
Feb 16, 2016
Messages
4
Reaction score
2
Just wanted to post here about one more 10x v2 resurrected with the help of alastairstevenson. He helped so much and walked me through every step of the way.
My camera crashed while taking a firmware update @ 55% and no activity after that. Mostly did what alastairstevenson had described in his posts above.
Thanks alastairstevenson.
Here is what i used for anyone else who needs to do this in the future: spent 13$ on amazon but worth it if you are scared to solder like me.

DROK 090006 PL2303HX Chip Module SCT Download USB to RS232 TTL With DuPont Wire 3.3V 5V



Delcast Helping Hand Magnifier Magnifying Glass Jewelry Clamp Holder Stand
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
Well done for getting there!
You did all the work - I just gave you some pointers.
And thanks for sharing - it might help others if they get in a similar situation.
 

vasycara

Getting the hang of it
Joined
Jun 22, 2015
Messages
227
Reaction score
48
Me huisun v2 is dead, I think from the cold.
Ip cam huisun v2 was well in recent months, has been installed as the cold outside .
killed a night were -11 * Celsius and then .. dead.
I will try with serial console maybe help me Mr. alastairstevenson
 
Last edited:

vasycara

Getting the hang of it
Joined
Jun 22, 2015
Messages
227
Reaction score
48
Code:
           / /_\ \| .  . || |_/ /  ___    ___  | |_
           |  _  || |\/| || ___ \ / _ \  / _ \ | __|
           | | | || |  | || |_/ /| (_) || (_) || |_
           \_| |_/\_|  |_/\____/  \___/  \___/  \__|
----------------------------------------------------------
Amboot(R) Ambarella(R) Copyright (C) 2004-2014
Boot From: SPI NOR
SYS_CONFIG: 0x3000404B POC: 101
Cortex freq: 600000000
iDSP freq: 216000000
Dram freq: 528000000
Core freq: 216000000
AHB freq: 108000000
APB freq: 54000000
UART freq: 24000000
SD freq: 50000000
SDIO freq: 50000000
SDXC freq: 60000000
amboot> \¦¦     T¦L¦¦   Tr¦Q\¦Q\
spinor flash ID is 0xC21820C2

             ___  ___  _________                _
            / _ \ |  \/  || ___ \              | |
           / /_\ \| .  . || |_/ /  ___    ___  | |_
           |  _  || |\/| || ___ \ / _ \  / _ \ | __|
           | | | || |  | || |_/ /| (_) || (_) || |_
           \_| |_/\_|  |_/\____/  \___/  \___/  \__|
----------------------------------------------------------
Amboot(R) Ambarella(R) Copyright (C) 2004-2014
Boot From: SPI NOR
SYS_CONFIG: 0x3000404B POC: 101
Cortex freq: 600000000
iDSP freq: 216000000
Dram freq: 528000000
Core freq: 216000000
AHB freq: 108000000
APB freq: 54000000
UART freq: 24000000
SD freq: 50000000
SDIO freq: 50000000
SDXC freq: 60000000
amboot>
amboot>
amboot>
amboot>
amboot>
amboot>
amboot>
amboot> boot console=ttyS0 root=/dev/mtdblock4 rw rootfstype=jffs2 init=/bin/sh

pri image absent... skipping
sec image absent... skipping
amboot> boot console=ttyS0 root=/dev/mtdblock4 rw rootfstype=jffs2 init=/bin/sh

pri image absent... skipping
sec image absent... skipping
amboot> boot console=ttyS0 root=/dev/mtdblock4 rw rootfstype=jffs2 init=/bin/sh

pri image absent... skipping
sec image absent... skipping
amboot>
and this is the answer serial console
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
dtb (Device Tree Block - the board hardware info for Linux) erased - cause unknown.
Restored from saved copy using Amboot via serial console.
 

TrailRider

n3wb
Joined
Feb 1, 2016
Messages
27
Reaction score
9
@alastairstevenson I have one of these fine Huisun cameras, model HS-SCB415iP-V10 which has worked great for about 8 months. When the weather started getting cold it quit, I cycled the power and it went through startup and worked for a few days and quit again, but this time it is dead the only thing I noticed is the connection light on the router is on. I was curious if it could be a firmware issue and wanted to know how to interface a serial adapter to it. Is it TTL 5V or 3, and how did you figure out what plug and pins to use on the camera board? It has three unused sockets, two have pins and the other is for a ribbon cable. Here is a link to the pics on Photobucket: Huisun Camera by maps21
Any help is greatly appreciated, this is my first experience with IP cameras.
 
Top