-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSC Indoor IP Camera Firmware v7.6.32 #37
Comments
@OfficialDevvCat if the Merkury1080, Merkury720 and BazzDoorBell process didn't work with different SD cards then it may have a different address or not be linux OS. Usually ppsFactoryTool.txt allows the HTTP responses to work, but like you said, it is possible they closed some things or changed the user/password. Until someone with the right tools can open it up and read the firmware (or connect to UART) we won't know -- I have the tools but no device, so I have no way of helping right now. |
100% true! What do you exactly need to use the uart port? I have soldering skills, yet I have no idea what I need. Would a Raspberry Pi 4 work? Because I have that laying around. Let me know. Maybe you want to discuss this on discord? DevvCat#0880 |
@OfficialDevvCat if you're willing to open your device and solder wires to it I can help trying to figure out if we can root it. The first step would be to open your device and take some good pictures of the board so we can identify the UART pins. The second step will be to solder some wires to the UART pins and connect GND, RX and TX to the GND, RX, TX of the pi board (GPIO15 and GPIO14 pins on the header). You may need to swap the RX/TX around as we won't know which is RX/TX by looking at the board. Once you have it all connected you should see some messages on the pi terminal when you power on the device -- ideally you should be able to interrupt the boot of the device by pressing a key when the first messages show up and it will either give you a bootloader prompt or ask for a password. Whatever messages show up may help in figuring out if we can even do anything. |
Okay! I'm 100% be willing to open up the device but currently I'm in the middle of a move so that have to wait until I've got all my stuff! I will let you know as soon as possible when I got everything and ready to the hacking! :) |
I ordered a SPI flasher and it will arrive in a few hours. When it is here I can dump the firmware and upload it so you guys can take a look at it! Give me a few hours and I will get back to you guys. To be specific, this is the one I ordered: https://www.amazon.nl/gp/product/B08TVNPTQK/ |
@OfficialDevvCat I have that flash programmer and you need to be aware of 2 things: IF you're going to do any cut/solder work: I recommend practicing on any old/broken board laying around first |
Okay so wait. |
@OfficialDevvCat a flash programmer will read (and later write - if desired) the built in firmware on the device -- to be clear: it won't do anything with UART. For reading/writing the flash you don't turn on the device at all, you just plug the flash programmer on the chip and read (or write) its contents (like a USB drive). The issue is that (from experience) connecting the flash programmer to the chip without removing it from the board doesn't work (fails to read/write). As long as you verify the output is 3.3V (on all pins like VCC, RX, TX) then it should be safe to try and read the flash while connected to the board (but from experience it is likely going to fail, but who knows board design changes). If you plug the programmer to the chip while on board and you output 5V to any pin you may fry the device (fair warning). The only type of connection we do with the board/device powered ON is when using the UART/TTL adapter where we connect it then power on the device to capture the boot output log. UART connections require a USB/TTL UART/SERIAL adapter (3.3V), which is a different thing than the flash programmer. |
Okay that is clear. Could you take a look at the picture and tell me what the best solution could be? It has a jumper for maybe possible ttls fu functinality? |
@OfficialDevvCat the chip should connect on the ‘25’ section, but like I said: this programmer has a 3.3V/5V jumper but when you set it to 3.3V it still outputs 5V on some pins ( RX/TX pins I think ). If you connect it without the mod to fix the voltage you may damage the board/chip (you have been warned). |
Okay, I will find online if there a different way to do that. What about the TTL functionality? Does that also output 5v? Or is it just a reading pin? |
@OfficialDevvCat that flash programmer only has TTL functionality - in 3.3V or 5V selected by jumper switch, but this is only for flash chip read/write. The UART pins require a UART TTL (3.3V) adapter which is mostly available as a USB adapter. There’s no way (that I know) to use a flash programmer on the UART TTL pins, and there’s no way (that I know) to use the he UART TTL adapter on the flash chip. |
I just check the datasheet of a old 25xx chip from a dead GPU and it was a 3.6 max volt chip. And it i got to read the chip without issues and even got to write to it. I also looked up and this is an improved revision of the board with the 3.3v fix. Should I now extract the data from the camera? |
@OfficialDevvCat sounds good if you say it’s a fixed version you can try - again, from my experience it may not work while the chip is soldered on the board. I would avoid keeping the flash programmer hooked up for a long period just in case the voltage is wrong, so hook it up, try to read, remove it if fails, wait a bit hook up, try reading again, etc |
@guino I just dumped the chip, I did that exactly. Read, verified and disconnected. You can download the dumped bin file from here https://www.mediafire.com/file/31ms1k4kgqxxlh6/Smart_Indoor_IP_Camera.bin/file |
@OfficialDevvCat well, assuming your camera still works normally, I would try this first: Follow the steps from: Binwalk didn't give me a lot of information to work with, so let's hope this works. |
@guino Just one more question. Do I have to flash the chip afterwards to make it work?? Cause the issue is that the SPI Flasher does not work anymore for some reason?! The Red power light is on and so is the Yellow RUN led. And it is not found by windows anymore?! I don't hear a USB Connected sound. Very very strange. So I'm going to return it tomorrow and ask for a new one which will take a few days... Unless you know what I can do about it? |
@OfficialDevvCat If you tried A0008000 and it didn't work I'll have to try and dig out more from this firmware file. Is the camera still working ? (boots up, etc) ? if not you may have damaged it somehow. It may just need a power cycle of your machine to reset the USB bus (if it used too much power). |
Camera works perfectly fine! I can try rebooting my PC but I don't think it's really going to work as it was plugged in a powered hub. Tried a different pc and used my powerbank. Yellow light stays solid and not connected. |
But again, Do I need to flash stuff again onto the chip? Cause I can't read anywhere what to do after the edit. I assume it has to |
@OfficialDevvCat the 'Read' process doesn't change anything in the chip, so to work 'normally' you won't have to flash anything back. If I can unpack the firmware we may be able to find something to change to root the device (I haven't been able to do it yet) -- in that case you would need to be able to write the changes with the programmer (meaning it would need to work again). |
I tried to find some variables from the link you sent me but it can't even find the "Loadable segment". Maybe you could take a look at it if you've got the time for it? Would appreciate it! |
@guino Let me know if I can do anything as I'm a programmer and know my way around some of this stuff! Would be very cool to get this thing streaming a signal outside the app. :) Have a great weekend in advance and lets hope for some good results on this thing |
@OfficialDevvCat I will try to see if I can get anything out of it - may need to try a different tool. |
@OfficialDevvCat I downloaded a different tool and then I noticed there's an issue with your flash file -- it's only 2Mb when it should be at least 8Mb (some devices have 16Mb) -- this is likely the reason why I could not extract anything out of it. This may have been something like selecting the wrong size of chip when you did the 'read' or perhaps an issue identifying the chip size (or even just an upload issue), Do you happen to have the /proc/cmdline for this device ? thay may help me extract the bootloader from the section you provided (so I can try to double check the load address). |
I did not have any success with that sadly. The http server is sadly disabled to get any kind of useful info from it. U have to wait until sunday until I got my new reader to try it out once again. |
@guino I just received my new SPI flasher. I will dump the whole chip (8MB) in an hour or so. I will lookup the chip model number and see what settings I need. |
@guino I just noticed the TX/RX rail is on 4.5V. I will have to wait until Wednesday till I got my soldering station. |
@keerttttt the reason it only works with the SD card is because the startup scripts (written by the manufacturer) basically copies that file when the device boots (from the SD card). Technically it is possible to NOT run dgiot (at all) and instead run a custom written application to read the video+audio data and create the RTSP server for it. With the OS sources and right SDK this would not be so hard but without those it would take a long time to write anything since it has to match the right hardware and specific sensors. Trying to write something to run along with dgiot (in parallel) would have different challenges such as memory/cpu limitations as well as trying to synchronizing reading the video/audio buffers between the two applications. |
Okay quick update on how my experience went for the last couple of months. It was good at first! Audio with rtsp stream in AgentDVR with Scrypted. And video trough local video rtsp stream. But later on there became a HUGE delay on the audio. I have no clue why this happened. Still trying to figure it out. Having a huge delay on the audio is not something what I want while I'm recording my camera's. I'm going for a new approach which will be creating an application that runs on the camera to stream the audio. I will be using ChatGPT as I have 0 experience in C/CPP or doing any of this on such hardware. I will let you guys know if I succeed or fail. |
@guino I have a question. I was able to solder back the flash chip (very sketchy) on my LSC Rotateable camera and I flashed the wrong firmware on it. I do get lots of data (see file) Boot.txt. I also cannot find the firmware that I backed up from that chip... I also cannot remove the chip cause there is a 90% chance I will break it again and maybe not even able to get it working again. I would mean the world to me if you could help me out with this one Update:
|
@BreadJS your boot log indicates the flash firmware is either corrupt or the boot settings are incorrect, currently you have this: This is what I have: Since it looks exactly the same, the only conclusion is that your rootfs is corrupted. There's a publicly available rootfs for this device as posted here and usually just saving the .bin file to the SD card and booting it up causes the firmware to automatically update from the file -- problem is: this requires the device to be operational (yours isn't). I haven't taken the device apart myself to see if you can get into o the bootloader from the serial console, but if you're able to pause the boot and go into bootloader prompt you may be able to flash it from there (manually), otherwise you'd have to re-flash the chip with a programmer (which you said may damage the device permanently). On devices that have an interactive bootloader you can usually just press a key during the boot (before kernel loads) and it will either display the boot loader prompt or ask for a password -- if you can get either of these send me an email and I can give you some pointers. On reflashing using a programmer, if it's any easier to just disconnect pin 6 (CLK) you may be able to use the hardware programmer without removing the chip completely from the board (hopefully without causing permanent damage). Your boot loader and kernel seem to be ok, it's just the rootfs that seems to be corrupted, so if you can just get that section flashed you should be ok at least to completely boot the device and use if offline. For using it with the Tuya cloud your data partition with cloud certificates would have to be ok -- getting it from another device would basically mean the two devices would never be allowed to be online at the same time, so it's not something that can be shared. |
@BreadJS one additional note: The update .bin file is actually a .tar file with 1024 bytes added to the end with a few pieces of information -- so I recommend using binwalk to extract the rootfs from it as you can't just copy the file into the flash as-is. |
@guino Thank you very much for replying. Is there maybe a way to flash with the sd card? On boot (beginning) you can see this
I tried copying that file and replace the name with
And then it reboots: LOG HERE: Maybe it is different?? |
I also want to let you know that this camera has a different CPU compared to the cpu tried to hack in this official topic. i also tried CTRL+C and pressing any key while booting, no results.... I will send you a picture of how terrible the soldering job is. My email is [email protected] in case you want to contact me about more info or something! :) |
@BreadJS I have not reviewed the bootloader code in that camera. Likely it is looking parameters inside the ht_recovery_fw.conf file about a possible firmware update file -- the question is figuring out the format it is expecting. It could be as simple as just being the filename in the SD card that has the firmware update (the one I posted in the link) or it could require specific data like update=filename.bin, etc. It could even be as simple as just leaving the original .bin file in the SD card with an empty ht_recovery_fw.conf file just to 'signal' that you want it to do a firmware update. It takes a fair amount of time to review the bootloader code in ghidra because it's basically a guessing game for the load address. On a quick string search it may be looking for a parameter: ht_fw_version=0x%02u%02u%02u%02u to compare versions so it decides to update or not. It may also be looking for the file named 'flash.bin' -- these are all guesses. There are probably many checks in place so I doubt it will do anything unless all the parameters are correct (and you should be able to check on the serial output). |
@BreadJS I don't have any chip documentation from hisilicon, but seems like ChatGPT may have scanned some of it already and knows some details about it. You could probably try asking more questions like 'how to calculate the magic' number on the file and how is the format of firmware.bin. It sounds like you should be able to restore the rootfs using the link to the bin file I sent earlier along with the 'correc't magic/version values (assuming you can skip the boot size/file and not mess with it). Chances are it will only work if you get it right as it will probably do a lot of checks before trying to flash anything. |
I cannot get it to work at all and it is driving me crazy... I'm tempted to buy another camera and returning this broken one in the newly bought box. |
@BreadJS there's hardly any way they'd be able to tell it was your fault that the device isn't working (unless you physically modified it) -- I have in fact had devices go bad without doing any modifications to them. If it's right/wrong is a different story, but these mass produced devices are usually priced knowing that a % will fail and have to be replaced for free, so chances are that device will just be tossed into the garbage after a return. |
Yeah I think so too! So thank you at least and you've made me learn a lot of information about these cameras and infrastructures! lets hope that getting RTSP working on the next camera will be more easy now that there is more information available! |
Do you have that .bin file? |
@mehmetahsen I have no 'update' firmware bin file for this device, but I do have the modified flash dump I tried to flash (and corrupted my firmware). |
Is that the one you tried over telnet? |
@mehmetahsen I think someone tried to get access to u-boot without success on this device, so you'd have to flash it just to get some sort of bootloader control. I have been able to get the firmware update download link from some devices by adjusting the version of the firmware in the main application of the device (ppsapp) -- since this device can be rooted (https://github.com/guino/LSC1080P) you could try to do the same in the dgiot application -- I personally have never tried it. You would most definitely have to be monitoring the application log to have any chance of seeing the link. There's probably a way to 'simulate' the communication with the tuya servers (using secret keys, etc) and get a download link but those approaches take way too much time and don't always pan out. |
@guino I swapped the 360 rotating camera and have a NEW WORKING one. all though the only port open is 6668 and no 80 or rtsp port. What should I do about this? Do I have to dump the firmware once again? Cause I REALLY DO NOT WANT TO DO THAT AGAIN LOL |
You can dump /dev/mtdblock* to sdcard via telnet using |
@BreadJS for the rotating camera you just have to follow https://github.com/guino/LSCOutdoor1080P there is no risk as there’s no firmware changes required to root it. |
@guino And this works on firmware 3.10.56? Cause so far telnet is notr working |
@BreadJS all cameras I have seen with 3.x firmware do NOT run linux so there’s nothing we can do with then). I thought you got a rotating camera as posted in that link (2.10.x firmware). |
That was the old camera. I bought a new one and returned the old one. I could open up the new one to see the board and see the tx data. And my normal cameras are running 7.6.32 (the one discussed here). |
@guino ^^^ |
@BreadJS someone just confirmed that 3.10.57 worked with option 3 (just running 2.10.36 ppsapp without modifying the flash), I would think it’s worth a try it on your 3.10.56 firmware. |
There is no need for flashing this device (V7 firmware), just put all the files (your 7632 files, the modified ppsFactory and busybox in the root of the SD-Card ... rtsp://ip:8554/main works like a charm ! |
What files are you talking about? And quick question. Does your audio work on the RTSP stream? |
ppsFactoryTool.txt |
Its without audio, but i dont need it ... |
Hey there!
I have bought this LSC Indoor IP Camera on the 30th of August 2022 and tried this method (combined with the Merkury720P method) with no success.
I have literally tried everything that was stated in the documentation. Also switching between SD cards. I also ready some other issues but nothing seems to help. I even tried the custom QR code that somebody in the issues stated but no lucky. I think they have patched out some things in this firmware version as this one is pretty high compared to all the other versions I saw wondering on Github.
The only ports that are open are:
Port 80 and 8554 showed "version"
DoorBird video doorbell rtspd
in nmap. I have no idea why it is also saying that on port 80 as that should be an HTTP server.I also get no positive response from the HTTP requests I'm doing. I tried the
admin:admin
but alsoadmin:056565099
. They all returnedERR_CONNECTION_REFUSED
. I checked the SD card but no new folders or files have been created.It's a cheap camera with a pretty decent lens on it and would love to see this work in my setup. I do NOT want to build one my own (for cheap) or buy an expensive set.
If you have any idea what I can do, let me know! :)
The text was updated successfully, but these errors were encountered: