Difference between revisions of "MDRS:HAL Development Log"

From Marspedia
Jump to: navigation, search
Line 77: Line 77:
 
  sudo make install
 
  sudo make install
 
  python -V
 
  python -V
 
 
#Create virtualenv named "halenv"
 
#Create virtualenv named "halenv"
 
  virtualenv ~/halenv
 
  virtualenv ~/halenv
 
  source halenv/bin/activate
 
  source halenv/bin/activate
 
 
#Update PIP
 
#Update PIP
  python -m pip install --upgrade pip
+
  pip install --upgrade pip
   
+
#Install Cython
 +
  pip install Cython
 
#[https://kivy.org/doc/stable/installation/installation-rpi.html Install Kivy]
 
#[https://kivy.org/doc/stable/installation/installation-rpi.html Install Kivy]
 
 
#[https://github.com/marssociety/mdrs-hal Clone MDRS-HAL]
 
#[https://github.com/marssociety/mdrs-hal Clone MDRS-HAL]
 
#Test that it works.
 
#Test that it works.

Revision as of 13:54, 15 October 2018

HAL

Development Log of the MDRS Habitat Activity Lexica (HAL)

Developers: James Burk, Ryan Watson, Matt Hopson (MarsChat)

Operating System

Ryan Watson: I have a beta Raspberry Pi image that I've posted up on S3 and I want to invite you to download, write to your SD card and give it a try. It has a very sparse selection of apps:

  • Chromium (Can be changed to Firefox, defaults to Chromium so left it alone for now)
  • VLC
  • Libreoffice (Default in the base image)
  • OMX

Users

Default pi user still in effect as admin. Likely disable but not delete, due to potential future needs of having that standard user.

There are two baked in users, an administrative user for possible future tasks and a workstation user:

- U: `admin` / PW: `get_to_mars`
- U: `mdrs` / PW: `get_to_mars`

Current Issue List

10/13:

  1. Hostname should be "hal"
  2. when installing software, it asks for pi or root password (our accounts not listed). Since I didn't know either of them, I had to reset using sudo passwd pi with admin account.

Earlier

  1. need to fix sudoers, still is expecting the default `pi` user
    1. command to disable: sudo passwd --lock pi
  2. Add Mars related wallpaper by default
    1. MDRS or URC
  3. Fixup timezone, initial / ongoing time sync via ntp. Currently defaults to UTC
  4. Password is currently set during the image build / provision. Can / should be more dynamic
  5. Dual displays with HDMI output as primary
    1. add "display_default_lcd=0" to /boot/config.txt

Install walk-thru

The end goal is to write the boot image file to an SD card, configured to boot a Raspberry Pi. There are several possible workflows possible using OSX, Linux or Windows. I will detail a Windows based workflow below and add others as necessary.

Windows 10

1) Download artifact from S3

The zip file artifact is currently located at https://s3.amazonaws.com/watson-builds/image_2018-10-03-razpi-modz-v.5.2.zip and downloadable via browser or other tool.

2) Install image writer utility

I found via the Raspberry Pi forums a utility called etcher written and hosted by resin.io, an IoT company. The utility is straightforward and easy to use. There is no need to extract the img file from the downloaded zip file. This utility can accept the compressed file and write to an SD card.

Download: https://etcher.io/

3) Insert SD card

Before starting Etcher it is helpful to insert the SD card then start the application.

4) When the application is open navigate to the download location and select the still compressed .zip file

5) The SD card should already be selected, if not choose the correct target SD card drive.

6) Flash!

Etcher will begin to write the image to the card. In testing this typically takes about 15 minutes. During the process Windows will notify that the drive has been ejected, or that the card needs to be formatted before use etc. Cancel or dismiss these messages and let Etcher continue. After the write is complete it will verify the write and then software eject the SD card (unmount it from the computer). You can now remove the SD card and place into the RaspberryPi.


Setting up Python/Kivy

Will be using the Kivy package to output to the RPi Touchscreen. We need to be using latest Python 2 (not 3) for this.

    1. Download & Configure/Make Python2
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
sudo tar xzf Python-2.7.15.tgz
cd Python-2.7.15
sudo ./configure --enable-optimizations
sudo make -j -l 4
sudo make install
python -V
  1. Create virtualenv named "halenv"
virtualenv ~/halenv
source halenv/bin/activate
  1. Update PIP
pip install --upgrade pip
  1. Install Cython
pip install Cython
  1. Install Kivy
  2. Clone MDRS-HAL
  3. Test that it works.