Add configuration files, update README, first draft of setup documentation, add todo.md

This commit is contained in:
Satu Koskinen 2022-10-02 15:24:26 +03:00
parent 36dea6c9e2
commit 45cc34de3b
7 changed files with 110 additions and 21 deletions

View File

@ -15,6 +15,17 @@ depth-logger | Record depth of the device and save it in `.csv` format.
## Data Formats ## Data Formats
Type | Format Type | Output file format | Output file name | Output structure | Content
-----|- ------------|--------------------|--------------------------------------|------------------|
GPS Data | Audio Data | .wav | <start-time-of-recording>_audio.wav | Each recorded chunk will be written to its own file in `audio` folder | Wav audio data, configuration defined in XXX
GPS Data | .csv | <start-time-of-recording>_gps.wav | All data written to a single file | Csv data with following fields: GPS time UTC, latitude, longitude, speed, satellites in view
Depth data | .csv | <start-time-of-recording>_depth.wav | All data written to a single file | Csv data with following fields: date and time, voltage of depth sensor (V), depth (m)
Log data | .txt | <start-time-of-recording>_log.txt | All data written to a single file | Text file where each entry contains the following: date and time, process that writes the entry, logged information
## Output Locations
The base location/path for the output directories is defined by a configurable value BASE_DIR_PATH. If directories along this path do not exist, they will be created. If an error occurs or the location is not writable, output will be written to the default location (<x>) instead.
<ssd card automatic mount??>
A recording session starts when the Raspberry Pi is turned on or booted, and ends on shutdown. Each session will have its output written in its own directory that will be named <start-time-of-recording>_recordings.

View File

@ -0,0 +1,13 @@
# Audio
SAMPLE_RATE=44100
CHANNELS=2
BITRATE=192k
BATCH_RECORD_LENGTH=60
# Output location
TRY_MOUNT_SSD=true
DEFAULT_BASE_DIR_PATH=/home/pi/recordings
BASE_DIR_PATH=/home/pi/data

0
configuration/ssh.txt Normal file
View File

View File

@ -0,0 +1 @@
<username>:<encrypted password>

View File

@ -0,0 +1,13 @@
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<Insert 2 letter ISO 3166-1 country code here>
network={
scan_ssid=1
ssid="<Name of your wireless LAN>"
psk="<Password for your wireless LAN>"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

View File

@ -2,31 +2,59 @@
## Components ## Components
- Raspberry Pi (tested on 2, 4B)
- MicroSD card + adapter
- card reader to access the sd card on the computer
## Raspberry OS basic setup ## Raspberry OS basic setup
### 1. OS ### 1. Install the operating system and set up user, Wi-Fi, ssh access
#### With Raspberry Pi Imager
The easiest way to install the operating system (Raspberry Pi OS, a Linux Debian-based OS) is to use the official Raspberry Pi Imager utility which works on macOS, Ubuntu and Windows.
Install from here: https://www.raspberrypi.com/software/
After installing, plug the SD card to the computer and launch Raspberry Pi Imager.
Then the following steps:
1. Select operating system: click Raspberry Pi OS (other) and then, depending on the Pi, either a 32-bit or 64-bit Raspberry Pi OS Lite
2. Select storage: the sd card should be listed
3. Click the cog icon to set some configurations:
- Enable SSH (use password authentication)
- Set username and password
- Configure wireless LAN: input the name and password of the wi-fi network, select Wireless LAN country
- Set locale settings: select options correct for you
4. Click Write (all existing data on the SD card will be erased and the OS installed)
#### With some other utility
If you do not use the Raspberry Pi Imager to set up the SD card, the following steps are required:
1. Download the 32-bit / 64-bit Rasbperry Pi OS Lite from here: https://www.raspberrypi.com/software/operating-systems/
2. Flash the image to the SD card with the utility of your choice (options for Mac, Linux, Windows?)
3. Fill in required details in the configuration files in configuration folder and copy them to the boot folder on the SD card (this is the folder that should open when you open the SD card volume on your computer):
- ssh.txt: this enables ssh on the Raspberry Pi, no need to edit the file (it's empty, the existence of the file in the boot folder is enough)
- userconf.txt: creates a user
- replace <username> with the username of choice (e.g. pi)
- replace <encrypted password> with an encrypted version of your password which can be created with the openssl command line tool:
- open Terminal, write `openssl passwd` and press Enter
- input your password and press enter (asked twice)
- as output, you will get the encrypted version of the password
- wpa_supplicant.conf: set up Wi-Fi
- replace <Insert 2 letter ISO 3166-1 country code here> with your country code (e.g. FI)
- replace "<Name of your wireless LAN>" with the name of your Wi-Fi network, e.g. "explorersden"
- replace "<Password for your wireless LAN>" with the Wi-Fi password, e.g. "password"
### 2. Installing needed packages
### 2. Users ### 3. Mount SSD
### 3. Wifi
### 4. SSH access
### 5. Installing needed packages
## SSD

23
todo.md Normal file
View File

@ -0,0 +1,23 @@
# To do list
- [ ] Configurable, documented setup process for the Raspberry Pi
- [ ] Setup script
- [ ] Copy executables & scripts
- [ ] Required packages to install
- [ ] System configurations
- [ ] Configurable values
- [ ] Test
- [ ] Output formats & location for output data
- [ ] Automatic SSD mounting
- [ ] Audio recording
- [ ] Logging
- [ ] Test
- [ ] GPS recording
- [ ] Logging
- [ ] Test
- [ ] Depth recording
- [ ] Double check formulas to calculate depth & pressure from voltage
- [ ] Logging
- [ ] Test
- [ ] Test autonomous recording as a whole