How to setup a Raspberry Pi 3 for Real-time Control: The easiest step-by-step guide

How to setup a Raspberry Pi 3 for Real-time Control: The easiest step-by-step guide

Introduction

Here, I am going to explain how to setup Raspberry Pi 3 for development of a RT control application. 

Get SD Card Image of RT-Linux for RPI

Write the image

  • Prepare an SD card. Here, I am using an 32GB micro SD card.
  • With an SD card writing tool (here, Etcher), write the image in the SD card.
  • https://www.balena.io/etcher/

Setup a static IP address of Raspberry Pi

  • Open /etc/dhcpcd.conf in the SD card file system and edit like this
  • interface eth0
  • static ip_address=192.168.1.105/24
  • static routers=192.168.1.1
  • static domain_name_servers=192.168.1.1
  • In the address, 192.168.1.105/24, you may use different ip address e.g., 192.168.1.xxx/24. In this example I will use 192.168.1.105
  • If your router gateway is using different IP, (e.g., 10.1.10.1), then change the value 192.168.1 to these numbers. For details see this link below https://caffinc.github.io/2016/12/raspberry-pi-3-headless/

Insert the SD card in RPI and power on the RPI

    • Now, remove the SD card from your host PC, and insert it into your RPI.
    • Here, do not connect any USB device during the booting time. It could freeze the RPI.

Search the IP address of Raspberry Pi 

  • Execute the following commands in your host computer to search the ip address. If you did correctly for the upper part, the IP should be 192.168.1.205
  • apt-get install nmap
  • sudo apt-get install nmap
  • hostname -I
  • nmap -sn 192.168.1.0/24

  • If everything works correctly, you can SSH the raspberry pi in your host PC.
  • ssh pi@192.168.1.105

  • If everything is good, you should be able to access the RPI w with SSH.


References

[1] https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

[2] https://caffinc.github.io/2016/12/raspberry-pi-3-headless/

[3] https://guysoft.wordpress.com/2017/10/09/realtimepi/