====== Firmware Installation ====== original source(([[https://docs.google.com/document/d/1KzPZJW0ErInFtfTCmhNhSZTOpg6N2bgZDyIxkh_DRVs/pub?1532944531#h.iubpod4vxyrx|Documentation System BLUE]], chapter 2.4)) The firmware of the System Blue controller is pre-installed. When the device is turned on and is connected to a router, then it gets an IP address via DHCP. You must check your router which IP address this is. Typically, the detector gets the same IP address after a reboot. The firmware can be updated in three different ways, - via the web interface of the firmware, - via the Single Wire Debug (SWD) interface using a programming device, and - via the USB interface using the Device firmware upgrade STMicroelectronics Extension) (DfuSe) interface. ===== Web Interface ===== To upgrade the firmware via the web interface, follow the menu prompts in the web interface in the section "Tools::System::Firmware..." Next screen will be "Tools::Firmware". Here go to "Tools::Firmware::Upload Firmware" and select the file. Choose the file with ending .bin. The file will be uploaded. Afterwards the MD5 of the firmware will be compared with the expected MD5 on the server. Once this is done start the update in "Tools::Firmware::Flash Firmware". Finaly wait for 30 seconds. The station should restart and display the Status page within this time. If this time passed by and the status page is not visible, hit the reload button of the browser. ===== Single Wire Debug (SWD) ===== he firmware can be upgraded via the SWD interface with the ST-LINK/V2 in-circuit debugger/programmer. This programming devices is also contained at the STM32F4DISCOVERY board used for System Red. It is connected to the SWD interface as follows. {{:en:hardware:blue:stlink_con.png?|}} The software (STM32 ST-LINK Utility) for programming the controller with ST-LINK/V2 can be found on the website of STMicroelectronics [[http://www.st.com|]]. The board additionally must be powered via the USB power supply during programming. The latest version of the firmware can be loaded from [[http://tracker.blitzortung.org/firmware|]] Please never flash a firmware for System Red on a System Blue and never flash a firmware for System Blue on a System Red. This can damage the hardware. ===== Device Firmware STMicroelectronics Extension (DfuSe) ===== You can also flash a new firmware over the USB connector via the DfuSe of the processor as follows. - Load the DfuSeDemo software for the Windows operating systems from the website of STMicroelectronics [[http://www.st.com|]]. Get "stsw-stm32080.zip" from here [[https://www.st.com/en/development-tools/stsw-stm32080.html|]]. As an alternative get the ZIP-file "DfuSe_Demo_V3.0.4.zip" from here [[https://tracker.blitzortung.org/firmware/dfu|]]. For non-Windows operating systems you can use the following softwar: [[http://dfu-util.sourceforge.net/|]] - Install the application. - Download a DFU firmware file for System Blue from the following site. [[https://tracker.blitzortung.org/firmware/dfu|]] - Connect the System Blue controller board via USB with your computer. - Start the System Blue controller in DFU-mode: Push and hold both, the RESET button and the BOOT0 button, at the same time. Then first release the RESET button before you release the BOOT0 button. Your Windows PC should now recognize a new device and install a driver for the new device during the DFU setup. - Open the DfuSeDemo application. You should see the message "STM Device in DFU Mode". If not, then something went wrong. Try again the previous step (driver reinstall, check cable). - Keep all setting as they are and click the "Choose..." button on the bottom. Select the DFU firmware file from above. Now it should look like in the following screenshot. {{:en:hardware:blue:dfu.png?|}} - Next push the "Upgrade" button. - After the upgrade is done, you can push the RESET button or "Leave DFU mode" in the application. - Now you should be able to access the webinterface to upgrade a more recent firmware. The DFU mode is a feature of the processor itself and not a feature of our firmware. It’s not possible to overwrite/destroy the DFU-bootloader. That is, it should always be possible to recover the firmware after a failed web-interface firmware update. A DFU file can be created from a BIN file with the DFU file manager.