samtap / fang-hacks

Collection of modifications for the XiaoFang WiFi Camera
1.67k stars 341 forks source link

Support Chuangmi 720p camera? #235

Closed jymbob closed 6 years ago

jymbob commented 7 years ago

Just picked up a pair of "Chuangmi" cameras from GearBest - https://www.gearbest.com/ip-cameras/pp_701750.html

They're using the same app, and appear to be very similar in setup.

My FTDI is in the post so I may be able to provide some debugging information if that's helpful.

alexzip87 commented 6 years ago

no news bad news :(

jymbob commented 6 years ago

No news no news. Sorry, no time to spend on this at the moment.

On Fri, 30 Mar 2018, 23:06 alexzip87, notifications@github.com wrote:

no news bad news :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samtap/fang-hacks/issues/235#issuecomment-377634128, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9NFcFFlOR-MhhEY4Yp5ph8WSQ0wfLFks5tjqxlgaJpZM4P4QLa .

sdesalve commented 6 years ago

Hi @jymbob, is there any news?

Have you founded time to run RTSP server on our Chuangmi Cam?

zloybatanik commented 6 years ago

I found! at first you must use recovery image https://github.com/jymbob/fang-hacks and then install this https://github.com/ghoost82/mijia-720p-hack

rtsp working with 3-4 sec lag

sdesalve commented 6 years ago

@zloybatanik not worked for me My Chunagmi firmware is 3.3.6_2017092810

Mi Home suggest me an UPDATE: 3.3.6_201802014. Should I apply them?

zloybatanik commented 6 years ago

@sdesalve try update 3.3.6_201802014 first

sdesalve commented 6 years ago

@zloybatanik doesn't work for me.

I've used recovery image (https://github.com/jymbob/fang-hacks) that downgrade firmware to 3.3.6_2017092810 and let me login thru telnet.

Then I've installed this https://github.com/ghoost82/mijia-720p-hack but without lucky: is there only a telnet server and mijia-720p-hack.cfg is ignored...

I've also tried to upgrade firmware to 3.3.6_2017092810 with MiHome but same result: don't work :(

zloybatanik commented 6 years ago

Did same with my second camera, works perfectly. My steps:

  1. I format a SD card with FAT32
  2. Put the image tf_recovery.img on it.
  3. Switch off the camera.
  4. Put the SD card in the camera and power it on.
  5. Switch off the camera.
  6. Copy everything from https://github.com/ghoost82/mijia-720p-hack/tree/master/sdcard to SD card root
  7. Edited mijia-720p-hack.cfg
  8. Put the SD card in the camera and power it on.
  9. When the blue light stopped blinking open http://camera_ip/ (don`t try /cgi-bin/status, its working from the "/")
tomsteenbakkers commented 6 years ago

Just checking. This is the camera you used for the hack?

[image1.jp2]

Tom

On 25 Aug 2018, at 13:37, SGM notifications@github.com<mailto:notifications@github.com> wrote:

Did same with my second camera, works perfectly. My steps:

  1. I format a SD card with FAT32
  2. Put the image tf_recovery.img on it.
  3. Switch off the camera.
  4. Put the SD card in the camera and power it on.
  5. Switch off the camera.
  6. Copy everything from https://github.com/ghoost82/mijia-720p-hack/tree/master/sdcard to SD card root
  7. Edited mijia-720p-hack.cfg
  8. Put the SD card in the camera and power it on.
  9. When the blue light stopped blinking open http://camera_ip/ (don`t try /cgi-bin/status, its working from the "/")

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/samtap/fang-hacks/issues/235#issuecomment-415963279, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXeTqFPU3Jv6TaHEReYB4d8rwkewzdQjks5uUTcDgaJpZM4P4QLa.

zloybatanik commented 6 years ago

@tomsteenbakkers no image in your comment( https://www.gearbest.com/ip-cameras/pp_701750.html this cameras I used

tomsteenbakkers commented 6 years ago

Ok that was the camera I mean. Thanks. Will try it today.

Tom

On 25 Aug 2018, at 13:48, SGM notifications@github.com<mailto:notifications@github.com> wrote:

@tomsteenbakkershttps://github.com/tomsteenbakkers no image in your comment( https://www.gearbest.com/ip-cameras/pp_701750.html this cameras I used

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/samtap/fang-hacks/issues/235#issuecomment-415963798, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXeTqPsdP3dDzRKoQfOmPNsnKU2ymY8Jks5uUTmPgaJpZM4P4QLa.

tomsteenbakkers commented 6 years ago

When do you need to switch off the camera after step 4. Is the light yellow or blue?

On 25 Aug 2018, at 13:37, SGM notifications@github.com<mailto:notifications@github.com> wrote:

Did same with my second camera, works perfectly. My steps:

  1. I format a SD card with FAT32
  2. Put the image tf_recovery.img on it.
  3. Switch off the camera.
  4. Put the SD card in the camera and power it on.
  5. Switch off the camera.
  6. Copy everything from https://github.com/ghoost82/mijia-720p-hack/tree/master/sdcard to SD card root
  7. Edited mijia-720p-hack.cfg
  8. Put the SD card in the camera and power it on.
  9. When the blue light stopped blinking open http://camera_ip/ (don`t try /cgi-bin/status, its working from the "/")

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/samtap/fang-hacks/issues/235#issuecomment-415963279, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXeTqFPU3Jv6TaHEReYB4d8rwkewzdQjks5uUTcDgaJpZM4P4QLa.

chris777c commented 6 years ago

I try to do that and don't work for me :

  1. I format a SD card with FAT32
  2. Put the image tf_recovery.img on the root.
  3. Switch off the camera.
  4. Put the SD card in the camera and power it on and I wait until blue led stopped blinking
  5. Switch off the camera. 5'. I see SD card and tf_recovery.img is change name to tf_recovery.img.bak and log folder is create white messages file
    1. Copy everything from https://github.com/ghoost82/mijia-720p-hack/tree/master/sdcard to SD card root
    2. Edited mijia-720p-hack.cfg
    3. Put the SD card in the camera and power it on.
  1. When the blue light stopped blinking open http://camera_ip/ don't work for me neither ssh nor http access but telnet access work
sdesalve commented 6 years ago

Same thing for me. Like @chris777

tomsteenbakkers commented 6 years ago

Save for me. When using Fing I see that only port 23 (= Telnet) is open. Other ports are not available.

tomsteenbakkers commented 6 years ago

I think it has to do that the camera can not boot from the SD.

How did you format the SD card (tool, size, etc) and how did you copy the content of the directory SDCARD to the sdcard?

sdesalve commented 6 years ago

@tomsteenbakkers I've formatted my SD card with Windows 10

image

And copied file with Explorer's drag & drop.

Shoud I use an other way?

tomsteenbakkers commented 6 years ago

I was wondering why the steps worked for you and not for me. I did the same steps but no hack is applied. So, maybe I’m doing something different.

I will search for another solution.

jymbob commented 6 years ago

Can't check because I've misplaced my SD card, but it probably needs to be set as bootable.

On Sun, 26 Aug 2018, 15:45 Tom Steenbakkers, notifications@github.com wrote:

I was wondering why the steps worked for you and not for me. I did the same steps but no hack is applied. So, maybe I’m doing something different.

I will search for another solution.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samtap/fang-hacks/issues/235#issuecomment-416043955, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9NFbaF71dGfAwWEN7tXsxCmoZq-ukVks5uUrR_gaJpZM4P4QLa .

tomsteenbakkers commented 6 years ago

Ok, I will reformat it and set it to bootable. Any suggestions on how to put the content of the directory sdcard on the sdcard. Just copy it using the Mac OS finder?

jymbob commented 6 years ago

Yeah, just copying should be fine

On Sun, 26 Aug 2018, 16:09 Tom Steenbakkers, notifications@github.com wrote:

Ok, I will reformat it and set it to bootable. Any suggestions on how to put the content of the directory sdcard on the sdcard. Just copy it using the Mac OS finder?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samtap/fang-hacks/issues/235#issuecomment-416045596, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9NFcf4s7gUqM2_r58YLuOajlKniER1ks5uUrolgaJpZM4P4QLa .

tomsteenbakkers commented 6 years ago

When I want to create a bootable sdcard and need to select an image file. Which one should I use, the tf_recovery.img from step 1?

jymbob commented 6 years ago

No, you're confusing a bootable drive (eg with Linux on) and a Fat32 drive with the boot flag set. Sorry, no idea how to do that on MacOS

On Sun, 26 Aug 2018, 16:27 Tom Steenbakkers, notifications@github.com wrote:

When I want to create a bootable sdcard and need to select an image file. Which one should I use, the tf_recovery.img from step 1?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samtap/fang-hacks/issues/235#issuecomment-416046738, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9NFQpSvAULIFunUDIFfpafUXOlYrTvks5uUr5igaJpZM4P4QLa .

tomsteenbakkers commented 6 years ago

Ok, I have format the SD card with the same settings as sdesalve but nothing happens when rebooting the camera. The only difference is that the card is shown in the Mi Home App. I'm using an 4 GB sd card. That the difference between sdesalve. Any suggestions?

sdesalve commented 6 years ago

@tomsteenbakkers @jymbob @chris777c I'm not able to run RTSP server like @zloybatanik stated.

I've followed all steps in this comment https://github.com/samtap/fang-hacks/issues/235#issuecomment-415963279 without any luck.

Is there any other user that have been able to run this hack RTSP server on Chuangmi?

tomsteenbakkers commented 6 years ago

@sdesalve sorry I thought it was working for you. I stop trying. Tried everything.

jymbob commented 6 years ago

I've got some time in September when I can try it. Will report back

On Sun, 26 Aug 2018, 17:27 Tom Steenbakkers, notifications@github.com wrote:

@sdesalve https://github.com/sdesalve sorry I thought it was working for you. I stop trying. Tried everything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samtap/fang-hacks/issues/235#issuecomment-416050903, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9NFT8vmZj4dHi5FnTWGK_pwK7EddI0ks5uUsxfgaJpZM4P4QLa .

tomsteenbakkers commented 6 years ago

Much appreciated!

If I need to test something for you please send me a message and I will help you.

jymbob commented 6 years ago

Found some time, opened some wine, and figured this out :smile:

The issue is that the latest master doesn't contain the pre-built binaries

The binaries are on the release track: https://github.com/ghoost82/mijia-720p-hack/releases/tag/v0.95

So, in short:

  1. set up camera in MiHome app
  2. in camera settings find your IP address
  3. power off camera
  4. format SD card to FAT32
  5. copy tf_recovery.img to the card, insert into camera and power on
  6. after about a minute you should have telnet access (telnet 192.168.1.xxx)
  7. power off camera
  8. go to the Ghoost82 repo and download the zip (this is the difference)
  9. unpack the zip and copy the contents to the SD card
  10. change settings in mijia-720p-hack.cfg
  11. insert back into camera and power up
  12. after about 30 seconds browse to http://192.168.1.xxx to access your camera

Phew. I'm seeing a working RTSP stream with about a 2 second delay. Thanks all!

I'll tidy this lot up and stick it in my repo when I get chance. Just about to leave for holiday, so probably not before September. NB: I claim no credit for the code, just doing some caretaking.

tomsteenbakkers commented 6 years ago

I will test this new version tomorrow! And will record every step, if this works we have a manual.

chris777c commented 6 years ago

thank you very much, great work for me

sdesalve commented 6 years ago

It works!

There is some lag and RTSP stream is not very stable... I hope in future developements

thank you!

tomsteenbakkers commented 6 years ago

It works also for me. I got the RTSP stream! Now trying to add the camera to Homebridge!

tomsteenbakkers commented 6 years ago

Just added the camera as homebridge camera, and also this works. I can now use the camera in the Apple Home app. With this hack it's also HomeKit compatible 👍👍

The speed can use some improvement, there is little delay. But, I'm Happy

roboterm commented 6 years ago

Just added the camera as homebridge camera, and also this works. I can now use the camera in the Apple Home app. With this hack it's also HomeKit compatible 👍👍 ...

@tomsteenbakkers can your share the config.json you’re using, pls?

Sent with GitHawk

tomsteenbakkers commented 6 years ago

@roboterm This is the section for the camera

        {
            "platform": "Camera-IP",
            "cameras": [
                {
                    "name": "Meterkast",
                    "videoConfig": {
                        "source": "-re -i rtsp://192.168.1.193:554/live/ch00_0",
                        "stillImageSource": "-i http://192.168.1.193/media",
                        "maxStreams": 2,
                        "maxWidth": 640,
                        "maxHeight": 480,
                        "maxFPS": 30
                    }
                }
            ]
        },
jymbob commented 6 years ago

I've now updated and renamed my repo: https://github.com/jymbob/chuangmi-720-hack

I'm not the author of any of the work, but it seems sensible to collate it in one place rather than on another ticket. Marking this issue closed as we now have a functioning RTSP stream

alexandreberton commented 6 years ago

Works also for me great thanks. The only point is I cannot disable the status light. I tried from the config file and from the web server page but it doesn't work.

mtsardakas commented 5 years ago

Hey folks, thanks a lot for this. Has anybody tried it for the 1080p version of the same camera?

roboterm commented 5 years ago

@tomsteenbakkers I have tried your config and I suggest you to add a video codec like omx.

cherylldc commented 5 years ago

why my cam its nothing change when step hack for rstp? .img was succes, its show telnet work, but next step seem nothing change, any suggestion?

tomsteenbakkers commented 5 years ago

Use this thread https://github.com/miicam/MiiCam and you will also get a user interface op the camera.

cherylldc commented 5 years ago

@tomsteenbakkers tq, now my rstp work, but i not to understain about config setting, now my cam cannot view from miapp again, but its work with rtsp, thanks alot, (can i change my config setting on my sd card after this?)

tomsteenbakkers commented 5 years ago

@cherylldc When applying the hack the camera doet not work with the Mi Home App. Just remove the SD card, reboot the camera and it's working in the Mi Home App.

Please read this https://miicam.github.io and you will find answers to all your questions.

cherylldc commented 5 years ago

ok, thanks alot tom, its very helpfull for me, soo i can use this cam via rtp, and ueonviver/ipcentcom at my windows