Difference between revisions of "Installation"

From bcmeter.org
Jump to navigation Jump to search
Line 1: Line 1:


== Preconfigured Set Up the microSD Card ==
== Preconfigured microSD Card image==
1. Download the file image [https://bcmeter.org/wp-content/uploads/simple-file-list/bcMeter.img.tar.gz here], unzip it and use [https://www.balena.io/etcher/ Etcher] to copy it to your microSD card. <br>
1. Download the file image [https://bcmeter.org/wp-content/uploads/simple-file-list/bcMeter.img.tar.gz here], unzip it and use [https://www.balena.io/etcher/ Etcher] to copy it to your microSD card. <br>
2. After the process is complete, a new drive is visible in Windows Explorer or Mac OS Finder called /boot. Open wpa_supplicant.conf with any notepad application and change the WiFi credentials to your needs. Dont use Word or Office since they might change the quotation marks. <br>
2. After the process is complete, a new drive is visible in Windows Explorer or Mac OS Finder called /boot. Open wpa_supplicant.conf with any notepad application and change the WiFi credentials to your needs. Dont use Word or Office since they might change the quotation marks. <br>
Line 8: Line 8:
== Manual Set Up the microSD Card ==
== Manual Set Up the microSD Card ==


1. Download Image of [https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit Raspberry Pi OS '''Lite'''] and use [https://www.balena.io/etcher/ Etcher] to copy it to your microSD card <br><br>
=== Download Image ===
[https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit Raspberry Pi OS '''Lite'''] and use [https://www.balena.io/etcher/ Etcher] to copy it to your microSD card <br><br>
'''Make sure to download the Lite''' image and '''not''' Desktop / Desktop and recommended software!
'''Make sure to download the Lite''' image and '''not''' Desktop / Desktop and recommended software!


== Configure the microSD Card for WiFi access ==
== Configure Raspberry OS ==


With the image copied over to the microSD-Card, Windows and OSX now see a new drive/partition named '''„boot“ visible in Explorer or Finder.'''  
With the image copied over to the microSD-Card, Windows and OSX now see a new drive/partition named '''„boot“ visible in Explorer or Finder.'''  
<br>On Linux you see additionally rootfs, we can ignore this.   
<br>On Linux you see additionally rootfs, we can ignore this.   


2. '''On Windows,''' open Notepad and create a new an empty file just called „ssh“ on the new boot partition. <br>
=== Enable SSH Access ===
 
'''On Windows,''' open Notepad and create a new an empty file just called „ssh“ on the new boot partition. <br>
'''On OSX''', open the text editor and save the file just as "ssh" to the new boot partition.
'''On OSX''', open the text editor and save the file just as "ssh" to the new boot partition.
<br><br>
<br><br>


This is just for enabling ssh as Raspberry OS evaluates this file to enable the ssh configuration.
Alternatively, you can simply do that in Linux/OSX in terminal by navigating to the /boot partition of the microSD Card and enter
Alternatively, you can simply do that in Linux/OSX in terminal by navigating to the /boot partition of the microSD Card and enter
       touch ssh
       touch ssh


Then just save the empty file and exit (ctrl+o for save, ctrl+x for exit)
=== Enable WiFi access ===
 
On Windows, open Notepad.exe and save the empty file as ssh on /boot. Double check in file properties that no .txt is added (but hidden)
 


3. Using the same method as above, put a file called wpa_supplicant.conf  in the same partition (/boot). This contains the credentials needed to connect to your WiFi. Add as many Networks as you like.  
Using the same method as above, put a file called wpa_supplicant.conf  in the same partition (/boot). This contains the credentials needed to connect to your WiFi. Add as many Networks as you like.  
<br><br>'''In OSX Text Editor we need to press SHIFT+COMMAND+T first. This enables the plain text mode which is needed and stripes all formattings etc. ''' But using terminal / nano here is again a good idea.
<br><br>'''In OSX Text Editor we need to press SHIFT+COMMAND+T first. This enables the plain text mode which is needed and stripes all formattings etc. ''' But using terminal / nano here is again a good idea.


Line 49: Line 48:
Save the file and eject the microSD Card from the PC. This file will be removed from this place as soon as the raspberry has read it. If your Raspberry does not connect to your WiFi, you can repeat this process as often as necessary. If the file is still there after an attempted boot, there has something more severe gone wrong.
Save the file and eject the microSD Card from the PC. This file will be removed from this place as soon as the raspberry has read it. If your Raspberry does not connect to your WiFi, you can repeat this process as often as necessary. If the file is still there after an attempted boot, there has something more severe gone wrong.


== Configuring the Raspberry Pi to be a bcMeter ==
== Configuring the Raspberry Pi to be a bcMeter via SSH remote access and WiFi ==
 


4. Put microSD-Card in Raspberry and boot it up (takes up to a minute)
Put microSD-Card in Raspberry and boot it up (takes up to a minute)


Log into the raspberry via terminal on Linux/OSX   
Log into the raspberry via terminal on Linux/OSX   

Revision as of 13:08, 12 July 2021

Preconfigured microSD Card image

1. Download the file image here, unzip it and use Etcher to copy it to your microSD card.
2. After the process is complete, a new drive is visible in Windows Explorer or Mac OS Finder called /boot. Open wpa_supplicant.conf with any notepad application and change the WiFi credentials to your needs. Dont use Word or Office since they might change the quotation marks.
3. Eject the microSD card and put it into the raspberry pi and boot it up. After 1-2 Minutes it should be logged into the WiFi with hostname raspberry


Manual Set Up the microSD Card

Download Image

Raspberry Pi OS Lite and use Etcher to copy it to your microSD card

Make sure to download the Lite image and not Desktop / Desktop and recommended software!

Configure Raspberry OS

With the image copied over to the microSD-Card, Windows and OSX now see a new drive/partition named „boot“ visible in Explorer or Finder.
On Linux you see additionally rootfs, we can ignore this.

Enable SSH Access

On Windows, open Notepad and create a new an empty file just called „ssh“ on the new boot partition.
On OSX, open the text editor and save the file just as "ssh" to the new boot partition.

Alternatively, you can simply do that in Linux/OSX in terminal by navigating to the /boot partition of the microSD Card and enter

     touch ssh

Enable WiFi access

Using the same method as above, put a file called wpa_supplicant.conf in the same partition (/boot). This contains the credentials needed to connect to your WiFi. Add as many Networks as you like.

In OSX Text Editor we need to press SHIFT+COMMAND+T first. This enables the plain text mode which is needed and stripes all formattings etc. But using terminal / nano here is again a good idea.

Be sure to edit the parameter „country“ correctly, else the pi may not be able to connect to your WiFi. Copy / paste the following. Make sure quotes are pasted correctly.

     ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
     country=de
     update_config=1
     
     
     network={
     ssid="YourWiFiName"
     psk="Password"
     }


Save the file and eject the microSD Card from the PC. This file will be removed from this place as soon as the raspberry has read it. If your Raspberry does not connect to your WiFi, you can repeat this process as often as necessary. If the file is still there after an attempted boot, there has something more severe gone wrong.

Configuring the Raspberry Pi to be a bcMeter via SSH remote access and WiFi

Put microSD-Card in Raspberry and boot it up (takes up to a minute)

Log into the raspberry via terminal on Linux/OSX

     ssh pi@raspberrypi 

Or any terminal client on Windows (for example Putty) with the following default credentials

address: raspberrypi

login name: pi

login passwort: raspberry

(For some mobile hotspots it is required to add .local to the hostname (e.g. raspberryp.local). Try this first if no connection is possible.)

5. Being logged in, enter

      wget -N https://raw.githubusercontent.com/bcmeter/bcmeter/main/install.sh && sudo bash install.sh