bmork / defogger

D-Link DCS-8000LH usage info and defogging tools
268 stars 37 forks source link

DCS-6500LH U-boot info #30

Open enerdk opened 1 year ago

enerdk commented 1 year ago

Hi All

I have tried to use the defogger script on my DCS6500LH but it didn't work. I then added serial terminal to the camera in hope that I could login as root to the system but I couldn't find any useful passwords in the GPL Source Code: DCS-6500LH A1 FW v1.x files.. Maybe I looked for the work things??! but no variable with password= was useful.

So therefore Im asking you the experts if I can do something from the U-boot terminal? Below are the variables that I could find.

BR EnerDK

U-Boot 2016.11 (Oct 16 2020 - 16:19:55 +0800)

=> printenv baudrate=57600 bootaddr=0xBC000000 + 0x50000 bootargs=console=ttyS1,115200 root=/dev/mtdblock3 rts-quadspi.channels=dual mtdparts=18030000.spic:16384k@0(global),320k@0k(boot),2304k@320k(kernel),3584k@2624k(rootfs),7744k@6208k(userdata),2048k@13952k(userdata2),384k@16000k(userdat a3) bootcmd=bootm 0xbc050000 bootdelay=2 ethact=r8168#0 loadaddr=0x80010000 netretry=yes stderr=serial stdin=serial stdout=serial

Environment size: 432/65532 bytes => bdinfo boot_params = 0x83782188 memstart = 0x80000000 memsize = 0x04000000 flashstart = 0xBFC00000 flashsize = 0x00000000 flashoffset = 0x00000000 ethaddr = (not set) IP addr = baudrate = 57600 bps relocaddr = 0x83F91000 reloc off = 0x01791000

enerdk commented 1 year ago

I used hashcat to Brute-force the root password from the open source files found on dlinks page and the result i got was "hashcat.exe -m 500 -a 3 "$1$CDMS1AEo$oFm3oJFXjQVO8az337T6t0" -O -d 1" gave the result: a0n1ipc I have tried on my camera but it didnt work.

ErikAndren commented 1 year ago

If you append: init=/bin/sh to the bootargs, i. e.: setenv bootargs ${bootargs} init=/bin/sh You should be able to get root prompt. That worked for me using a DCS-6100LH

enerdk commented 1 year ago

@ErikAndren thanks a lot!!! it worked and now I have shell access to my camera.

When you have shell access run the command "/etc/init.d/rcS" Dont change password as my camera is not working with WIFI right now?!

PascalMinder commented 1 year ago

@enerdk

Did it just work with the mac address and the pin to connect? Because I always get the error:

Connecting to B0:xxxxx...
Traceback (most recent call last):
  File "/home/pascal/Downloads/defogger-0.02/dcs8000lh-configure.py", line 152, in <module>
    cam = BleCam(args.address, args.pincode)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pascal/Downloads/defogger-0.02/dcs8000lh-configure.py", line 28, in __init__
    self.periph = Peripheral(address)
                  ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/bluepy/btle.py", line 391, in __init__
    self._connect(deviceAddr, addrType, iface)
  File "/usr/lib/python3.11/site-packages/bluepy/btle.py", line 439, in _connect
    raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral B0:xxxxx, addr type: public
enerdk commented 1 year ago

@PascalMinder The defogger script doesn't work at all on this camera or at least not to my knowledge.

PascalMinder commented 1 year ago

Okay, I thought at least I could also connect the same way via Bluetooth. But it seems as if the camera does not have any Bluetooth capability...

enerdk commented 1 year ago

Its not using Bluetooth - its just using the Bluetooth software library for the defogger application.