This is an old revision of the document!


Unipi Software

This section includes topics related to Unipi software (repository, FW tools, etc.)

All tools are distributed via a Debian package repository available at https://repo.unipi.technology/debian/

The APT repository is already preconfigured in our official images.

Currently, the packages are supported only for all controllers except Unipi 1.1 and Unipi 1.1. lite - those should be installed as described here.

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

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.

Available APIs are described in the SDK section.

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 internal firmware is NOT automatically flashed to the latest version installed using apt. This has to be done manually.

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/).

To check the firmware on the first group of IOs:

/opt/unipi/tools/fwspi -i 0

To check the FW of other IO groups run

/opt/unipi/tools/fwspi -i 1

alternatively

/opt/unipi/tools/fwspi -i 2

.

Firmware upgrade can be done automatically on all groups available using command

/opt/unipi/tools/fwspi -v --auto
Online firmware installation
  • 1. Obtain the latest firmware version
    apt update
    apt install unipi-firmware
  • 2. Check the current FW version installed in the HW
    /opt/unipi/tools/fwspi -i 0
  • 3. Update to the latest obtained FW version
    /opt/unipi/tools/fwspi -i 0 -P
  • 4. Re-check the current FW version installed in the HW
    /opt/unipi/tools/fwspi -i 0
Offline firmware 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.

  • 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
    • 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
      dpkg -i /tmp/unipi-firmware_5.50_all.deb
  • 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.
    • Switch to root user
      sudo su
    • Find out the name of the inserted flash disk (usually it is sda1)
      fdisk -l
    • Create a mount folder for the disk
      mkdir /media/usbflash
    • Mount the disk to the newly created folder
      mount /dev/sda /media/usbflash
    • Install the package using dpkg, for example
      dpkg -i /media/usbflash/unipi-firmware_5.50_all.deb
  • 3. Check the current FW version installed in the HW
    /opt/unipi/tools/fwspi -i 0
  • 4. Update to the latest obtained FW version
    /opt/unipi/tools/fwspi -i 0 -P
  • 5. Re-check the current FW version installed in the HW
    /opt/unipi/tools/fwspi -i 0

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

Upgrading firmware in RS485 Modbus extensions

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.

Make sure that there is no other application using/communicating on the used port and do not disconnect power to the Controller or Extension. Any of this will lead to bricking the extension.

The -p (path) parameter must be set according to the used serial for the extension - see the Serial port mapping or Serial port mappingto find proper serial port within your unit. For example, if extension is connected to RS485-1/RS485-1.1:

/opt/unipi/tools/fwserial -p /dev/ttyNS0 -P 

. 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.