Howto setup rpi3 for CSV reading: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 84: Line 84:
==-9-==
==-9-==
Reboot
Reboot
  $ sudo reboot
  $ sudo reboot & exit
return to the ssh session again once the raspberrypi up and running again.
return to the ssh session again once the raspberrypi up and running again.



Revision as of 11:57, 24 September 2017


This howto will cover the steps to setup a Rasperrypi for reading CSV stream from RPICT series board.

Hardware and OS

This has been tested using Raspberrypi 3 Model B

Used OS: Raspbian Jessie 2017-06-21-raspbian-jessie.img

If the image from Emoncms is used then this setup is not needed.

Steps

-1-

Download the image from the raspberrypi website. https://www.raspberrypi.org/downloads/raspbian/

-2-

Write the image to the SD card. Follow instructions given by the raspberrypi website.

https://www.raspberrypi.org/documentation/installation/installing-images/

-3-

Once the image written create an empty file called 'ssh' in the boot section of the image.

-4-

Power up the raspberrypi and connect it to the ethernet network.
Access the raspberrypi with ssh.

Linux based OS

This is as simple as issuing.

$ ssh pi@raspberrypi

Use password raspberry

On other systems (windows, ios)

We recommend to use the putty tool. Download here
As above use
hostname: raspberrypi
user: pi
password: raspberry

This will give you access to a terminal window in which you can issue commands on the raspberrypi.

-5-

Run the raspi-config tool

$ sudo raspi-config

In the menu expand the Filesystem (optional).

7 Advanced Options
A1 Expand Filesystem

Then disable the login uart

5 Interfacing Options
P6 Serial

Select No to the login shell question.
Select Yes to the serial port hardware to be enabled question.

-6-

[OPTIONAL]
Update the Raspbian OS.

$ sudo apt-get update
$ sudo apt-get upgrade

-7-

Edit the /boot/config.txt file

$ sudo nano /boot/config.txt

At the end of the file add the following line:

dtoverlay=pi3-disable-bt

(note the above will disable bluetooth - if bluetooth is needed do not execute this step and use ttyS0 instead of ttyAMA0 for what follows).

Save and Exit file.

-8-

[OPTIONAL]
Disable hciuart

$ sudo systemctl disable hciuart

-9-

Reboot

$ sudo reboot & exit

return to the ssh session again once the raspberrypi up and running again.

-10-

Insert the RPICT board on the RPI. Configure and read from serial port

$ stty -F /dev/ttyAMA0 raw speed 38400
$ cat /dev/ttyAMA0