Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:sw:04-unipi-firmware [2020/05/07 14:16]
avsetula
en:sw:04-unipi-firmware [2021/08/06 06:58] (current)
avsetula
Line 1: Line 1:
 ====== Unipi Software ====== ====== Unipi Software ======
-This section ​includes topics related to Unipi software (repository,​ FW tools, ​Modbus TCP server, et +This article ​includes topics related to Unipi software (repository,​ FW tools, ​etc.)
-c.)+
  
-==== APT Repository === +===== APT Repository ​==== 
-All tools are distributed via a Debian repository available at https://​repo.unipi.technology/​debian/​+All tools are distributed via a Debian ​package ​repository available at https://​repo.unipi.technology/​debian/​
  
-<WRAP center round info 60%> +The APT repository is already preconfigured in our [[files:software:os-images:00-start|official images]].
-Currently, the packages are supported only for Axon and Neuron generations - Evok for Unipi 1 & lite should be [[en:sw:02-sdks:01-evok|installed as described]] +
-</​WRAP>​+
  
-<WRAP center round tip 60%> +<WRAP center round info 90%> 
-APT is already preconfigured on our Neuron ​and Axon official imagesThis guide should be followed only when installing on a clean Debian/​Raspbian OS.+Currently, the packages are supported only for all units except Unipi 1.1 and Unipi 1.1. lite - those should be [[en:​sw:​02-apis:​01-evok|installed as described here.]]
 </​WRAP>​ </​WRAP>​
  
-Follow ​the steps in the README file located in the repository https://​repo.unipi.technology/​debian/​README.apt+To install the tools to a clean Debian/​Raspbian system, follow ​the steps in the README file located in the repository https://​repo.unipi.technology/​debian/​README.apt
  
-<WRAP center round important 60%> +<WRAP center round info 90%> 
-Make sure to reboot ​the system to apply the changes!+Developmnent & Testing versions 
 + 
 +Our tools are also distributed in testing/​development versions. If you wish to install those, find the exact package at https://​repo.unipi.technology/​debian/​pool/​test/​ and just put it's whole name without the suffix, e.g. _arm64.deb, in the //apt install// command. 
 + 
 +Be aware that any package in the testin pool might break things.
 </​WRAP>​ </​WRAP>​
  
-After reboot, you can check the service status by 
-<​code>​systemctl status unipitcp</​code>​ 
  
-The internal firmware is NOT automatically flashed to the latest version installed using apt. This has to be done manually. To check the FW of internal MCUs (alter ​the -i 0 with -i 1 or 2 depending on the size of the controller) +===== Application interfaces ===== 
-<​code>/​opt/​unipi/​tools/​fwspi -i 0</​code>​+Available APIs are described in the [[en:sw:02-apis:01-evok|SDK section]].
  
-==== Firmware ==== +===== Firmware ​===== 
-Firmware (aka the Software running within the Hardware) is a big part of our hardware (except Unipi 1.1) and gets updated during the time as things are getting fixed or new functionality is being added.+Firmware (the Software running within the Hardware) is a big part of our hardware (except Unipi 1.1) and gets updated during the time as things are getting fixed or new functionality is being added.
  
 The Firmware is a standard part of our OS images and is also distributed in our repository in the unipi-firmware package. The Firmware is a standard part of our OS images and is also distributed in our repository in the unipi-firmware package.
  
-=== Upgrading firmware in Neuron/​Axon ​family PLC controllers ​===+The internal firmware is NOT automatically flashed to the latest version installed using apt. This has to be done manually. 
 + 
 +=== Upgrading firmware in Patron/Neuron/​Axon ​line units ===
 The firmware can be manually upgraded or checked using the fwspi tool which resides in /​opt/​unipi-bin/​ (newly in /​opt/​unipi/​tools/​). The firmware can be manually upgraded or checked using the fwspi tool which resides in /​opt/​unipi-bin/​ (newly in /​opt/​unipi/​tools/​).
  
-To check the firmware on the first group of IOs:+To check the firmware on the first section ​of IOs:
 <​code>​ <​code>​
 /​opt/​unipi/​tools/​fwspi -i 0 /​opt/​unipi/​tools/​fwspi -i 0
Line 40: Line 41:
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-To check the FW of other IO groups ​run <​code>/​opt/​unipi/​tools/​fwspi -i 1</​code>​ alternatively <​code>/​opt/​unipi/​tools/​fwspi -i 2</​code>​.+To check the FW of other IO sections ​run <​code>/​opt/​unipi/​tools/​fwspi -i 1</​code>​ alternatively <​code>/​opt/​unipi/​tools/​fwspi -i 2</​code>​.
 </​WRAP>​ </​WRAP>​
- 
-The upgrade to the latest version of the Firmware should be done in while the unit is connected to the internet. 
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-Firmware upgrade can be done automatically on all groups ​available using command <​code>/​opt/​unipi/​tools/​fwspi -v --auto</​code>​+Firmware upgrade can be done automatically on all sections ​available using command <​code>/​opt/​unipi/​tools/​fwspi -v --auto</​code>​
 </​WRAP>​ </​WRAP>​
  
