SDK - Developer tricks

From edgertronic high speed video camera
Jump to navigation Jump to search


Home

CAMAPI Developer options




For development, you should buy several high quality 2 to 16 GB microSD cards. You can directly program the microSD card if you have an update tarball file. Keep the original microSD card that came with the camera so you can always have a way to run the released code. Edgertronic does not support the camera if you are running modified software.

Replace 10.11.12.13 with the IP address being used by your camera.

View camera file system with web browser

Try out example host CAMAPI example

On a host computer that supports python, browse to http://10.11.12.13/static/host and download:

  • hcamapi.py
  • hcamapi_example_usage.py

Put both of those files in the same directory and from a terminal windows, run:

python hcamapi_example_usage.py -a 10.11.12.13

You will find hcamapi_example_usage.py contains examples of how to make most of the CAMAPI method calls.

Monitor camera status by fetching the status string

You can continuously query the camera for the current status. Open another terminal window and run

while sleep 0.5 ; do curl http://10.11.12.13/get_status_string 2>/dev/null && echo ; done

If you only want to see when the status string changes, filter out the duplicates:

s="" ; while sleep 0.5 ; do t=`curl http://ssc1./get_status_string 2>/dev/null` ; if [ "$s" != "$t" ] ; then s=$t ; echo $s ; fi ; done

Mounting root file system as writeable

Telnet into the camera and run the following command to mount the root file system so you can add and modify files.

mount -o remount,noatime,nodiratime /dev/root /

Make sure you know how to restore your camera and feel comfortable with the process. Of course any changes you make to the software mean you then own the software problems.

Restarting camera software

If you have changed the python camera software (app.py, app_ext.py) you can get it running without having to reboot the camera.

killall -9 python lighttpd
sleep 1
/etc/init.d/lighttpd start

Extracting sdcard.img file from update tarball

To extract the sdcard.img file from an update tarball, run the following commands:

UPDATE_TARBALL=sanstreak_update.ssc.20141022170436.72.a32a9bd.tar

tar -xf $UPDATE_TARBALL
xz -d sdcard.img.xz 

You can directly program the microSD card once you have extracted the sdcard.img file.




Home

CAMAPI Developer options