OpenSprinkler 2.x supports firmware update through the controller's USB port.
NOTE: from firmware 2.1.9, only OS 2.3 (and above) will be supported. Newer firmwares can no longer run on OS 2.0, 2.1 or 2.2 due to code size. Therefore the following instructions are for OS 2.3 only. Instructions for legacy OS (any version prior to 2.3) are at the bottom of this page.
OpenSprinkler 2.3 Firmware Update Instructions
Steps 1 through 4 only need to be done once. If you've already done them during previous firmware updates, you can , you can go directly to step 5.
Prepare a regular-size A male to B male USB cable (most printers use this cable). Also, we recommend you to export your OpenSprinkler's current configurations to a file so you can import them afterwards.
Download the avrdude program corresponding to your operating system, and unzip it to a local directory:
Windows: download avrdude_win and unzip it to a local folder
Mac: there are a number of ways to install avrdude for Mac, such as using brew or ports. Google "avrdude for mac" to find out.
Linux: open a Terminal and run: sudo apt-get install avrdude
Install driver:
Windows: generally no need to install driver, unless if you use Windows XP or 7, in which case, install the CH340 windows driver here.
Mac: install the CH340 Mac driver here.
Linux: no need to install driver.
Plug in your OpenSprinkler to your computer using the USB cable. Your computer will detect the serial port and create a serial device:
Windows: it will show up as a COM? port where ? is a number assigned by Windows. You can go to Windows's Device Manger to find out.
Mac: it will show up as a device in the form of /dev/tty.wchusbserial???? where ???? are numbers assigned by Mac (e.g. /dev/tty.wchusbserial1410). In newer OSX systems, it may should up as /dev/cu.xxx You can open a terminal and run
ls /dev/tty.wch* to find out. (Update: on newer OS X, the device shows up as /dev/cu.??? You can open a terminal and run
ls /dev/cu.* to find out)Linux: it will show up as a device in /dev/ttyUSB? where ? is a number, typically 0 (e.g. /dev/ttyUSB0). You can open a terminal and run ls /dev/ttyUSB* to find out.
Download the most recent OpenSprinkler firmware (in .hex file format, OS 2.3 only) to the folder where you have unzipped the avrdude program to (i.e. the firmware file should be in the same folder that contains the avrdude program). Then open a terminal, go to the folder that contains avrdude program (for Linux, the folder where you downloaded firmware to). Run the following command:
Windows: (below, replace COM? with the specific COM port name assigned by Windows)
avrdude.exe -c arduino -p m1284p -P COM? -U flash:w:os_219.hexMac: (below, replace wchusbserial? with the specific serial port name assigned by Mac)
./avrdude -C ./avrdude.conf -c arduino -p m1284p -P /dev/tty.wchusbserial? -U flash:w:os_219.hexLinux: (below, replace ttyUSB? by the specific serial port number assigned by Linux)
sudo avrdude -c arduino -p m1284p -P /dev/ttyUSB? -U flash:w:os_219.hex
That's all for OS 2.3.
Legacy OS (v2.0, 2.1, 2.2) Firmware Update Instructions
Legacy OS can be upgraded up to firmware 2.1.7. Specific instructions for each version are described as follows:
OS v2.0: has built-in avrisp programmer.
- Driver: driver is only needed for Windows (method1, method2). Mac or Linux does not need driver.
- Install avrdude program: follow Step 2 in the OS 2.3 instructions above.
- Download firmware from OpenSprinkler legacy firmware OS 2.0 subfolder, and put the firmware file where you have unzipped the avrdude program to. Open a terminal and go to the folder that contains the avrdude program (for Linux, it's the folder where you downloaded firmware to). Run the following command:
- Windows: avrdude.exe -c usbtiny -p m644 -U flash:w:firmware2.1.7.hex
- Mac: ./avrdude -C ./avrdude.conf -c usbtiny -p m644 -U flash:w:firmware2.1.7.hex
- Linux: sudo avrdude -c usbtiny -p m644 -U flash:w:firmware2.1.7.hex
OS v2.1: has built-in usbasp bootloader programmer.
- Driver: driver is only needed for Windows (method1, method2). Mac or Linux does not need driver.
- Install avrdude program: follow Step 2 in the OS 2.3 instructions above.
Bootloader Mode (this step is required for OS 2.1 only)
a) Remove power and USB cable from OpenSprinkler. Press and hold button B2 while plugging in a USB cable, release B2 within 2~3 seconds after the USB cable is plugged in.b) If successful, the LCD will remain off and you may proceed to the following. If the LCD turns on, redo a) until the controller is in bootloading mode.- Download firmware from OpenSprinkler legacy firmware OS 2.1 subfolder, and put the firmware file where you have unzipped the avrdude program to. Open a terminal and go to the folder that contains the avrdude program (for Linux, it's the folder where you downloaded firmware to). Run the following command:
- Windows: avrdude.exe -c usbasp -p m644 -U flash:w:firmware2.1.5.hex
- Mac: ./avrdude -C ./avrdude.conf -c usbasp -p m644 -U flash:w:firmware2.1.5.hex
- Linux: sudo avrdude -c usbasp -p m644 -U flash:w:firmware2.1.5.hex
- To update OS 2.1 to firmware 2.1.6 or 2.1.7, additional steps are required, as explained in this article.
OS v2.2: has built-in CH340 usb-serial programmer.
- Follow Steps 1 through 4 above in the OS 2.3 instructions above.
- Step 5: Download firmware from OpenSprinkler legacy firmware OS 2.2 subfolder, and put the firmware file where you have unzipped the avrdude program to. Open a terminal and go to the folder that contains the avrdude program (for Linux, it's the folder where you downloaded firmware to). Run the following command:
- Windows: (below, replace COM? with the specific COM port name assigned by Windows)
avrdude.exe -c arduino -p m644p -P COM? -U flash:w:firmware2.1.7.hex Mac: (below, replace wchusbserial? with the specific serial port name assigned by Mac)
./avrdude -C ./avrdude.conf -c arduino -p m644p -P /dev/tty.wchusbserial? -U flash:w:firmware2.1.7.hexLinux: (below, replace ttyUSB? by the specific serial port number assigned by Linux)
sudo avrdude -c arduino -p m644p -P /dev/ttyUSB? -U flash:w:firmware2.1.7.hex
- Windows: (below, replace COM? with the specific COM port name assigned by Windows)