Git Product home page Git Product logo

pinghy's Introduction

Pinghy

An inflatable rescue wireless access point for Raspberry Pi made for RaspiOS.

About this project

This project is in the public domain. Please make it your own.

Many users of Raspberry Pi SBCs are new to installing an OS to an embedded platform, and/or deploy their Raspberry Pis without screen and keyboard. These circumstances can lead less experienced users to lose access to their own machine.

Pinghy uses the wireless interface built in many models of Raspberry Pi to setup an access point on demand, allowing users to reach their Raspberry Pi with ease. The created access point is open, no password required.

Pinghy responds to inputs from the local user, via a button wired to the built in GPIO interface of Raspberry Pi, or via keyboard keystrokes. User proximity with the machine is made a requirement since the open wireless access point creates a security risk in the vicinity of the machine.
Note: In this prototype it is possible to launch the Pinghy executable remotely, from an SSH session for example, and start the access point. This is not desirable.

Pinghy alerts all local and remote users of the machine when the access point is started and stopped:

  • For local users, LEDs on the platform blink as long as the access point is running.
  • CLI users logged on VTs or via SSH receive start and stop messages via wall
  • Users with an active graphical desktop session receive start and stop Desktop notifications

Pinghy is suited to transient and light use, such as connecting to a machine in order to fix its network connection, or providing a captive network for a few wireless sensors. Pinghy doesn't provide a general purpose wireless access point. It's a dinghy, not a battleship.

About the repository

The original portions of Pinghy are written in shell (dash on RaspiOS). The code ties together a number of software packages preinstalled on RaspiOS: dhcpcd, systemd-networkd, triggerhappy, sudo, ip-netns, wpa_supplicant.
To use desktop notifications, 2 extra packages have to be installed on top of the Dekstop version of RaspiOS: xfce4-notifyd (server), libnotify-bin (CLI client).

Pinghy is activated by user inputs via triggerhappy. Pinghy handles itself: i. the configuration of the wireless phy according to the command received or to the current state of the wireless access point, ii. sending feedback to local and remote users of the machine. All the rest is done by dhcpcd (L2 network configuration, via wpa_supplicant) and systemd-networkd (L3 network configuration.)

To make state changes on the wireless interface easier to manage for the OS, Pinghy exports the wireless phy to a temporary network namespace, reconfigures it within the namespace, and brings the phy back to the default linux namespace.
Processes running on RaspiOS see the wireless interface disappear and then come back, as if an USB adapter was removed and (a slighly different one) was added. Such events are handled in a robust manner by Linux, making Pinghy repeatable enough for button control.

Pinghy's state depends on a single information: presence or absence of a well-known wireless interface called rpi0. If present, Pinghy can be stopped; if absent, starting can be considered and -usually- executed. State is assessed every time pinghy.sh runs. The special name rpi0 is hardcoded throughout.

To install Pinghy to a suitable Raspberry Pi running RaspiOS, you'll need to copy files in this repository to /opt/pinghy on the target machine. Configuration files or fragments for the various RaspiOS packages are found in /opt/pinghy/resources. See also the install_sh convenience script.
Page install goes through the process of installing and testing Pinghy.

pinghy's People

Contributors

epoch1970 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Forkers

procount

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.