Camera WiFi in Client mode - WORKING .ash SCRIPT inside

ajohnclark

New Member
Joined
Aug 28, 2015
Messages
11
Reaction score
3
Country
United States
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:
OP
Andy_S

Andy_S

Active Member
Joined
May 5, 2015
Messages
621
Reaction score
192
Country
Czech Republic
I am trying to get it working again, they changed some background stuff so it is not working anymore... cross your fingers :(
 
OP
Andy_S

Andy_S

Active Member
Joined
May 5, 2015
Messages
621
Reaction score
192
Country
Czech Republic
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 :)
 

ajohnclark

New Member
Joined
Aug 28, 2015
Messages
11
Reaction score
3
Country
United States
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.
 
OP
Andy_S

Andy_S

Active Member
Joined
May 5, 2015
Messages
621
Reaction score
192
Country
Czech Republic
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.
 

nosys70

New Member
Joined
Nov 1, 2015
Messages
13
Reaction score
3
Country
Bhutan
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:

Beek

Member
Joined
Nov 24, 2015
Messages
60
Reaction score
0
Country
New Zealand
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:

monkeymovesaround

New Member
Joined
Dec 19, 2015
Messages
1
Reaction score
0
Country
United Kingdom
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! :)
 

Beek

Member
Joined
Nov 24, 2015
Messages
60
Reaction score
0
Country
New Zealand
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:

glockmane

New Member
Joined
Dec 25, 2015
Messages
1
Reaction score
0
Country
Germany
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!
 

jonny5alive

New Member
Joined
Dec 8, 2015
Messages
4
Reaction score
0
Country
United Kingdom
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?
 

getbetter

New Member
Joined
Dec 8, 2015
Messages
21
Reaction score
3
Country
United States
It should blink, check youtube videos or my previous post.
 

jonny5alive

New Member
Joined
Dec 8, 2015
Messages
4
Reaction score
0
Country
United Kingdom
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?
 

Delphir

New Member
Joined
Sep 14, 2015
Messages
13
Reaction score
0
Country
United States
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 ..
 

unamontez

New Member
Joined
Jan 6, 2016
Messages
4
Reaction score
1
Country
Germany
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...
 

Delphir

New Member
Joined
Sep 14, 2015
Messages
13
Reaction score
0
Country
United States
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:

unamontez

New Member
Joined
Jan 6, 2016
Messages
4
Reaction score
1
Country
Germany
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)
 

Delphir

New Member
Joined
Sep 14, 2015
Messages
13
Reaction score
0
Country
United States
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
 

Hdez

New Member
Joined
Jan 29, 2016
Messages
2
Reaction score
0
Country
United States
  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
 

Similar threads


Top