Camera WiFi in Client mode - WORKING .ash SCRIPT inside

Anyone try this with 1.2.13?

EDIT/UPDATE: Couldn't seem to get it working, 1st time using script though maybe I missed something.
 
Last edited:
I am trying to get it working again, they changed some background stuff so it is not working anymore... cross your fingers :(
 
actually... the script is still working, my whole problem was just too weak wifi signal for camera to catch in. So just make sure your wifi signal strength is sufficient enough :)
 
actually... the script is still working, my whole problem was just too weak wifi signal for camera to catch in. So just make sure your wifi signal strength is sufficient enough :)
Sweet- I'll try closer to router.

Andy_S: Have you tried making USB or HDMI ports broadcast as Ethernet at all? I tried quickly and failed but have been meaning to try again more thoroughly.
 
unfortunately, (althrough there is linux_mode switch for USB), when you plug-in OTG cable into USB port, nothing is detected by the system, so USB host seems to be disabled by firmware / missing drivers. thus, sadly, you won't be able to do that. And you can bet i'd LOVE to see THAT.
 
hello
could you provide the explanation to start several cameras at the same time with the wifi feature.
we can imagine each camera with a static IP, a small battery powered router with a static IP, and even the phone with a static ip if needed.
the network can or not be protected (open is ok).
i plan to use these small battery powered wifi AP.
http://www.everbuying.net/product816691.html?currency=USD&everbuying_shopping
this is for a 36o camera using 6 xiaomi
I mean i understood how to modify the files on the camera to get fixed IP, unprotected network and so on. Why i do not understand is how you can can start/stop the 6 cameras together.(i need to check the .py scipt)
Does the C&C software provide the option ? ideally would be better from smartphone, since i do not want to carry a laptop just to start and stop cameras.
i can easily wite an apk for android, the only problem is i do not know what to send to the IP.
 
Last edited:
Congratulations
First. Congratulations for this great work @Andy_S . I really appreciate your job. Not just words, I donated for a coffe to you.

My project
I am working in a 360 mount for my wedding :D. But I have a problem with multicam or CC.
I have 6 cameras in a mount.

The problem
My cameras connect Ok in client mode but I just can take one photo and after that when I press take photo it just sounds a beep, but doesnt save the pic. And when I try to record it looks that the record start but when I stop it still like recording (led) and get freeze, I need to remove battery to restart and dont save nothing of video.

What I tried
I tried with notepad++, enabling and disabling whatchdog, static and dynamic ip, installing python (with python installed is faster the script in windows 10), with firmwares 1.1 , 1.2.1, 1.2, 1.2.6, I tried with a virtual router, I tried with 1, 2 3 cameras, with physical router and always the same thing...

In normal mode without client mode works great in CC, but in client mode in CC is the same error descripted above

The question
You know if this is a bug or if I am doing something wrong?

Julio I'm having exactly the same problem, did you ever find a solution?

The camera will record video when in AP mode, however in Station mode it flashes and beeps a bit, but no video is saved to the SD card.

I've tried this with both Lucky's app and Andy's CC software, and the same thing happens. I've tried changing firmware versions, running telnet and everything I can think of or find in this forum with no solution. I've also tried on all 6 cameras. Same thing on each.

What is it about running over a network that stops it recording video?
 
Last edited:
hi there , trying to get this script to get my xiaomi camera to auto log onto my android (running a mobile hotspot with foxfi - ultimately I'm trying to get 6 to connect so I can use the ponerine app to autostart for a 360 rig, but testing with one unit for now)

I've copied the scripts onto my SD card as this thread directs , and I have the folder wifi (containing: sta.sh watchdog.sh & wpa_suppliant.conf) & the autoexec.ash file

I've edited the wpa_suppliant.conf to show:

ctrl_interface=/var/run/wpa_supplicant
network={
ssid="Monkey360"
key_mgmt=WPA-PSK
proto=WPA2 WPA
pairwise=CCMP TKIP
psk="monkeycamera"
}

And I also editied/added I think telnet to the autoexec.ash file:

sleep 10
lu_util exec telnetd -l/bin/sh
t pwm 1 enable
sleep .5
t pwm 1 disable
lu_util exec '/tmp/fuse_d/wifi/sta.sh'
t pwm 1 enable
sleep 1
t pwm 1 disable
#Uncomment following line for network keepalive watchdog; EDIT watchdog.sh BEFORE USING!
lu_util exec '/tmp/fuse_d/wifi/watchdog.sh'

I'm not getting the camera to log onto my android hotspot to enable me to use the ponerine app? Any suggestiosn where I'm going wrong? if it helps its the Z23L version of the camera running 1.2.13 firmware

Not sure what else I'm missing or if I need to do anything else to the camera before loading scripts? (did try the ponerineS app but didnt really understand what i should be doing)

thanks in advance! :)
 
I'd suggest dropping telnet and watchdog until you've got them working, I've never got Watchdog working at all - just crashed my cameras.

