Difference between revisions of "Installation"

From bcmeter.org
Jump to navigation Jump to search
(Created page with "== Set Up the microSD Card == 0. Copy Image of [https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit Raspberry Pi OS '''Lite'''] on your microSD car...")
 
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Set Up the microSD Card ==


0. Copy Image of [https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit Raspberry Pi OS '''Lite'''] on your microSD card, Documentation for Linux / OSX in this file, for Windows use [https://www.raspberrypi.org/software/ this method] <br>
== Recommended: Use of preconfigured microSD Card image==
'''Make sure to download the Lite''' and '''not''' Desktop / Desktop and recommended software
1. Download the file image [https://bcmeter.org/wp-content/uploads/simple-file-list/bcMeter_latest_img.zip 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, the bcMeter booted with the newly written microSD-Card is creating a WiFi named "bcMeter" after approx. 2 Minutes.
Log into the Wifi with Password bcMeterbcMeter
Then you can setup the device by accessing it in a Browser by address http://bcmeter.local by default.
For security reasons, the hotspot is closed after 10 Minutes without being hooked into a wifi. You can override it in the interface and set the corresponding parameter if you want to run the bcMeter permanently in hotspot mode.


1. For Linux use the terminal to copy the image to the microSD card by this command:
== Advanced: Manual headless Set Up the microSD Card ==
      dd if=path/to/image of=/dev/diskX bs=8m


Replace path/to/image with path to image and diskX with deviceaddress of your microSD-card. Drag / drop the icon to the terminal is possible if in desktop environment.<br>


Use rdiskX instead of diskX on OSX to accelerate the transfer
Use the [https://www.raspberrypi.com/software/ Raspberry Imager] tool to write Raspberry OS 32bit LITE (very important - '''not''' Desktop!) to your microSD card.
Configure the Raspberry Pi Imager tool to configure the image with username and password, for simplicity we use "pi" and "raspberry".<br><br>
Also enable SSH and WiFi in the tool.


== Configure the microSD Card for WiFi access ==
After finishing, eject the microSD Card from the PC and put it into the Raspberry Pi.


After the above steps, on Windows and OSX a new drive/partition named „boot“ is visible in Explorer or Finder. On Linux you see additionally rootfs, we can ignore this. 


2. Create a new and empty file just called „ssh“ on the new boot partition. This is just for enabling ssh as Raspberry OS evaluates this file to enable the ssh configuration.
=== Configuring the Raspberry Pi to be a bcMeter via SSH remote access and WiFi ===
You can simply do that in Linux/OSX by navigating to the /boot partition of the microSD Card and enter
      nano ssh


Then just save the empty file and exit (ctrl+o for save, ctrl+x for exit)
Put microSD-Card in Raspberry and boot it up (takes up to a minute)


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)
Log into the raspberry via terminal on Linux/OSX or cmd.exe on Windows
 
 
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.
 
'''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 ==
 
 
4. 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  
       ssh pi@raspberrypi  
or alternatively if connection is refused
      ssh pi@raspberrypi.local


Or any terminal client on Windows (for example Putty) with the following default credentials
Or to use with dedicated ssh client, like putty:


address: raspberrypi
address: raspberrypi
Line 57: Line 32:
login name: pi
login name: pi


login passwort: raspberry
login passwort: raspberry (or whatever you chose)


'''(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.)'''
'''If connections is refused, check connection first and then try to add .local to hostname (raspberry.local)'''


5. Being logged in, enter
Then just download the bcMeter install script by entering
       wget -N https://raw.githubusercontent.com/bcmeter/bcmeter/main/install.sh && sudo bash install.sh
       wget -N https://raw.githubusercontent.com/bcmeter/bcmeter/main/install.sh && sudo bash install.sh

Latest revision as of 12:18, 8 March 2023

Recommended: Use of 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, the bcMeter booted with the newly written microSD-Card is creating a WiFi named "bcMeter" after approx. 2 Minutes. Log into the Wifi with Password bcMeterbcMeter Then you can setup the device by accessing it in a Browser by address http://bcmeter.local by default. For security reasons, the hotspot is closed after 10 Minutes without being hooked into a wifi. You can override it in the interface and set the corresponding parameter if you want to run the bcMeter permanently in hotspot mode.

Advanced: Manual headless Set Up the microSD Card

Use the Raspberry Imager tool to write Raspberry OS 32bit LITE (very important - not Desktop!) to your microSD card. Configure the Raspberry Pi Imager tool to configure the image with username and password, for simplicity we use "pi" and "raspberry".

Also enable SSH and WiFi in the tool.

After finishing, eject the microSD Card from the PC and put it into the Raspberry Pi.


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 or cmd.exe on Windows

     ssh pi@raspberrypi 

or alternatively if connection is refused

     ssh pi@raspberrypi.local

Or to use with dedicated ssh client, like putty:

address: raspberrypi

login name: pi

login passwort: raspberry (or whatever you chose)

If connections is refused, check connection first and then try to add .local to hostname (raspberry.local)

Then just download the bcMeter install script by entering

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