Difference between revisions of "Software"

From ZeroPhone
Jump to: navigation, search
 
Line 14: Line 14:
 
|-
 
|-
 
| Sources || https://github.com/ZeroPhone/ZPUI
 
| Sources || https://github.com/ZeroPhone/ZPUI
 +
|-
 +
| Systemd dependency || Weak - initscript, some small internal features
 
|-
 
|-
 
| Packaging || [https://github.com/ZeroPhone/ZPUI/issues/44 None yet; TODO]
 
| Packaging || [https://github.com/ZeroPhone/ZPUI/issues/44 None yet; TODO]
Line 29: Line 31:
 
|-
 
|-
 
| Sources || https://github.com/ZeroPhone/ZeroPhone-API-Python
 
| Sources || https://github.com/ZeroPhone/ZeroPhone-API-Python
 +
|-
 +
| Systemd dependency || None (but depends on API daemon)
 
|-
 
|-
 
| Packaging || <code>zerophone</code> on PyPi
 
| Packaging || <code>zerophone</code> on PyPi
Line 44: Line 48:
 
|-
 
|-
 
| Sources || https://github.com/ZeroPhone/ZeroPhone-API-Daemon
 
| Sources || https://github.com/ZeroPhone/ZeroPhone-API-Daemon
 +
|-
 +
| Systemd dependency || Weak - initscript
 
|-
 
|-
 
| Packaging || <code>zerophone-api-daemon</code> on PyPi
 
| Packaging || <code>zerophone-api-daemon</code> on PyPi
Line 59: Line 65:
 
|-
 
|-
 
| Sources || https://github.com/ZeroPhone/ZeroPhone-LowLevel-API-Python
 
| Sources || https://github.com/ZeroPhone/ZeroPhone-LowLevel-API-Python
 +
|-
 +
| Systemd dependency || None
 
|-
 
|-
 
| Packaging || <code>zerophone_hw</code> on PyPi
 
| Packaging || <code>zerophone_hw</code> on PyPi
Line 74: Line 82:
 
|-
 
|-
 
| Sources || https://github.com/ZeroPhone/zerophone-power-management
 
| Sources || https://github.com/ZeroPhone/zerophone-power-management
 +
|-
 +
| Systemd dependency || Depends on systemd - initscript for "on", systemd hook for "off"
 
|-
 
|-
 
| Packaging || <code>zerophone_power_management</code> in ZeroPhone Raspbian repository
 
| Packaging || <code>zerophone_power_management</code> in ZeroPhone Raspbian repository
Line 89: Line 99:
 
|-
 
|-
 
| Sources || https://github.com/ZeroPhone/esp8089
 
| Sources || https://github.com/ZeroPhone/esp8089
 +
|-
 +
| Systemd dependency || Weak - some udev magic might be involved
 
|-
 
|-
 
| Upstream sources || https://github.com/al177/esp8089
 
| Upstream sources || https://github.com/al177/esp8089

Latest revision as of 12:22, 30 April 2019

This page lists all software used on a ZeroPhone, both specifically developed for it and already existing.

Software

This software is developed as part of the ZeroPhone project and is shipped in the ready-to-go SD card images for ZeroPhone.

ZPUI

License Apache 2.0
Language Python
Sources https://github.com/ZeroPhone/ZPUI
Systemd dependency Weak - initscript, some small internal features
Packaging None yet; TODO

ZPUI is the official ZeroPhone UI, tailored for the 128x64 display and buttons. It has an assortment of Python apps for controlling a ZeroPhone, and it's going to evenutally be the base for a fully capable mobile phone UI, allowing to do everything that dumbphone UIs allow - and more.

ZeroPhone API client

License GPLv3
Language Python
Sources https://github.com/ZeroPhone/ZeroPhone-API-Python
Systemd dependency None (but depends on API daemon)
Packaging zerophone on PyPi

A Python client for the hardware API (also a commandline application). Connects to the API daemon, providing a developer-friendly way for applications to query hardware and software state and change it.

ZeroPhone API daemon

License GPLv3
Language Python
Sources https://github.com/ZeroPhone/ZeroPhone-API-Daemon
Systemd dependency Weak - initscript
Packaging zerophone-api-daemon on PyPi

A daemon that allows user-developed scripts and apps to query/control various ZeroPhone resources, both hardware and software ones. Compared to the low-level library, it covers more ground (i.e. WiFi/GSM, more planned in the future), keeps track of resource state (i.e. DC-DC GPIO state), throttles resource access where CPU load is of concern, and allows to query data sources efficiently (using the least amount of requests/context switching possible). This daemon uses JSON RPC, allowing to write simple clients in different languages, not just Python - however, at the moment, the Python/Bash client mentioned above is the only known ZeroPhone-tailored API client.

ZeroPhone low-level API

License GPLv3
Language Python
Sources https://github.com/ZeroPhone/ZeroPhone-LowLevel-API-Python
Systemd dependency None
Packaging zerophone_hw on PyPi

A Python wrapper around ZeroPhone hardware control functions - a low-level library that, while is simple, doesn't account for application coexistence, throttle requests or expose ZeroPhone features already managed by other software (i.e. WiFi). Therefore, is not to be used by developers directly unless direct hardware access is *required* - the ZeroPhone API (together with a client of your choice) is a much more suitable tool.

zerophone_power_management

License GPLv3
Language Bash
Sources https://github.com/ZeroPhone/zerophone-power-management
Systemd dependency Depends on systemd - initscript for "on", systemd hook for "off"
Packaging zerophone_power_management in ZeroPhone Raspbian repository

Two scripts for rudimentary ZeroPhone power management. One runs on ZeroPhone boot and enables the ZPUI software power switch (flashing the RGB LED green in the process). Second runs right before the end of ZeroPhone shutdown and disables the power switch.

ESP8089 driver

License GPLv2
Language C
Sources https://github.com/ZeroPhone/esp8089
Systemd dependency Weak - some udev magic might be involved
Upstream sources https://github.com/al177/esp8089
Packaging esp8089 in ZeroPhone Raspbian repository

A driver allowing us to use ESP-12 WiFi modules as WiFi cards.

Firmware

This is firmware that is either pre-flashed into the ZeroPhone, or one that you need to flash yourself (in case of i.e. self-assembly).

Keypad firmware

License GPLv3
Language C
Sources https://github.com/ZeroPhone/ZeroPhone-Keypad-FW
Packaging None yet

This is a firmware for the ATMega328P on the ZeroPhone front board. Currently, it reads the ZeroPhone keypad and sends the keycodes over I2C, with pressed/held/released events; rudimentary vibromotor/keypad backlight/TFT display backlight/USR GPIO control is also present, and ADC/PWM support will be added in the future.

Third-party firmware

This is firmware for third-party parts of ZeroPhone that are not under project's control. As soon as functional replacements will be available, they will be listed here.

ESP8089 driver firmware

License Unknown
Sources Not available
Updateable Yes
Discussion https://github.com/ZeroPhone/Discussion-and-Research/issues/10

This is the firmware blob used by the esp8089 driver to make a ESP-12 module work as a WiFi card over SDIO (included in the esp8089 driver sources and, subsequently, the esp8089-dkms package). It's loaded by the driver into the ESP-12 module over SDIO, when the driver is loaded.

SIM800 modem firmware

License Unknown
Sources Not available
Updateable Yes
Discussion https://github.com/ZeroPhone/Discussion-and-Research/issues/12

This is a closed-source firmware that's loaded into the modem at the factory, and is responsible for most of the modem's operation. Various firmware images are avaiable on the Internet, along with Windows-specific update tools and instructions. There does not seem to be a tool to update the modem firmware under Linux, but it should be doable, given that the specifications are available (GitHub issue)

Raspberry Pi boot ROM

License Unknown
Sources Not available
Updateable No

This is a ROM that controls the earliest stage of the Raspberry Pi boot process. It's hard-coded in during the chip manufacturing, so it's impossible to upgrade it. It contains the code that launches the code from the SD card if one is present, as well as puts the Pi in the load-code-over-USB mode ("BCM2708 Boot") when the SD card is not found; this applies to all the Pi's, including Zero and Zero W that we use. In BCM2837 CPUs (Pi 3 and Pi 3B+), this ROM is also responsible for USB/LAN boot. This ROM does not seem to warrant a discussion, since it's a mask ROM that can't be updated and the associated security/privacy concerns are therefore low.

Raspberry Pi bootloader

License Proprietary
Sources Not available
Updateable Yes
Discussion https://github.com/ZeroPhone/Discussion-and-Research/issues/2

This is a binary blob that is launched from the SD card by the boot ROM from the FAT32 ("boot") partition on the SD card; its filename is bootcode.bin. It's supplied in its binary form through the Raspbian-supplied .deb packages. It initializes a significant part of the hardware (GPU, RAM, UART and the CPU itself), loads information from config.txt and cmdline.txt files, then loads the Linux kernel from the same partition and launches it with parameters taken from the cmdline.txt file (and some additional ones).

Meta TODO

  • add an "Operating system" section, describing Raspbian and other alternatives as they appear?
  • add significant third-party ZPUI dependencies (i.e. luma.oled)?