]> git.zerfleddert.de Git - fhem-stuff/blame - COC/update-coc
flash radio-only-fw
[fhem-stuff] / COC / update-coc
CommitLineData
8fc5602a
MG
1#!/bin/sh
2
3if [ "`id -u`" != "0" ]; then
4 exec sudo "${0}" "${@}"
5fi
6
7echo "calling COC bootloader..."
8if test ! -d /sys/class/gpio/gpio17; then echo 17 > /sys/class/gpio/export; fi
9if test ! -d /sys/class/gpio/gpio18; then echo 18 > /sys/class/gpio/export; fi
10echo out > /sys/class/gpio/gpio17/direction
11echo out > /sys/class/gpio/gpio18/direction
12echo 0 > /sys/class/gpio/gpio18/value
13echo 0 > /sys/class/gpio/gpio17/value
14sleep 1
15echo 1 > /sys/class/gpio/gpio17/value
16sleep 1
17echo 1 > /sys/class/gpio/gpio18/value
18
3a214c12 19avrdude -v -p atmega1284p -P /dev/ttyAMA0 -b 38400 -c avr109 -U flash:w:COC.radio_only.hex
Impressum, Datenschutz