Upgrade Firmware


The RemotePi Board for Pi 3, Pi 2 and B+ and the RemotePi Board for Pi Model B support user-upgradable firmware (The firmware is the same for the RemotePi Board for Pi 3, Pi 2 and B+ and for the RemotePi Board for Pi Model B). This means that the application running on the microcontroller of the RemotePi Board which is handling the IR signal decoding and controls the power of the Raspberry Pi will be replaced with a (usually) newer version, allowing for new features and bugfixes. To achieve this, the RemotePi Board includes a factory-programmed boot loader which handles the upload of the new firmware. The process principle is similar to the firmware upgrade of a smartphone.

The firmware is uploaded to the RemotePi Board using a serial link to the Raspberry Pi, an application downloaded to the Raspberry Pi is controlling and verifying the upgrade process. To download this firmware upgrade application, please make sure your Raspberry Pi is connected to the Internet.

 

Firmware Upgrade Tool on Raspberry Pi 3

The RemotePi Board communicates with the Raspberry Pi via GPIO 14/15 which on the Model B,B+ and Pi 2 is mapped to UART0. However on the Pi3 these pins are mapped to UART1 since UART0 is now used for the Bluetooth module. Therefore currently on the Raspberry Pi 3 it is necessary to (temporarily) disable Bluettooth and map UART1 back to UART0 (ttyAMA0) so the firmware upgrade tool can talk to the RemotePi Board in the same way as before.

To do this, please follow the instructions below :

  • Put your SD card containing LibreELEC, OpenElec, RasPlex, OSMC, etc. in a card reader and access it on a PC or Mac
  • go to the folder with the name 'overlays'. If there is a file with the name 'pi3-miniuart-bt-overlay.dtb' in the folder, skip the next step
  • download this file, unzip it and copy the 'pi3-miniuart-bt-overlay.dtb' file into the overlays folder
  • Edit the file config.txt located in the root of the SD card and add the following line at the end of the file, then save the file. Note : You cannot use Windows Notepad to edit the file as it uses Linux convention for new line characters, it will show without linefeeds under Windows Notepad. You can use Notepad++ or another Linux-compatible text editor.
    dtoverlay=pi3-miniuart-bt-overlay
  • Put the SD card back into the Raspberry Pi 3 and boot+
  • Log on to the Raspberry Pi using PuTTY
  • run the following command to disable the bluetooth modem, if it exists (leave out the sudo on OpenElec and RasPlex)
    sudo systemctl disable hciuart
  • reboot the OS from the GUI
  • If you later, after using the firmware upgrade tool, want to re-enable Bluetooth, please remove the line you have added to the config.txt, reboot, and enable the bluetooth modem again by using
    sudo systemctl enable hciuart

Please continue to follow the instructions below for the OS you are using.

Firmware upgrade under LibreELEC, OpenElec or RasPlex

If you are using RasPlex, please disable RemotePi support first in the RasPlex menu, then reboot one time. You can enable RemotePi Board support again after the firmware upgrade.

Upgrading the RemotePi Board firmware under LibreELEC and OpenElec is quite easy and the preferred option, because LibreELEC / OpenElec do not occupy the serial port.

The RemotePi Board needs to be put into firmware upgrade mode, disconnect the USB power cable from the RemotePi Board, then hold down the pushbutton on the RemotePi Board and reconnect power to the RemotePi Board while the button is still pressed. You will see the LED lighting orange (green and red on at the same time), this indicates that the RemotePi Board is ready to upload new firmware.

After OpenElec / LibreELEC has booted, you can proceed with the firmware upgrade :

Log on to the Raspberry Pi using PuTTY (default user and password for OpenElec is root, openelec, password for LibreELEC is libreelec).

Key in (replace the filename mslfwXX with the firmware file you want to download, see list below) :

wget http://bit.ly/mslfwXX

After the file is downloaded, change the permission of the file to be executable :

chmod +x mslfwXX

Then start the firmware upgrade program :

./mslfwXX

The firmware upload utility will show the progress and after a successful firmware upgrade the LED of the RemotePi Board will light green.

Shut down the Raspberry Pi again using the LibreELEC / OpenElec menu or by using :

poweroff

After LibreELEC / OpenElec has shut down, disconnect and re-connect the USB power cable from the RemotePi Board, this completes the firmware upgrade.

 

Firmware upgrade under Raspbian, XBian, OSMC

By default for these distros, the Raspberry Pi’s UART serial port is configured to be used for console input/output. To be able to use the serial port for the RemotePi Board firmware upgrade, the serial port console login needs to be disabled.
To do this log on to the Raspberry Pi using PuTTY, then edit /etc/inittab using :

sudo nano /etc/inittab

If the file is not existing (i.e. empty), no need to change anything, else change :

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

To:

#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

