Most Powerful Open Source ERP

How to install an OS on a Coupler

Step by step instructions for installing an OS on a Coupler
  • Last Update:2024-03-25
  • Version:003
  • Language:en

Agenda

  • Install an OS on a coupler
  • Test connection between a Coupler and a MOD-IO device

Requirements

  • a host laptop machine for flashing image to SD card
  • a coupler and attached to it a MOD-IO device
  • a Micro-SD card with minimal capacity of 16Gb
  • an USB OTG cable for serial connection to coupler

Goal

At end of this how to you will have a coupler device with an operating system (OS) which you can use in your automation project. This OS will contain the bare minimum of tools needed.

Install an OS on a coupler

Please follow this procedure on you laptop machine in order to flash image to SD card. First we need to download the Debian 11 which is the currently supported image from the coupler board producer.

Step 1: Download Debian Bullseye base Olimex image repository

ivan@t470:~$ wget http://images.olimex.com/release/stm32-lime/STM32MP1-OLinuXino-LIME-bullseye-base-20240312-135508.img.7z

Step 2: Extract archive

ivan@t470:~$ 7z e STM32MP1-OLinuXino-LIME-bullseye-base-20231222-143924.img.7z

Step 3: Flash image to your micro SD card

Using balenaEtcher (or any other tool) flash extracted .img file to your SD card Put the SD card into Lime2 board and NOT into STMP15X-SHIELD! Connect an USB OTG cable to USB1 on Lime2 board and your laptop machine Power up Lime2 wait till you see a green light at the board. Connect to serial connection over USB OTG cable from your laptop

root@t470:~$ minicom -D /dev/ttyACM0 # username and password are olimex / olimex by default

Make sure that coupler is properly connected to your local LAN (either over RJ45 cable or Wifi). Take a note of assigned IPv4 address of the coupler as you will later connect over ssh to it You are done. Host machine should no longer be needed.

Default coupler configuration

Please follow this procedure

Step 4: Login into coupler

ssh olimex@<ipv4_address>
(password: is olimex. Please immediately change default username and password)

Step 5: Update software of coupler

olimex@stm32mp1-olinuxino:~# sudo bash
root@stm32mp1-olinuxino:~# apt update
root@stm32mp1-olinuxino:~# apt upgrade

Step 5: Add Olimex's staging repository

Edit /etc/apt/sources.list.d/olimex.list and add following line

deb http://staging.olimex.com/staging bullseye main

Do distribution upgrade.

root@stm32mp1-olinuxino:~# apt update
root@stm32mp1-olinuxino:~# apt dist-upgrade

Step 6: Enable overlays and restart

Select following overlays: lcd-stm32mp1-10cts.dtbo, lcd-stm32mp1-5.dtbo, lcd-stm32mp1-7cts.dtbo, stm32mp1-hdmi.dtbo, stm32mp1-shield.dtbo, stm32mp1-spi2.dtbo, stm32mp1-spi4.dtbo, stm32mp1-usart1.dtbo, stm32mp1-usart3.dtbo from command below

root@stm32mp1-olinuxino:~# olinuxino-overlay
root@stm32mp1-olinuxino:~# reboot now

Test connection between a Coupler and a MOD-IO device

These steps assure that the coupler can switch on / off relays of attached MOD-IO. Please follow the following steps:

# switch ON all relays, you should hear a ticking noise and relays led should change color to GREEN
root@stm32mp1-olinuxino:~#  i2cset -y -f 1 0x58 0x10 0x0F

# switch OFF all relays, you should hear a ticking noise and relays led should become OFF
root@stm32mp1-olinuxino:~#  i2cset -y -f 1 0x58 0x10 0x00

Success

With this the minimal coupler OS configuration is over.