Closed gewinh closed 3 months ago
Did some further investigation scp is in the 0.1.7 distribution. You can run it via /mnt/mmc/sonoff-hack/bin/scp.
Tried 2 temp fixes
A)Created a link to this by
B)Looked at adding /mnt/mmc/sonoff-hack/bin to PATH existing Path looks like echo $PATH /usr/bin:/usr/sbin:/bin:/sbin:/gm/bin:/gm/tools:/tmp/sd/yi-hack/bin:/tmp/sd/yi-hack/sbin:/tmp/sd/yi-hack/usr/bin:/tmp/sd/yi-hack/usr/sbin PATH="$PATH:/mnt/mmc/sonoff-hack/bin" echo $PATH /usr/bin:/usr/sbin:/bin:/sbin:/gm/bin:/gm/tools:/tmp/sd/yi-hack/bin:/tmp/sd/yi-hack/sbin:/tmp/sd/yi-hack/usr/bin:/tmp/sd/yi-hack/usr/sbin:/mnt/mmc/sonoff-hack/bin scp works This change doesn't survive logout
Forgive my ignorance but I do not know how to make any of these changes permanent or how to update the distribution to include a fix. Any help?
A bit more info. I see /mnt/mmc/sonoff-hack/scripts/system.sh called by boot.sh system.sh sets the path in export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/mmc/sonoff-hack/lib export PATH=$PATH:/mnt/mmc/sonoff-hack/bin:/mnt/mmc/sonoff-hack/sbin:/mnt/mmc/sonoff-hack/usr/bin:/mnt/mmc/sonoff-hack/usr/sbin but this path isn't there on boot, if it was run correctly and the path was set as above scp would work. I also noticed a problem with filezilla access giving sftp error. Again I would guess this is related to the path not being set correctly.
I think the path on ssh login is set in Dropbear
https://github.com/roleoroleo/sonoff-hack/blob/master/src/dropbear/localoptions.h
Thanks. Yes I couldn't understand why all that yi-hack stuff was in the path when i'm running the sonoff-hack. It's beyond my skills to fix that. Hopefully someone will find the time to fix it.
@gewinh you could do a local build off PR #167 to test changes. I dont currently have access to my sonoff cams.
Thanks for doing this. Unfortunately I can get my head around how to do a local build. Install the toolchain? , vscode, development environment, dockers etc. etc. I think I will have to wait until the fix is incorporated into a release.
This old brain works a bit slowly these days. Finally sorted all the dependencies, paths etc. and got he updated 0.1.7 built. Installed on a GK-200MP2-B camera and scp and filezilla are now working. The PATH now looks correct. Will test on the Sonoff 1080p slim cam and the HA integration later. Thanks for all your help.
Tested on the Sonoff 1080p slim cam using firmware 0.1.7 all works fine, except for camera on/off as described in issue 0.1.7 camera on/off not working for some firmware
Sorry for this regression. Below a binary with the fix posted by @darkxst: dropbearmulti.gz
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi back after a long absence. I have had a number of Sonoff cameras running on 0.1.5 and integrated in to HA with great success for over 12 months( thanks for all the work)(this system has been frozen version wise for this period). Now in a moment of madness I have decided to update everything (pi5 ubuntu HA etc etc). One of the changes has been to try 0.1.7 most things I have tested on a new Sonoff Cam slim using the GK-200MP2-B_0.1.7 are working well, except scp. ssh is working, If I ssh to this camera running 0.1.5 and execute the scp command I get some stuff about usage, so the command is working. If I ssh to this camera running 0.1.7 and execute the scp command I get "command not found". Is this a path thing? I notice an issue raised for 0.1.6 to fix scp , is this the same issue for 0.1.7 if so how do I fix it. The one thing I didn't want to change, if possible, is my nightly server scp copying of previous days recording from each camera on the network. SO it would be great to get scp working