mcchas / g2h-camera-mods

Modifying the G2H camera with rtsp, security and not to call home
MIT License
107 stars 14 forks source link

Enable ssh or ftp #4

Closed NikDevx closed 3 years ago

NikDevx commented 3 years ago

Hello Thanks for hack!

Is it possible to enable ssh or ftp or netcat for download video from camera?

From original app aqara I can access to the sd card. Maybe ftp already up?

mcchas commented 3 years ago

There is no ssh/ftp/netcat in the stock firmware however there are samba references in the camera binary and flash_config.ini file:

[samba]                                                  
server                         =                         
path                           =                         
user                           =                         
passwd                         =                         
enable                         = 0                       
sync_interval                  = 60                      
video_save_time                = 86400                   

I would suggest setting enable = 1 and playing around with these settings (like path) and restarting the camera service. Remember to update the last line of the file with a new md5 sum, otherwise the file is reverted to the original. Check if SMB is listening with netstat -an and try connect..

NikDevx commented 3 years ago

@mcchas Sorry, but I don't know how I can do that. Can you help me, please?

What I should to do first? Download ota.bin, install and edit via telnet?

mcchas commented 3 years ago

@NikDevx it sounds like it only supports connecting to a SMB share to dump video files - may not be what you want.

Adding software is kind of beyond the scope of this hack, someone will probably build a new firmware for this thing in the future (an investment I cant afford as I already have everything I need from these cameras - I feed just the live video to a server over RTSP). Then you will have that ability. In the mean time you could look for statically built (or build yourself) copies of the ftp/netcat binaries for this CPU, copy them to the SD card and run them!