]> git.zerfleddert.de Git - fhem-stuff/blame_incremental - CUL/update-cul
handle RX/TX switching and respect CCA
[fhem-stuff] / CUL / update-cul
... / ...
CommitLineData
1#!/bin/sh
2
3set -e
4
5if [ "`id -u`" != "0" ]; then
6 exec sudo "${0}" "${@}"
7fi
8
9if [ "`lsusb -d 03eb:204b`" != "" ]; then
10 echo "Found running CUL, entering bootloader..."
11 echo "B01" >/dev/ttyACM0
12 sleep 1
13fi
14
15if [ "`lsusb -d 03eb:2ff4`" != "" ]; then
16 echo "Found CUL in bootloader-mode"
17else
18 echo "No CUL in bootloader-mode found or unable to enter bootloader mode!"
19fi
20
21echo "Programming..."
22set -x
23dfu-programmer atmega32u4 erase
24dfu-programmer atmega32u4 flash CUL_V3.hex
25dfu-programmer atmega32u4 start
26
Impressum, Datenschutz