Line 60: Line 59:
  
 == Offline firmware installation == == Offline firmware installation ==
 +<WRAP center round important 60%>
 Online installation is always preferred because the firmware package can have other packages are dependencies (such as firmware-tools,​ kernel driver, ...). Please always use the online installation. Online installation is always preferred because the firmware package can have other packages are dependencies (such as firmware-tools,​ kernel driver, ...). Please always use the online installation.
 +</​WRAP>​
 +
   * 1. Download the latest version of the **unipi-firmware** package from https://​repo.unipi.technology/​debian/​pool/​ Then it is needed to get it to the unit. There are two ways to do that:   * 1. Download the latest version of the **unipi-firmware** package from https://​repo.unipi.technology/​debian/​pool/​ Then it is needed to get it to the unit. There are two ways to do that:
   * 2.a - Using SCP   * 2.a - Using SCP
       * Copy if from your PC to the unit using SCP (a WinSCP, Filezilla or other software can be used) to the /tmp/ folder       * Copy if from your PC to the unit using SCP (a WinSCP, Filezilla or other software can be used) to the /tmp/ folder
-      * Install the package using dpkg, for example <​code>​dpkg -i /​tmp/​unipi-firmware_5.32_all.deb</​code>​+      * Install the package using dpkg, for example <​code>​dpkg -i /​tmp/​unipi-firmware_5.50_all.deb</​code>​
   * 2.b - Via USB flash   * 2.b - Via USB flash
       * Copy the downloaded file from your PC to the root of the FAT32 formated USB flash and insert the USB flash to any USB port of the unit.       * Copy the downloaded file from your PC to the root of the FAT32 formated USB flash and insert the USB flash to any USB port of the unit.
Line 71: Line 73:
       * Create a mount folder for the disk <​code>​mkdir /​media/​usbflash</​code>​       * Create a mount folder for the disk <​code>​mkdir /​media/​usbflash</​code>​
       * Mount the disk to the newly created folder <​code>​mount /dev/sda /​media/​usbflash</​code>​       * Mount the disk to the newly created folder <​code>​mount /dev/sda /​media/​usbflash</​code>​
-      * Install the package using dpkg, for example <​code>​dpkg -i /​media/​usbflash/​unipi-firmware_5.32_all.deb</​code>​  +      * Install the package using dpkg, for example <​code>​dpkg -i /​media/​usbflash/​unipi-firmware_5.50_all.deb</​code>​  
-  * 3. Check the current FW version installed in the HW <​code>/​opt/​unipi-bin/fwspi -i 0</​code>​ +  * 3. Check the current FW version installed in the HW <​code>/​opt/​unipi/tools/fwspi -i 0</​code>​ 
-  * 4. Update to the latest obtained FW version <​code>/​opt/​unipi-bin/fwspi -i 0 -P</​code>​ +  * 4. Update to the latest obtained FW version <​code>/​opt/​unipi/tools/fwspi -i 0 -P</​code>​ 
-  * 5. Re-check the current FW version installed in the HW <​code>/​opt/​unipi-bin/fwspi -i 0</​code>​+  * 5. Re-check the current FW version installed in the HW <​code>/​opt/​unipi/tools/fwspi -i 0</​code>​
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-The configuration of the group can be erased to the default state. This is done during the firmware upgrade by calling the fwspi utility also with -R parameter. E.g. /​opt/​unipi/​tools/​fwspi -i 0 -PR+The configuration of the section ​can be erased to the default state. This is done during the firmware upgrade by calling the fwspi utility also with -R parameter. E.g. /​opt/​unipi/​tools/​fwspi -i 0 -PR
 </​WRAP>​ </​WRAP>​
  
 === Upgrading firmware in RS485 Modbus extensions === === Upgrading firmware in RS485 Modbus extensions ===
-xS/xG series extensions can be upgraded similarly. Instead of **unipispi** utility, just use the alternative named **unipiserial** which is also included in the //​unipi-firmware-tools//​ package (installed automatically with //​unipi-firmware//​). The command-line arguments are very similar as for the fwspi, except ​RS485 port specification. ​+xS/xG series extensions can be upgraded similarly. Instead of **fwspi** utility, just use the alternative named **fwserial** which is also included in the //​unipi-firmware-tools//​ package (installed automatically with //​unipi-firmware//​). The command-line arguments are very similar as for the fwspi, except ​serial ​port specification. ​
  
-<WRAP center round info 60%> +<WRAP center round alert 80%> 
-The -p (path) parameter must be set according to the RS485 used for the extensionSee section [[en:​hw:​01-axon:​portmap|]] ​to resolve ​the appropriate path for each RS485 available within your unit. For example, if extension ​is connected to //​RS485-1/​RS485-1.1//:​ <​code>/​opt/​unipi/​tools/​fwserial -p /dev/ttyNS0 -P </​code>​.+Make sure that there is no other application using/​communicating on the used port and do not disconnect power to the unit or ExtensionAny of this will lead to bricking ​the extension.
 </​WRAP>​ </​WRAP>​
  
-<WRAP center round info 60%>+ 
 +<WRAP center round info 80%> 
 +The -p (path) parameter must be set according to the used serial for the extension - see the [[en:​hw:​007-patron:​portmap|]],​ [[en:​hw:​02-neuron:​portmap|]] or [[en:​hw:​01-axon:​portmap|]] to find proper serial port within your unit. For example, if extension is connected to //​RS485-1/​RS485-1.1//:​ <​code>/​opt/​unipi/​tools/​fwserial -p /dev/ttyNS0 -P </​code>​.
 Note that the fwserial assumes that extension‘s Modbus address, baud rate and parity are in the factory-default state, ie **19200 baud 8N1 with address 15**.  Note that the fwserial assumes that extension‘s Modbus address, baud rate and parity are in the factory-default state, ie **19200 baud 8N1 with address 15**. 
 </​WRAP>​ </​WRAP>​