(Note the new # at the beginning of the second line !) The second line may already have the # as the first character, in which case you do not need to do anything.

Press ctrl x and then Y to exit the nano editor again and save the file.

To stop messages being sent to the serial port another system file needs to be edited :

sudo nano /boot/cmdline.txt

This file will look like this :

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

If there are any references to ttyAMA0, remove them, i.e. change this to :

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

Press ctrl x and then Y to exit the nano editor again and save the file.

Shut down the Raspberry Pi using the menu or by :

sudo poweroff

The RemotePi Board now needs to be put into firmware upgrade mode, disconnect the USB power cable from the RemotePi Board, then hold down the pushbutton on the RemotePi Board and reconnect power to the RemotePi Board while the button is still pressed. You will see the LED lighting orange (green and red on at the same time), this indicates that the RemotePi Board is ready to upload new firmware.

After booting the Raspberry Pi, you can proceed with the firmware upgrade :

Log on using PuTTY again,
key in (replace the filename mslfwXX with the firmware file you want to download, see list below) :

wget http://bit.ly/mslfwXX

After the file is downloaded, change the permission of the file to be executable :

chmod +x mslfwXX

The shutdown script needs to be terminated, if it is running. Key in :

sudo pkill irswitch.sh

Then start the firmware upgrade program :

sudo ./mslfwXX

The firmware upload utility will show the progress and after a successful firmware upgrade the LED of the RemotePi Board will light green.

Shut down the Raspberry Pi again :

sudo poweroff

After the OS has shut down, disconnect and re-connect the USB power cable from the RemotePi Board, this completes the firmware upgrade.

 

Firmware history and download

The firmware upgrade program and the config tool downloads below will run under most Linux based distributions (i.e. Raspbian, XBian, OSMC, OpenElec, ... etc.) on every Raspberry Pi Model (i.e Model A, B, B+, Pi 2, Pi 3 ...). They will upgrade the firmware of the RemotePi Board for Pi 3, Pi 2 or the RemotePi Board for Pi Model B.

Version 1.0

  • Initial release version of the firmware for the RemotePi Board for Pi 2

Version 1.5  (9-Dec-2014)

  • Pushbutton illumination enabled, pushbutton glows red on standby and lights up when pressed
  • Software debouncing of the pushbutton improved
  • Fixed an issue in IRMP where the received IR command would return 0 after re-connect power in rare cases
  • Shutdown behaviour changed, if there is no feedback from shutdown script the new firmware now re-tries for 4 min and then shuts down the power 

Version 1.6  (1-Mar-2015)

  • Shutdown by script / program is now possible, even during startup period when the LED flashes green
  • New feature : If the RPi OS hangs and the shutdown is not completed normally, power cut can be forced by a long press of the pushbutton during shutdown period, while the LED blinks red (hard shutdown)
Download link : http://bit.ly/mslfw16 

    Version 2.0  (18-Oct-2015)

    • New feature : The new configuration tool allows to customize the RemotePi Board. The following customizations are supported in this firmware release :
      • Brightness of the pushbutton illumination LED
      • Brightness of the green power-on indicator LED
      • Time the green LED blinks during boot (during which a shutdown is blocked)
      • Power-on state after the power is (re)-connected to the RemotePi Board
      • Power-on timer to automatically power on after a the predefined time
    • For more information about the configuration tool and instructions, please see this page

      Download link : http://bit.ly/mslfw20 
      Download link for the configuration tool : http://bit.ly/mslconfigtool 


      Follow us on Twitter to get notifications for firmware updates


      Firmware FAQ

      How do I identify which version of the firmware my RemotePi Board has ?

      • If the pushbutton has no illumination in standby then you have firmware ver. 1.0
      • If you push the button while the RemotePi Board is shutting down during the period when the LED is flashing, and the pushbutton is then not illuminated, then you have firmware ver. 1.5
      • If you push the button while the RemotePi Board is shutting down during the period when the LED is flashing, and the pushbutton illumination lights up, then you have firmware ver. 1.6. All RemotePi Board 2015 and Plus 2015 shipped after March 1st, 2015 have firmware ver. 1.6 already installed.
      • If the LED flashes red - orange - green once, when the power cable is connected, then you have firmware 2.0. The config tool will also show the firmware version for all firmware versions of 2.0 and above.
        All RemotePi Boards shipped after October 18, 2015, have firmware 2.0 already installed.

      Can I downgrade the firmware ?

      Although not recommended, it is possible to downgrade the firmware to an earlier version.

      Will the firmware upgrade delete / reset the current configuration of the RemotePi Board ?

      No, all configuration (i.e learned IR commands, etc.) will be retained.

      Which RemotePi Board model is user firmware-upgradable ?

      The RemotePi Board for Pi 3, Pi 2 and B+ and the RemotePi Board for Pi Model B are user firmware-upgradable. The older discontinued RemotePi Board 2013 version does not contain a bootloader and the hardware is not connected to the Raspberry Pi serial port (UART), preventing user upgrade functionality.

      What technology is used for the firmware upgrade ?

      The RemotePi Board bootloader is based on Tiny PIC Bootloader, modified for the requirements of the RemotePi Board.

      Is a failed or interrupted firmware upgrade rendering the RemotePi Board unusable ?

      No, the bootloader on the microcontroller is protected from being overwritten, so a failed or incomplete upload of firmware will not 'brick' the RemotePi Board. In case the RemotePi Board does not start after a firmware upgrade the upgrade can simply be repeated. If the RemotePi Board does not enter firmware upgrade mode after holding the pushbutton and connecting power, please do the following to hard-reset the RemotePi Board :

      Use a paperclip or small cable to carefully short the two pads on the PCB as shown in the following picture. Make sure you do not short any other connections on the RemotePi Board or Raspberry Pi !

      This will force the RemotePi Board into firmware upgrade mode and allow for a new firmware upload. You will see the LED lighting orange (green and red on at the same time), this indicates that the RemotePi Board is ready to upload the firmware.


      This page was last updated 09-Jul-2016