From OpenSCADAWiki
Jump to: navigation, search

Open Phone — PinePhone
Begin: 12 (December) 2022
Participants: Roman Savochenko
Description: One of rare open phone devices from the PINE64 project which can be driven by more than 20 different Linux distributives and the distributive can be created own.
Materials: OpenSCADA packages and different data
State of the support:

- connect the device sensors to OpenSCADA
- connect GPS and maps to OpenSCADA
- append audio and video writing in OpenSCADA
- adapt for the scanning-photo functions under OpenSCADA control with reading the barcodes
PinePhone.png
Hardware features
Hardware platform: ARM Cortex A-53 (ARMv8-64)
Central processor: Allwinner A64, 64-bit Quad-core 1.2 GHz
Video subsystem (GPU): MALI-400MP2
Memory: 3GB LPDDR3 SDRAM
Solid memory: 32GB eMMC + micro SD Card support SDHC and SDXC up to 2TB
Powering: Removable Li-Po 2750-3000 mAh battery + USB type-C
Display: HD IPS (5.95", 1440×720) capacitive touchscreen, 16M colors
Camera: 5MP (1/4" + LED Flash), 2MP (f/2.8, 1/5")
Sound: Loudspeaker (mono), 3.5mm jack with mic (stereo)
Communication:
  • Worldwide, Global LTE bands:
    • LTE-FDD: B1/ B2/ B3/ B4/ B5/ B7/ B8/ B12/ B13/ B18/ B19/ B20/ B25/ B26/ B28
    • LTE-TDD: B38/ B39/ B40/ B41
  • WCDMA: B1/ B2/ B4/ B5/ B6/ B8/ B19
  • GSM: 850/900/1800/1900MHz
  • WLAN: Wi-Fi 802.11 b/g/n, single-band, hotspot
  • Bluetooth: 4.0, A2DP
  • GPS (with A-GPS)
  • UART (through earphones)
Features
  • USB C:
    • USB Host
    • DisplayPort Alternate Mode output
    • by Docking Bar:
      • 2x USB Type-A host ports
      • digital video port
      • 10/100Mbps Ethernet port
  • Sensors:
    • accelerometer
    • gyro
    • proximity
    • ambient light
    • magnetometer(compass)
  • Actuator: Vibration Motor
  • Privacy Switches: LTE (include GPS), Wifi/BT, Mic, Camera
Weight: 192 g.
Dimensions: 160.5 x 76.6 x 9.2 mm
Conditions of exploitation: +5...+65°C
Hardware CPU Entry into JavaLikeCalc, us Operation sin(Pi) [in JavaLikeCalc], us Operation pow(Pi,2) [in JavaLikeCalc], us Model AGLKS [Vision, main mnemo], %(core) Extra tests and notes
PinePhone ARM v8 Cortex-A53, Allwinner A64, 40nm, 1.15 GHz, 4 Cores 0.369 0.316 [0.393] 0.311 [0.390] 50 [80] Mobian 12 ARM64

1 Software

Due to the phone can be driven by more than 20 different Linux distributives we must have an common instruction for their installation. For installing an Operation System on the phone we can write its image whether to eMMC or MicroSD, where even if we completely break eMMC data, we can always load from MicroSD due to it is the priority one. And for the possibility of writing to eMMC we can use JumpDrive, which allows to mirror the internal storages as the USB mass storage devices, so we can do:

# Writing the JumpDrive image to an MicroSD card {N} (see dmesg)
dd if=JumpDrive.img of=/dev/sd{N} bs=1M

# Inserting the card and enabling the phone

# Connecting the phone to PC and writing an OS image to device {N} marked as eMMC (see dmesg)
dd if=mobian-pinephone-phosh-12.0.img of=/dev/sd{N} bs=1M

# Disconnecting and disabling the phone, removing the MicroSD card with JumpDrive. Switching on the phone.

At.png But in year 2022 some Linux distributives start of coming without a bootloader, meaning of loading by TowBoot. So, the instruction became:

# Writing the TowBoot image installer to an MicroSD card {N} (see dmesg)
dd if=mmcboot.installer.img of=/dev/sd{N} bs=1M

# Inserting the card, enabling the phone and installing TowBoot to eMMC

# Disabling the phone, removing the MicroSD card and starting it in the mode of mirroring the eMMC storage
# as the USB mass storage device: press Volume Up and hold it together with the enabling button up to lighting the status led in blue

# Connecting the phone to PC and writing an OS image to device {N} marked as eMMC (see dmesg)
dd if=mobian-pinephone-phosh-12.0.img of=/dev/sd{N} bs=1M

# Disconnecting and disabling the phone. Switching on the phone.

At.png JumpDrive or TowBoot and OS Image must be corresponded to PinePhone, so note this at downloading or use not very fresh materials from file server of OpenSCADA!

2 Mobian

Mobian is a Debian derivative for mobile devices and it was selected as a familiar one for the OpenSCADA project and which based on a standard packages repository. Since the last Mobian images are grounded on Debian 12 — the test branch, the OpenSCADA project was also appended for early building on Debian 12 for the hardware: x86, x86_64, ARMHF, ARM64.

Mobian also has showed itself as more stable solution comparing to Manjaro — the preinstalled Linux distributive: no crashing GUI, working suspend mode, the predefined PIN, no dead blacking screen, correct updating and so on.

User/password after the installation is mobian/1234 and you may leave them, using by default.

Remote access by SSH is missing by default, so you have to install the standard package openssh-server from the console, also you can install mcapt-get install openssh-server mc.

Root access is the standard one by sudosudo bash.

OpenSCADA installation is the standard procedure for Debian 12, but after OpenSCADA adaption to Qt6 and building with it on Debian 12, we need to install manually the package "qt6-wayland" also.

OpenSCADA.

3 Links