Camera WiFi in Client mode - WORKING .ash SCRIPT inside

StfLA

Member
Joined
Aug 6, 2015
Messages
73
Reaction score
5
Country
France
OK I must be doing something really simple wrong. I download the scripts. I modify the wa-supplicant to reflect my home network and password. I upload to the sd card (I upload the whole folder called wifi correct?) I press the on button, light turns blue but nothing happens. I cant see it on my home network nor on any of my android devices. Nothing seems to have changed. Of course if I press the wifi button and enable it I can see the yi on my android but that using its default IP address and that doesnt help me. So can someone hold my hand and step me through the process in very simple english (I should point out I am not a complete newby, I have spent a good few years coding perl,html and mysql. Different I know but you get what I mean.)
Did you forgot to copy the autoexec file on the root of the sd card ?
 

reaper7

New Member
Joined
Nov 26, 2015
Messages
18
Reaction score
6
Country
Poland
Dash Cam
XiaomiYi(23L)
...and of course line ending unix style (LF) not as is default on windows CR+LF
 

Adrian Fischer

New Member
Joined
Feb 23, 2016
Messages
15
Reaction score
0
Country
Australia
At last...I now have to yi connected to M.Ponerine. I set ip address manually. I can also have them both open in C&C but still cant see them in my router. Oh well. They key was obvioulsy the autoexec but then I had to copy and past the wifi files from one card to the other and then just adjust the ip address in the sta file. A happy camper.
 

Adrian Fischer

New Member
Joined
Feb 23, 2016
Messages
15
Reaction score
0
Country
Australia
I use my Yi's to record weddings. I use 5 of them. Im playing m M.Ponerine to get them all started remotely. It looks promising. Ideally I turn them all using this script then walk away. When the ceremony is about to start I hit record on Ponerine and thats all I need to do. All 5 cameras start recording ( I might throw in a beep for syncing later). Once the recording is started I dont need wifi any more. At the end of the ceremony I just walk around and turn then off manually. So being able to shut down the wifi remotely would be good to save some battery life ( I currently use them plugged into power cells and can have them running for well over an hour without issue). I know the script example below is only sleeping for 5 minutes but Im just fiddling and was wondering if I had the logic right.

if I add this to the end of the autoexec file will it shut down wifi as I think it should?

sleep 5m #wait 5 minutes
lu util exec '/tmp/fuse_d/wifi/wifi_stop.sh'

with wifi_stop located in the wifi folder.
 

reaper7

New Member
Joined
Nov 26, 2015
Messages
18
Reaction score
6
Country
Poland
Dash Cam
XiaomiYi(23L)
if "5m" works on Yi then I think YES. You must test it...

Second way is a additional sh script executed/started from autoexec, which in loop checks file numbers inside DCIM folder,
or little fast way - check if DCIM dir is empty (if You start Your work with empty folder :) )

if at some point DCIM file numbers are greater than at the start of the script then script run wifi_stop.sh
 

alemoke

New Member
Joined
Dec 18, 2015
Messages
3
Reaction score
0
Country
Ukraine
Everything works, but there is a problem. The first photo is saved only. And then the signal is, but as a result there is no photo. What could be the problem? In standard mode, no problem. Saves all.
 

Heriyanto Nuranas

New Member
Joined
Mar 8, 2016
Messages
5
Reaction score
0
Country
Indonesia
Hi,... all Thanks for great job. I'm newbie here, and sorry for my english, I need assistance about my sta.sh script

Code:
#!/bin/sh

MyMAC="04:E6:76:01:01:01"

#set to 1 if you want to use mac specified above (custom MAC address) in case you get random ones.
#!!!DOES NOT APPLY IF YOU HAVE STATIC MAC!!!
CustomMAC=0

if [ -e /tmp/wifi0_mac ]; then
    mac=`cat /tmp/wifi0_mac`
fi

mac2=`cat /proc/ambarella/board_info  | grep wifi_mac | awk '{ print $2 }' | tr '[:lower:]' '[:upper:]'`

if [ "${mac2}" == "00:00:00:00:00:00" ] ||  [ "${mac2}" == "" ]; then
    if  [ $CustomMAC -eq 1 ]; then
        mac=${MyMAC}
    fi
fi
       

wait_wlan0()
{
    n=0
    ifconfig wlan0
    waitagain=$?
    while [ $n -ne 6 ] && [ $waitagain -ne 0 ]; do
        n=$(($n + 1))
        echo $n
        sleep 1
        ifconfig wlan0
        waitagain=$?
    done
}

killall -9 hostapd hostapd_autochannel_retartchip dnsmasq udhcpc wpa_supplicant wpa_cli wpa_event.sh 2> /dev/null
killall -9 hostapd hostapd_autochannel_retartchip dnsmasq udhcpc wpa_supplicant wpa_cli wpa_event.sh 2> /dev/null
rmmod bcmdhd

