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
Next revision Both sides next revision
en:sw:04-unipi-firmware [2020/02/07 09:12]
jan_kozak
en:sw:04-unipi-firmware [2020/03/04 08:14]
martyy Firmware upgrade in RS485 extensions
Line 1: Line 1:
 ======%hide Unipi ====== ======%hide Unipi ======
 ====== Unipi Software ====== ====== Unipi Software ======
-This section includes topics related to UniPi software (repositoryfirmware, etc.)+This section includes topics related to Unipi software (FW toolsModbus TCP server, repository, etc.)
  
 ==== Apt Repository === ==== Apt Repository ===
-UniPi firmware, as well as some other UniPi-created SW, is distributed via a Debian repository available at https://​repo.unipi.technology/​debian/​+All tools are distributed via a Debian repository available at https://​repo.unipi.technology/​debian/​
  
 <WRAP center round info 60%> <WRAP center round info 60%>
Line 11: Line 11:
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
-Apt is already preconfigured on our Neuron and Axon official images. This guide should be followed only when installing on a clean Raspbian OS.+Apt is already preconfigured on our Neuron and Axon official images. This guide should be followed only when installing on a clean Debian/Raspbian OS.
 </​WRAP>​ </​WRAP>​
  
-Add the sources to the apt list +Follow ​the steps in the README file located in the repository ​https://​repo.unipi.technology/​debian/​README.apt
-<​code>​ +
-wget https://​repo.unipi.technology/​debian/​unipi.list -O /etc/apt/​sources.list.d/​unipi.list +
-wget https://​repo.unipi.technology/​debian/​unipi_pub.gpg -O - | apt-key add - +
-</​code>​ +
- +
-Let apt to update the unipi sources +
-<​code>​ +
-apt-get update +
-</​code>​ +
- +
-And install the required kernel and unipi-firmware packages. This will automatically install the SysFS and Modbus TCP interfaces as well as support for RTC and serial lines. +
- +
-For UniPi Neuron: +
-<​code>​ +
-apt-get install neuron-kernel unipi-firmware unipi-modbus-tools +
-</​code>​ +
- +
-For UniPi Axon: +
-<​code>​ +
-apt-get install axon-kernel unipi-firmware unipi-modbus-tools +
-</​code>​+
  
 <WRAP center round important 60%> <WRAP center round important 60%>
Line 44: Line 23:
 <​code>​systemctl status unipitcp</​code>​ <​code>​systemctl status unipitcp</​code>​
  
-The internal firmware ​will be automatically flashed to the current ​latest version. ​You can check the firmware version by +The internal firmware ​is NOT automatically flashed to the latest version ​installed using aptThis 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) 
-<​code>/​opt/​unipi-bin/fwspi -i 0</code>+<​code>/​opt/​unipi/tools/fwspi -i 0</co 
 +de>
  
 ==== Firmware ==== ==== Firmware ====
Line 52: Line 32:
 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 ===+=== Upgrading firmware ​in Neuron/Axon family PLC controllers ​===
 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 group of IOs:
 <​code>​ <​code>​
-./fwspi -i 0+/​opt/​unipi/​tools/fwspi -i 0
 </​code>​ </​code>​
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-To check the FW of other IO groups run <​code>​./fwspi -i 2</​code>​ alternatively <​code>​./fwspi -i 2</​code>​.+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>​.
 </​WRAP>​ </​WRAP>​
  
Line 67: Line 47:
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-The steps below describe only FW upgrade on group 1 (the number 0 for parameter -i). Firmware upgrade can be done automatically on all groups using <​code>​./fwspi --auto</​code>​+Firmware upgrade can be done automatically on all groups ​available ​using command ​<​code>​/​opt/​unipi/​tools/​fwspi ​-v --auto</​code>​
 </​WRAP>​ </​WRAP>​
  
Line 75: Line 55:
 apt install unipi-firmware apt install unipi-firmware
 </​code>​ </​code>​
-  * 2. Check the current FW version installed in the HW <​code>/​opt/​unipi-bin/fwspi -i 0</​code>​ +  * 2. Check the current FW version installed in the HW <​code>/​opt/​unipi/tools/fwspi -i 0</​code>​ 
-  * 3. Update to the latest obtained FW version <​code>/​opt/​unipi-bin/fwspi -i 0 -P</​code>​ +  * 3. Update to the latest obtained FW version <​code>/​opt/​unipi/tools/fwspi -i 0 -P</​code>​ 
-  * 4. Re-check the current FW version installed in the HW <​code>/​opt/​unipi-bin/fwspi -i 0</​code>​+  * 4. Re-check the current FW version installed in the HW <​code>/​opt/​unipi/tools/fwspi -i 0</​code>​
  
  
 == Offline firmware installation == == Offline firmware installation ==
-Online installation is always preffered because the firwmare package can have other packages are dependencies (such as firmware-tools). Please always use the online installation.+Online installation is always preffered because the firwmare package can have other packages are dependencies (such as firmware-tools, kernel driver, ...). Please always use the online installation.
   * 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
Line 98: Line 78:
  
 <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./fwspi -i 0 -PR+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 
 +</​WRAP>​ 
 + 
 +=== Upgrading firmware in RS485 Modbus extensions === 
 +xS/xG series extensions can be upgraded in a similar way. 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.  
 + 
 +<WRAP center round info 60%> 
 +The -p (path) parameter must be set according to the RS485 used for the extension. See 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>​.
 </​WRAP>​ </​WRAP>​