guino / Merkury1080P

Merkury1080P (CW017) Rooting and Customization
77 stars 16 forks source link

IPCAM FI02 Chacon #16

Open solutives opened 2 years ago

solutives commented 2 years ago

Hi, Here are the files of my IPCAM it's a Mini 8S, I follow the steps to have onvif (port 8000) or rstp (port 8554) working including ghidra but ppsapp file is different and I can't get neither one nor other working. You'll find the asked files as an attachment, if it could be possible I would like to have the ppsapp patched for my camera. Many thanks.

IPCAM_FI02_Chacon.txt --deleted--

guino commented 2 years ago

@solutives It looks like your ppsapp is incomplete as it is only 1.1Mb in size. The other 4.0.6 ppsapp files are about 2.7Mb -- I was unable to open the file in ghidra as the file was incomplete.

I would suggest you do this: 1-delete the "home" directory of the SD card 2-Power up the device with the SD card in it (normally) and it should recreate the home directory 3-Wait at least 5 minutes after power up before removing the SD card to make sure it doesn't leave anything incomplete

post the ppsapp file (hopefully with the full size).

solutives commented 2 years ago

Hi,

Sorry for mistake.

Here is the right one, patcher.js gives it a MD5 signature.

I hope it’ll work.

Thanks.

Le 1 nov. 2021 à 18:50, Wagner @. @.>> a écrit :

@solutives https://github.com/solutives It looks like your ppsapp is incomplete as it is only 1.1Mb in size. The other 4.0.6 ppsapp files are about 2.7Mb -- I was unable to open the file in ghidra as the file was incomplete.

I would suggest you do this: 1-delete the "home" directory of the SD card 2-Power up the device with the SD card in it (normally) and it should recreate the home directory 3-Wait at least 5 minutes after power up before removing the SD card to make sure it doesn't leave anything incomplete

post the ppsapp file (hopefully with the full size).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guino/Merkury1080P/issues/16#issuecomment-956448658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4YOPGLN6UA57TUDC5XX2DUJ3HPRANCNFSM5HCPUSRA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

guino commented 2 years ago

@solutives Seems like you replied to github's email (which goes to github and not me) -- you need to post the zip on the issue in github so I can get the file -- or you can email me directly (my email is on my github profile).

guino commented 2 years ago

@solutives Please try this patch for ppsapp with md5 5b3c755a6628d4821da2591fa2b432f4: ppsapp-onvif.zip

snap/mjpeg.cgi address: 0x027f1ec play.cgi address: 0x027f9f8

I would appreciate it if you let me know the results -- this code is slightly different than the existing 4.0.6 patches so I had to get creative.

solutives commented 2 years ago

Hi,

Thank you for the patch, patcher.js downloaded the ppsapp patched.

After inserting the SD card and reboot with the ppsapp patched (@ SD root), nmap showed me 3 open ports on the device: 23, 8000, 8080.

But I’m certainly wrong somewhere in the process because when I look to the content of the device with telnet, I see that the SD card is not mounted at /mnt: « cd /mnt » followed by « ls » shows an empty directory.

I can log into IP:8000/onvif no error message with VLC but no stream.

I can log into IP:8080/ with VLC but had an error message when snap/mjpeg.cgi is added at IP same for play.cgi (I didn’t find those directory/file with telnet).

Not sure of what I have to do with the addresses you gave me 0x027f1ec and 0x027f9f8.

Can you help to put me on the good track.

Thanks again. Jean-Louis.

Le 3 nov. 2021 à 16:52, Wagner @.***> a écrit :

@solutives https://github.com/solutives Please try this patch for ppsapp with md5 5b3c755a6628d4821da2591fa2b432f4: ppsapp-onvif.zip https://github.com/guino/Merkury1080P/files/7468860/ppsapp-onvif.zip snap/mjpeg.cgi address: 0x027f1ec play.cgi address: 0x027f9f8

I would appreciate it if you let me know the results -- this code is slightly different than the existing 4.0.6 patches so I had to get creative.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guino/Merkury1080P/issues/16#issuecomment-959529640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4YOPH4BBCG57H6E5CFBJ3UKFSGPANCNFSM5HCPUSRA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

guino commented 2 years ago

Sorry, forgot to mention:

After patching RTSP should be available at rtsp://IP:8554/Streaming/Channels/101 and rtsp://IP:8554/Streaming/Channels/102 user admin and password admin. Onvif should be available on port 8000 with same user/password.

The address I gave you for snap/mjpeg needs to be set in the snap.cgi and mjpeg.cgi files in the cgi-bin directory if you want to use that feature (you should have these files in the SD card if you followed all steps). The username and password for the cgi files will be whatever you set in httpd.conf - you can just open a browser and do: http://user:password@IP:8080/cgi-bin/snap.cgi or http://user:password@ip:8080/cgi-bin/mjpeg.cgi

The address for play.cgi can also be set in the play.cgi file if you want to use that feature: wiki

solutives commented 2 years ago

Hi,

Thanks for answer.

VLC or ffmpeg handle the 2 addresses rtsp you gave but unfortunately no stream.

ffmpeg -v trace -rtsp_transport tcp -i @.:8554/Streaming/Channels/101 @.:8554/Streaming/Channels/101>" output.avi

ffmpeg trace output:

Output #0, avi, to 'output.avi': Metadata: INAM : pps_rtsp ISFT : Lavf58.76.100 Stream #0:0, 0, 9/125: Audio: mp3 (U[0][0][0] / 0x0055), 8000 Hz, mono, s16p, delay 1105 Metadata: encoder : Lavc58.134.100 libmp3lame size= 6kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Input file #0 @.:8554/Streaming/Channels/101 @.:8554/Streaming/Channels/101>): Input stream #0:0 (video): 0 packets read (0 bytes); Input stream #0:1 (audio): 0 packets read (0 bytes); 0 frames decoded (0 samples); Total: 0 packets (0 bytes) demuxed Output file #0 (output.avi): Output stream #0:0 (audio): 0 frames encoded (0 samples); 0 packets muxed (0 bytes); Total: 0 packets (0 bytes) muxed Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

