Camera WiFi in Client mode - WORKING .ash SCRIPT inside

Discussion in 'Yi Action Camera' started by Andy_S, Jun 21, 2015.

  1. StfLA

    StfLA Member

    Messages:
    57
    Likes Received:
    3
    Country:
    France
    Did you forgot to copy the autoexec file on the root of the sd card ?
     
  2. reaper7

    reaper7 New Member

    Messages:
    18
    Likes Received:
    6
    Country:
    Poland
    Dash Cam:
    XiaomiYi(23L)
    ...and of course line ending unix style (LF) not as is default on windows CR+LF
     
  3. Adrian Fischer

    Adrian Fischer New Member

    Messages:
    15
    Likes Received:
    0
    Country:
    Australia
     
  4. Adrian Fischer

    Adrian Fischer New Member

    Messages:
    15
    Likes Received:
    0
    Country:
    Australia
    Im using notepad++ so that shouldnt be an issue
     
  5. Adrian Fischer

    Adrian Fischer New Member

    Messages:
    15
    Likes Received:
    0
    Country:
    Australia
    sorry I cant see that autoexec anywhere?
     
  6. Adrian Fischer

    Adrian Fischer New Member

    Messages:
    15
    Likes Received:
    0
    Country:
    Australia
    ok I have the autoexec now and I get the beeb at 30 seconds so thats a step in the right direction but I still cant see it on my home network
     
  7. Adrian Fischer

    Adrian Fischer New Member

    Messages:
    15
    Likes Received:
    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.
     
  8. Armdromeda

    Armdromeda New Member

    Messages:
    27
    Likes Received:
    6
    Country:
    Australia
    works perfectly, thanks so much.
     
  9. Adrian Fischer

    Adrian Fischer New Member

    Messages:
    15
    Likes Received:
    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.
     
  10. reaper7

    reaper7 New Member

    Messages:
    18
    Likes Received:
    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
     
  11. alemoke

    alemoke New Member

    Messages:
    3
    Likes Received:
    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.
     
  12. Heriyanto Nuranas

    Heriyanto Nuranas New Member

    Messages:
    5
    Likes Received:
    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 ,....
    [​IMG]
    i need assistance for resolve this problem,...

    thanks for u'r help,....
     

    Attached Files:

    • Wifi.png
      Wifi.png
      File size:
      10.8 KB
      Views:
      270
  13. Kenneth Tan

    Kenneth Tan New Member

    Messages:
    2
    Likes Received:
    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?
     
  14. Kenneth Tan

    Kenneth Tan New Member

    Messages:
    2
    Likes Received:
    0
    Country:
    Netherlands
    I have the same problem here.
    Love to see it work on WebcamXp or any other IPCam software on PC or android.
     
  15. lts-x

    lts-x New Member

    Messages:
    4
    Likes Received:
    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.
     
    JRSim_UIX likes this.
  16. waymon

    waymon New Member

    Messages:
    4
    Likes Received:
    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?
     
  17. StfLA

    StfLA Member

    Messages:
    57
    Likes Received:
    3
    Country:
    France
    Is there a faster way to control multiple Yi ?
     
  18. JRSim_UIX

    JRSim_UIX Member

    Messages:
    83
    Likes Received:
    16
    Country:
    United Kingdom

    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.
     
  19. diragusa

    diragusa New Member

    Messages:
    3
    Likes Received:
    0
    Country:
    Canada
    what about a simple script that turns on the wifi when booted up?
     
  20. Evils

    Evils New Member

    Messages:
    4
    Likes Received:
    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?
     
Loading...

Share This Page