Project

General

Profile

Actions

Feature #815

closed

Add headless mode

Added by Hammel almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Start date:
20 Feb 2021
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

See RM #743

  1. Add cli option for headless mode (-H)
  2. Don't use GUI - switch to glib main loop
    1. Exit on signals only: SIGQUIT, SIGTERM, SIGHUP and SIGINT.
  3. Add gpio monitor thread using libgpiod (API docs).
    1. See also: GPIO Programming: exploring libgpiod
    2. Add momentary button to RPi
    3. Add an led to RPi
  4. Momentary button causes SIGUSR1 or SIGUSR2 depending on toggle state
    1. Requires debounce handling (don't allow toggling to fast).
    2. Probably requires synchronization with network startup in debounce handling.
  5. Signal handler
    1. SIGUSR1 starts imwww for network config
    2. SIGUSR2 stops imwww and restarts network
  6. LEDs are flashed depending on state
    1. 1 second (500ms on/500ms off) blink: imwww is active.
    2. 2 200ms flashes/second: network is restarting.
    3. 2s solid followed by 10 200ms flashes followed by no light: normal mode is now active.
    4. A second LED could be used to show camera active state.

Related issues

Blocks PiBox - Feature #743: Add PiSentry system: a webcam meta buildClosedHammel29 Feb 2020

Actions
Blocks PiBox - Action Item #768: Add PiBox FileServer meta buildClosedHammel21 Jun 2020

Actions
Actions

Also available in: Atom PDF