I’m still wrong, any idea, missing codec or other ?

Jean-Louis.

Le 4 nov. 2021 à 01:14, Wagner @. @.>> a écrit :

Sorry, forgot to mention:

After patching RTSP should be available at rtsp://IP:8554/Streaming/Channels/101 rtsp://IP:8554/Streaming/Channels/101 and rtsp://IP:8554/Streaming/Channels/102 rtsp://IP:8554/Streaming/Channels/102 user admin and password admin. Onvif should be available on port 8000 with same user/password.

The address I gave you for snap/mjpeg needs to be set in the snap.cgi and mjpeg.cgi files in the cgi-bin directory if you want to use that feature (you should have these files in the SD card if you followed all steps). The username and password for the cgi files will be whatever you set in httpd.conf - you can just open a browser and do: @.:8080/cgi-bin/snap.cgi @.:8080/cgi-bin/snap.cgi> or @.:8080/cgi-bin/mjpeg.cgi @.:8080/cgi-bin/mjpeg.cgi> The address for play.cgi can also be set in the play.cgi file if you want to use that feature: https://github.com/guino/BazzDoorbell/wiki/%5BHow-to%5D-Play-custom-sounds-trough-your-bell-speaker https://github.com/guino/BazzDoorbell/wiki/%5BHow-to%5D-Play-custom-sounds-trough-your-bell-speaker.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guino/Merkury1080P/issues/16#issuecomment-960311657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4YOPBJVLQCAJULABILINDUKHM7XANCNFSM5HCPUSRA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

guino commented 2 years ago

@solutives can you verify the video still works using the phone app after it didn't work on the rtsp links ? Can you also try mjpeg.cgi to see if it works ? I just need to know if the problem is the patch or something else.

solutives commented 2 years ago

The camera is still working with phone app.

After I got the files from the device in the first step, I didn’t see any cgi-bin directory on SD mounted on my computer, so I got this file from here https://github.com/guino/Merkury720/tree/main/mmc and copied it in SD with the *.cgi’s but when I log into the device with telnet, cgi-bin did not appear in /mnt/mmc01, cgi-bin seems to have been erased.

May be I did not follow the right process... JL

Le 4 nov. 2021 à 15:52, Wagner @.***> a écrit :

@solutives https://github.com/solutives can you verify the video still works using the phone app after it didn't work on the rtsp links ? Can you also try mjpeg.cgi to see if it works ? I just need to know if the problem is the patch or something else.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guino/Merkury1080P/issues/16#issuecomment-961101851, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4YOPDOH2V5LRKWBNH64QLUKKT3DANCNFSM5HCPUSRA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

guino commented 2 years ago

@solutives I will need you to create some log files for me to review.

To create a log file just edit custom.sh so that the line /mnt/mmc01/ppsapp & so it ooks like this: /mnt/mmc01/ppsapp 2>&1 > /mnt/mmc01/ppsapp.log & then a few minutes after booting the file ppsapp.log should be in the SD card (and you can download it with http://user:password@IP:8080/ppsapp.log (user:password from httpd.conf) or just copy it from the SD card).

I need you to make 2 log files: 1-with the patched ppsapp on the root of the SD card -- and try to access the RTSP feed like you did before and 2-with the oritinal ppsapp (copy from home/app) on the root of the SD card (RTSP will be unavailable so nothing to try)

The logs will allow me to compare what is or isn't running with my changes -- I obviously got something to start with the changes (since you said port 8000 is open) but I may need to enable something else and the logs would be very useful to determine that.

solutives commented 2 years ago

@guino https://github.com/guino

Got it work in Home Assistant, ONVIF integration and issue #9 https://github.com/guino/Merkury1080P/issues/9 with telnet I looked for a file which seemed like to /home/cfg/tuya_config.json I found it: /home/cfg/dev_settings.json , changing onvif_enable=0 to onvif_enable=1

Took off the SD, reboot no greeting message from camera blue led on.

I filled in the ONVIF integration form in HA: Ipcam Name, IP, admin, admin, et voilà ! It seems that ONVIF integration found its way to the stream even I didn’t mention the directory /onvif/Media at the IP end.

I reached my goal, for the fun, I'll make the logs tomorrow if you would like to work on them.

BR JLL

Le 6 nov. 2021 à 20:19, Wagner @. @.>> a écrit :

@solutives https://github.com/solutives I will need you to create some log files for me to review.

To create a log file just edit custom.sh so that the line /mnt/mmc01/ppsapp & so it ooks like this: /mnt/mmc01/ppsapp 2>&1 > /mnt/mmc01/ppsapp.log & then a few minutes after booting the file ppsapp.log should be in the SD card (and you can download it with @.:8080/ppsapp.log @.:8080/ppsapp.log> or just copy it from the SD card).

I need you to make 2 log files: 1-with the patched ppsapp on the root of the SD card -- and try to access the RTSP feed like you did before and 2-with the oritinal ppsapp (copy from home/app) on the root of the SD card (RTSP will be unavailable so nothing to try)

The logs will allow me to compare what is or isn't running with my changes -- I obviously got something to start with the changes (since you said port 8000 is open) but I may need to enable something else and the logs would be very useful to determine that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guino/Merkury1080P/issues/16#issuecomment-962497734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4YOPHENVJADJ2FALDY5ZDUKWETTANCNFSM5HCPUSRA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

guino commented 2 years ago

@solutives that is awesome, so there’s no need for logs.