roleoroleo / sonoff-hack

Custom firmware for Sonoff GK-200MP2B camera
GNU General Public License v3.0
200 stars 45 forks source link

changing password changes only http password, but not rtsp #62

Closed avg-I closed 1 month ago

avg-I commented 2 years ago

First, I could not get RTSP working at all until I created "RTSP Link" via eWeLink. I used a default password there.

Later, I used sonoff-hack web interface to disable the cloud. I also changed password. Now the http access requires the new password. But RTSP still requires the old password created via eWeLink. The new password results in 401 Unauthorized.

Sonoff-hack version is 0.1.0. Base firmware on this camera is V2524.1.276build20201103. It's the same as in issue #49 and I had to use the binary from that issue to get PTZ working.

So, I guess that there can be more incompatibilities between sonoff-hack and that version of the base firmware .

roleoroleo commented 2 years ago

I also changed password. Now the http access requires the new password. But RTSP still requires the old password created via eWeLink. The new password results in 401 Unauthorized.

The RTSP service should accept both passwords.

Sonoff-hack version is 0.1.0. Base firmware on this camera is V2524.1.276build20201103. It's the same as in issue #49 and I had to use the binary from that issue to get PTZ working.

I don't remember if I commited the code form https://github.com/roleoroleo/sonoff-hack/issues/49 I will check it.

willbrim commented 2 years ago

I am having the same symptoms. I was able to get the hack loaded but rtsp does not work at all until creating the ewelink link. In my case however, the rtsp stream dies after about one minute. Only rebooting the camera will restore it. I will post my build tomorrow for reference.

roleoroleo commented 2 years ago

It's normal that the RTSP stream is not available until you enable it in the app. I will add this note to the readme.

avg-I commented 2 years ago

The RTSP service should accept both passwords.

Unfortunately it accepts only the password that was originally set via the app. The new password is rejected.

roleoroleo commented 2 years ago

Which user are you using?

avg-I commented 2 years ago

User is "rtsp". This user is configured in both the official app and in the sonoff-hack web interface. Should I try using a different user for sonoff-hack? Let me do that.

avg-I commented 2 years ago

Yes, selecting a different user allows RTSP access with both old-user:old-password and new-user:new-password.

avg-I commented 2 years ago

Although, I am not actually thrilled that old-user:old-password is still allowed access...

roleoroleo commented 2 years ago

Yes, I can understand. I don't know what happens if I remove the original user from the table. Do you want to try?

/mnt/mmc/sonoff-hack/bin/sqlite3 /mnt/mtd/db/ipcsys.db 'delete from t_user where C_UserName="rtsp";'

avg-I commented 2 years ago

Thank you! Everything seems to be working fine after making that change and rebooting the camera and everything is still okay. Also, even if I re-enable cloud access and create the rtsp link in the app again the 'rtsp' user is not restored and so cannot be used for access. The account added via the hack keeps working.

I also checked t_user table and found another account with admin:12345678. I removed that as well. Not sure if that was some default account or if I created it through my earlier experiments with the camera.

roleoroleo commented 2 years ago

Let me know if the cam continues to work properly. I will add the instruction to the hack.

avg-I commented 2 years ago

Everything is fine. I can access the web interface, rtsp streams, ptz works. Is there anything else you'd like me to test?

roleoroleo commented 2 years ago

A couple of days of operation and a couple of reboots. Nothing special.

avg-I commented 2 years ago

So 3 weeks down the road everything is still fine. The camera has been rebooted several times including graceful reboots and unexpected power-offs.

github-actions[bot] commented 3 months ago

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.