I could also never get a fixed IP working on my phone hotspot, just dynamic IP. Its fine because once the phone has assigned an IP it seems to always keep it.
 
Last edited:
Hi there!

Tried the script and camera makes the long beep..

Router log:

sending OFFER to 192.168.2.129
sending ACK to 192.168.2.129
sending ACK to 192.168.2.129

Problem: I cannot connect to the camera, tried C&C and Xiaomi YI Android App..

My Firmware: 1.2.13

Thank you very much!
 
I'm having issues having my Yi connect to an existing access point.

I've triple checked the configuration but not getting any success.

Should the wifi LED on the Yi illuminate?
 
It should blink, check youtube videos or my previous post.
 
I'm afraid I'm not having any success with it.

I have firmware version 1.2.13. I have factory reset the camera, and then enabled wifi to turn on automatically with the Xiaomi Yi Android app.

I turned the camera off, and inserted my SD card with the unzipped files on, which were edited to have my access point details.

But after turning the camera on and waiting a few minutes, there is no new DHCP lease on my router.

I've tried with WPA2 and with an open access point.

Any ideas?
 
Andy, were you able to get camera working on 1.2.13 when watchdog is enabled? For me cam is beeping when I touch the buttons, but nothing is saved to SD. I also managed to work Xiaomi andoid app with cam in AP mode, but RTSP is not working with watchdog too. Looks like sensor is not activated because autoexec is not finished (because of the watchdog) or something like this..
Another problem, sta.sh is not able to work itself during boot (without watchdog). Network is up for a few seconds and then it goes down once autoexec execution is finished ..
 
Hi Andy,

I was trying to get the script working on a Z23L with 1.2.13 for the last weeks. I tried different Accesspoints, changed nearly every possible setting (with or without watchdog), but the most I could achieve is the visibility of the camera IP for some seconds before it went offline again. I have no idea anymore what I could do to switch the camera in station mode, maybe there is sombody out there who can help me???

Thanks a lot in advance...
 
Hi Andy,

I was trying to get the script working on a Z23L with 1.2.13 for the last weeks. I tried different Accesspoints, changed nearly every possible setting (with or without watchdog), but the most I could achieve is the visibility of the camera IP for some seconds before it went offline again. I have no idea anymore what I could do to switch the camera in station mode, maybe there is sombody out there who can help me???

Thanks a lot in advance...

There is a bug in watchdog ping-part, so when the network is down for a long time - no recovery happens. And that network loss in the beginning - this is something in the firmware itself what kicks the network on every boot, but with correct watchdog it can be quickly recovered after this.

here is my version of ping-check which is working perfectly for me on 1.2.13

Code:
    count=$(ping -W $WAIT -c $COUNT $HOST | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
    count=$(($count + 0))
    if [ $count -lt $(( $COUNT * $PERCENT / 100 )) ]; then
        if pidof "sta.sh" >/dev/null; then
            echo "sta.sh Process already running"
            date
        else
            echo "watchdog Restarting sta.sh"
            date
            $ACTION 2>&1 &
        fi
    fi
 
Last edited:
There is a bug in watchdog ping-part, so when the network is down for a long time - no recovery happens. And that network loss in the beginning - this is something in the firmware itself what kicks the network on every boot, but with correct watchdog it can be quickly recovered after this.

here is my version of ping-check which is working perfectly for me on 1.2.13
Thank you so much Delphir,
where exactly in watchdog.sh shall I put your code?? (Sorry, but I'm a photographer and not a programmer)
 
Thank you so much Delphir,
where exactly in watchdog.sh shall I put your code?? (Sorry, but I'm a photographer and not a programmer)

instead of these lines:

Code:
    count=$(ping -W $WAIT -c $COUNT $HOST | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
    if [ $count -lt $(( $COUNT * $PERCENT / 100 )) ]; then
      $ACTION
    fi
 
  1. Download
  2. Enable start_wifi_while_booted in camera Not needed, but wifi LED will be off.
  3. Unpack on your SD card
  4. modify wpa_supplicant.conf for your network
  5. turn on camera and wait for 1s beep
Do i need to say more? :D

Tested on 1.2.13, 1.2.0 and 1.0.12 - should work on other firmware versions as well (dunno, didn't test).

Does not do any permanent changes!
When you remove these files from your SD card, you get your camera back to original.


I added a simple watchdog.sh script that is launched AS LAST COMMAND IN autoexec.sh
Even if you want to use some more tweaks, this line must be the last - following lines will not be executed.
Just uncomment it in autoexec.ash and modify in wifi/watchdog.sh and it will monitor camera's wifi & reconnect when needed.

Known "bug" - when camera loses wifi signal (for ANY reason), it does not reconnect, you need to restart camera.


Hi, anyone has a contact on devs from xiaomi? for reporting bugs and stuff?

If you like my work, consider donating some spare change :)

Hi Andy,
I successfully was able to use your script by using a static ip address under a Linux system. However, when I was using the multitrigger tool to take a photo I cannot take more than one picture without closing the application.
Thank you
 
Back
Top