insmod /lib/modules/bcmdhd.ko firmware_path=/usr/local/bcmdhd/fw_apsta.bin nvram_path=/usr/local/bcmdhd/nvram.txt iface_name=wlan dhd_msg_level=0x00 op_mode=1 amba_initmac=${mac}
wait_wlan0
driver=nl80211

/usr/bin/wpa_supplicant -D${driver} -iwlan0 -c/tmp/fuse_d/wifi/wpa_supplicant.conf -B
sleep 5

#either static or dynamic IP (DHCP)

ifconfig wlan0 192.168.8.20 netmask 255.255.255.0

#udhcpc -i wlan0 -A 2 -b -t 30

just edit ip number but yicam not get ip in my router ,....
wifi-png.21636

i need assistance for resolve this problem,...

thanks for u'r help,....
 

Attachments

  • Wifi.png
    Wifi.png
    10.8 KB · Views: 333

Kenneth Tan

New Member
Joined
May 18, 2016
Messages
2
Reaction score
0
Country
Netherlands
I managed to have the cam connect to the local wifi acces point with the downloaded scripts.
The camera get's it's own Ip adres.
But what now? I can't see any services I can connect to. Also the Yi app refuses to recognize the camera.
I'd love to acces this camera with a IPCam app on my pc or android devices.
Can someone help me?
 

Kenneth Tan

New Member
Joined
May 18, 2016
Messages
2
Reaction score
0
Country
Netherlands
This is noobish,
but I am able to connect my xiaomi yi to my wlan, I can see its ip address, but I just can't move forward from there. I can't see any video, I've already configured my router to enable ports on my xiaomi. I've tried using my browser and writing (ip address) 192.168.1.71:80, nothing happens, neither using port 8080. Can't connect using VLC media player. IP Camera Tool software doesn't detect my camera.
Perhaps this script doesn't allow me to do what I thought it could do (use yi as an ip camera)

I have the same problem here.
Love to see it work on WebcamXp or any other IPCam software on PC or android.
 

lts-x

New Member
Joined
Feb 18, 2016
Messages
4
Reaction score
2
Country
Australia
You can get this app

https://dashcamtalk.com/forum/threa...-controller-for-android-add-photo-mode.14071/

You can use it to trigger multiple cameras to take a photo or video.

It connects over telnet so it will be slow and laggy.
There's another app called Brahma which does the same, but looks nicer. There are bugs - preview mode locks image resolution to 5Mp - with it and it's slow as well.

Don't expect these apps to be updated that frequently.

Live stream will be very slow and laggy. It depends on what sort of bitrate you've hacked the camera to shoot at.

The official Xiaomi app doesn't work if you have the camera connected to a different IP. You can only manage it using the two apps I've mentioned if you've connected it to a router or your phone's hotspot.
 

waymon

New Member
Joined
May 23, 2016
Messages
5
Reaction score
0
Country
United States
How would I trigger all 6 of my Yi's to start recording from my phone? The catch...without a wireless router.

I have a 360 6-camera rig setup that I would love to control outside with no laptop and no wireless router. Is that possible?

Right now I have all 6 cams connecting to a wireless router that I can multitrigger through C&C...however, it would be great if I could do it from my phone with no router...somehow connect to all 6 from my phone. Possible?
 

JRSim_UIX

Member
Joined
Dec 7, 2015
Messages
83
Reaction score
16
Country
United Kingdom
How would I trigger all 6 of my Yi's to start recording from my phone? The catch...without a wireless router.

I have a 360 6-camera rig setup that I would love to control outside with no laptop and no wireless router. Is that possible?

Right now I have all 6 cams connecting to a wireless router that I can multitrigger through C&C...however, it would be great if I could do it from my phone with no router...somehow connect to all 6 from my phone. Possible?


https://dashcamtalk.com/forum/threads/xiaomi-yi-360-vr-6-camera-rig-android-app-brahma-alpha.16912/ ;)

Allows you to connect to 2, 6 or 7 camera rig and start from your phone - Android only ATM.
 

diragusa

New Member
Joined
Jul 25, 2016
Messages
3
Reaction score
0
Country
Canada
what about a simple script that turns on the wifi when booted up?
 

Evils

New Member
Joined
Jul 23, 2016
Messages
4
Reaction score
0
Country
Germany
I just bought a Xiaomi Yi for exactly this purpose but I can't seem to get it to work.
I had a super old firmware on it (1.0.x) where my script worked, unfortunately the fw updated to 1.2.13 and the camera isn't showing up on my wifi anymore.
The model's SN starts with Z23L.
What's strange is, that the camera will stop reacting to all buttons after the second 1s beep and to turn it off I either have to take out the battery or long press the power button.
Any ideas?
 
Top