KC7MM Wiki

Amateur Radio with KC7MM

User Tools

Site Tools


linux:devices:pinephone

PinePhone

I recently (Feb. 2021) obtained a PinePhone [Wikipedia] from Pine64. I got the Manjaro community edition, with the KDE Plasma Mobile desktop. I also sprang for the “Convergence Package”, which came with a memory boost (3GB of RAM and 32GB of eMMC storage) plus a dock that includes an HDMI port, two USB ports, and an Ethernet port. The cost was $225 with shipping.

Although I plan to take advantage of its phone capabilities at some point, my first interest lies in the PinePhone's capabilities as a handheld Linux device. I can see a number of potential uses both in the Ham shack and around the home. In this section I will chronicle my experience with the phone as I try to make it work for me.

Getting it to work

After removing the phone from its packaging, I started with the setup guide. I opened the case, pulled the battery, and removed the insulating tape from the battery terminals. Then I reassembled it and fired it up. (Opened the case? Pulled the battery? All part of the PinePhone experience that you won't get with Android or Apple.) I did not insert a SIM card or an microSD card, saving those for later.

The initial result was disappointing. The desktop appeared, but the top and bottom bars were missing, and with them the navigation controls. I could start apps, but had no way other than rebooting to get out of them. Fortunately, I was able to execute the next step in the setup guide, which is to run a system update. One of the desktop apps is a Bash terminal, so I opened it to get that ball rolling.

Using the dock and pacman

This is the point where the dock came in handy. Figuring that a wired network connection would be the simplest to set up, I applied power to the dock, connected an Ethernet cable and the phone, and was gratified hear a couple of beeps that indicated a successful connection. I pinged a remote host to verify Internet access, and was ready to run the upgrade.

Manjaro is based on Arch Linux, so it uses the pacman package manager. I hadn't used that before, so I had to figure out how to instruct it to run a full system update. That turned out to be: sudo pacman -Suuy

I accepted the defaults, then watched as pacman downloaded and installed 348 packages, without error (Linux at its best). At its conclusion, I rebooted the phone and held my breath. It booted up properly, and rewarded me with a desktop complete with functional top and bottom bars. I was in business.

Getting acquainted

I began by exploring the system. This is my first experience with a smartphone, though I have used Android and IOS tablets. Thus, I had a lot to learn in order to be able to work the interface. Touch interfaces can be baffling, given that there are few visual cues for what to do. The navigation buttons help, but pressure and motions seem to be simply a matter for discovery.

I tapped, swiped, and otherwise twiddled with the screen, and in the process learned at least some of the tricks of using it. I opened non-phone apps and explored their basic functionality – particularly the Angelfish browser.

It's Linux!

I was pleased by the familiar feel of the system. Despite the novel touch interface, the experience is decidedly that of a Linux box. Most gratifying, perhaps, is that the system is under my control – the Bash shell, the package manager are there to attend to my needs, not that of the manufacturer.

The next thing was to check out some things one expects to find on a Linux host.

WiFi

Network management is found under Settings. Making a WiFi connection was easy: select the network ID and enter the password. The connection is persistent, automatically connecting whenever WiFi is enabled.

I found that the phone needs a fairly WiFi strong signal to work. I would connect but not transfer data in locations about the house that function just fine with laptops and tablets. I'll need to add another access point to be able to use it in the shack.

SSH and SCP

Docked and on the wired network, I tested SSH. In the phone's terminal, ip a gave me its IP address; using it with SSH on a desktop machine, I was able to log into the phone. Now I can use the full-size keyboard and screen to work on the phone – much easier for my old eyes and fumbling fingers. In another test, I successfully used SCP to copy a file from the desktop to the phone.

Python

My primary programming language is Python, so that was high on my list of things to test. As expected, typing python3 in the terminal brought up the Python 3 interactive shell.

I like to use IPython for my shell, so I needed to check the repository for it. Running pacman -Si ipython found a package named ipython. I installed it with sudo pacman -S ipython. Typing ipython3 at the prompt brought up the shell, which worked as expected.

Kivy

I would like to use Python to write apps to run on the PinePhone. Kivy is “an open source software library for the rapid development of applications equipped with novel user interfaces, such as multi-touch apps”. I've experimented with it on a desktop machine, but not with a touch interface. It seems that it would be ideal for the PinePhone – if it works.

Another search of the Manjaro repository found a package for Kivy, which I installed. On the desktop machine I typed up the requisite Hello World code, which ran properly. Then I copied it to the phone, where it ran without generating an error, but also without generating the “Hello World” text on the screen. Not what I had hoped.

More work is needed there. The documentation for KDE Plasma Mobile says that apps written with QT5 will run, though with difficulty. GTK apps also are mentioned as possible. Both have Python bindings, so will be added to my list of experiments.

Finally

That's all I have for now. I'll update this as I learn more.

linux/devices/pinephone.txt · Last modified: 2021/02/18 22:46 by KC7MM