Commit d1ac09fe authored by Martin Cífka's avatar Martin Cífka
Browse files

Added autorun, updated README

parent f170fd13
Loading
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ Control (JSON): TCP 192.168.42.1:7878

## Get root shell on the camera

Copy autorun.ash to the micro SD card root. Then connect over telnet (user: root, no password):
Copy `autoexec/telnet/autoexec.ash` to the micro SD card root. Then connect over telnet (user: root, no password):

	telnet 192.168.42.1

@@ -30,9 +30,17 @@ Copy autorun.ash to the micro SD card root. Then connect over telnet (user: root

	cd sdk

By running script run.sh, build a Docker container with the development environment and compile an executable from C++ files inside sdk/src/ directory (-b option), then copy and run it directly on the camera (-r option):
By running script `run.sh` with `-b` option build a Docker container with the development environment and compile an executable from C++ files inside `sdk/src/` directory (optionally run it also with `-r` option to copy `sdk/build` directory to the `/tmp/` on camera over Wifi and run the app there):

	./run.sh -br
	./run.sh -b


## Run the app on startup

Copy to the micro SD card root:

1. `sdk/build` directory and rename it to `miphoto`
2. `autoexec/autorun_app/autoexec.ash` to automatically run the app on startup


# Running the script on Android (5.0+)
+8 −0
Original line number Diff line number Diff line
# This autoexec ambshell script will automatically start the MiPhoto app

sleep 5

# Enable for telnet:
# t ipc rpc clnt exec2 '/usr/sbin/telnetd > /dev/null' 

t ipc rpc clnt exec2 '/tmp/SD0/miphoto/miphoto-start.sh &'
+0 −0

File moved.

sdk/build/miphoto-exec

0 → 100755
+9.35 MiB

File added.

No diff preview for this file type.

+6 −0
Original line number Diff line number Diff line
#!/bin/sh

sleep 3
cd /tmp/SD0/miphoto
./miphoto-exec >/dev/null