Close

How I use my ZeroPhone (part 1)

A project log for ZeroPhone - a Raspberry Pi smartphone

Pi Zero-based open-source mobile phone (that you can assemble for 50$ in parts)

aryaArya 10/16/2017 at 03:197 Comments

I've been using various versions of ZeroPhone for more than half a year now, from just carrying one with me to pretty much depending on having it with me. I've also been thinking about what's necessary to integrate it into my life as much as possible. I'm a hardware hacker that does software, and what I like about ZeroPhone is that I don't have to do a lot of software work to achieve my goals. Still, there are lots of goals and features that I have in mind, and many are not covered by existing software. So, once I write the most important pieces of software that I think ZeroPhone needs, I'll make a followup blog post - right now, I'll show what's possible almost out-of-the-box.


So far, my main usage of ZeroPhone is listening to music, this is the main reason I have my phone 24/7 in my pocket. It drives me, makes me more energetic and gives that boost I sometimes need, turning a boring trip around the town into a quick fun ride and helping me stay in the flow when I'm working. I have a 32GB microSD card, and I've made a 23GB partition on it specifically for music. It seems it's going to be full soon, though - df says that it already has 17GB of MP3s.

To actually play music, I use mocp from command-line - just point it to a directory, and it plays it (this is the feature that can be really hard to find in smartphone music players, with all their "databases" and "collections"). I have a small pyLCI app to go to next/previous song, and I even have the "next song" available on a hardware key, so whenever a song I don't feel like comes up, I can press a single button to skip it. The only problem with mocp is that I can't actually start it up from the UI after a reboot (you have to use the ncurses UI to make it play the first song). However, it's not a problem - my phone's typical Linux uptime is up to 10 days (assuming I connect the charger each night), it only resets when I forget to charge the battery, or do some hardware hacking that shorts 3.3V to GND =D 

To sync music with my collection, I can use whatever tools Linux has for syncing files. In addition to that, I have a Python script that syncs music by reading file paths from a playlist, one more that downloads songs from YouTube if necessary, etc. The point is - I get no artificial limitations in software I use, I can write my own, and if I ever crave better features, like playlist tools or multiple backends, I can switch to something like Mopidy.

Now that I think of it, audio seems to be a promising medium for notifications, enabling certain workflows and improving the UI. Not only it's going to be necessary for accessibility functions (which have been mentioned as a priority in ZeroPhone survey responses multiple times), it can augment the visual UI even for those people that don't actually require accessibility features to use it - if done right.


ZeroPhone has a full-sized USB port, and can run Linux command-line software - so, it's not uncommon for me to use a ZeroPhone and esptool to flash a MicroPython firmware into a ESP8266, develop Python scripts for it in a cozy environment I get through SSH, and then upload the scripts to the ESP using something like ampy. The toolchain I get as a result is something I could never really get in Windows - it's stable, works quickly and is even automatable if necessary. I used to use a separate, Linux-powered, laptop just to do hardware work like this - now it's doable with the phone I always have in my pocket.

Incidentally, I can also charge a smartphone through this port - even though my tests have shown the current is limited to about 0.5A, then the voltage drops too low to be of use (the DC-DC is not that good). Nevertheless, it works as an emergency powerbank, for when my smartphone is at 2% but I really want to continue reading something interesting, or for when my portable hotspot is low on battery. My further plans with the USB port are to develop a backup app - it'd wait for a specific flashdrive in the USB port, then copy all the personal data from the ZeroPhone (or, alternatively, upload it to a home server once you're home), and could easily encrypt the backup.

I use the USB port more than I expected I would. It's great for general-purpose hardware hacker needs, such as formatting and partitioning flash drives (using the superior Linux tools available for that), reprogramming microcontrollers of all kinds, doing simple RTL-SDR stuff or maybe using a WiFi dongle in monitor mode, to analyze the spectrum, see how many clients are connected.

Last but not least, having a full-sized USB port is great when I have a USB device but I have no idea what it does - I've had that need quite a lot of times, researching or reverse-engineering things, or just getting familiar with something. I can plug it into the ZeroPhone, read the USB VID/PID right from the interface (there's an app for that) and then know . A good, though unlikely, thing is that if the device is a USB killer, I won't lose my laptop to it =D Not to mention the USB2IP potential, for example, which I plan to explore.


Talking about SSH, I SSH into the phone a lot, generally from my laptop, and do all things Linux. 

I could write a lot about this - I do my programming, research and experiments here. Somehow, a VM just doesn't cut it for me (especially given that I do lots of hardware stuff), and even though I don't get a graphical display on this, I don't really need it. For example, one thing I now can easily do is getting access to files on a flash drive/MicroSD card with a ext2/3/4 filesystem. Earlier, I'd need a VM or a dedicated laptop, now I just plug the device into ZeroPhone, mount it and use scp to retrieve files.

Fun fact: 99% of ZeroPhone software work is done on a ZeroPhone! I, as many others, wish I could use it standalone, without SSH - and I think I have just the idea that I might showcase when the crowdfunding will be active. Nevertheless, it's fun to realise that I'm actually doing work by using a device which is, at that very moment, located in my pocket =D


Our hackerspace has a digital door access system. I recently added a SSH server (written in Python) to it, so that members wouldn't have to use RFID cards and could use SSH authentification to open the doors. I created SSH credentials for myself, too, and then I thought - why not create a small ZeroPhone app that'd let me in with one keypress? So I made it in half an hour's time. Here's how the app looks in the "Personal" menu, among other personal apps - press the button, it automatically creates an SSH session (using paramiko), enters my credentials, and the door unlocks.


Recently, I got stuck at home when our wireless router broke. I had an old router, flashed with some kind of OpenWRT fork, and I plugged it in - then I realised it was still configured to work with a USB-3G modem. I went to the admin panel, only to realise that I no longer remembered the admin password. Found recovery mode instructions, but it wouldn't go into recovery mode for some reason, so I had to connect through UART and reset the password - or leave myself and my family without Internet access, which'd make for a bunch of unhappy people in one room. I had a soldering iron, found some IDE cable wires, and the only female connector I could find was a 2x20 one. The result:

...And I got it to work! The wires are soldered to the UART pads of ZeroPhone, and UART is typically connected to the GSM modem on ZP, so I had to put the modem into RESET state (basically, flip one GPIO).


In a pinch, ZeroPhone works as a LiIon battery charger:

Talking about batteries - while 18650 are bulky, they're easy to source, are very safe and easily replaceable. You can even remove the batteries while ZeroPhone is connected to the charger, and plug fully charged ones, so that you don't have to wait for the phone to charge. What that means is - ZeroPhone replacement batteries are easily available, and they can even be hotswapped! No more "planned obsolescence" because of batteries just not holding a decent charge anymore, 18650 batteries have been with us for tens of years, and are only getting better (and more popular among general populace, because e-cigarettes).


That's it for now. I didn't even talk about expansion ports, and there are much more things that I do with my ZeroPhone, but I don't want to make this worklog too long, and I still need to spend time on making assembly instructions. After that, I'm going to go and see prices for 64GB cards - I want to carry more music with me, just found some albums I'd like to check out, and I don't want to constrain myself. I'm sure about one thing - the upgrade is going to be straightforward, and I might even be able to do it without turning my phone off for longer than a minute - because Linux!

Discussions

marc wrote 10/18/2017 at 06:37 point

Just leaving this here: http://radiomesh.org (no batteries included)

  Are you sure? yes | no

Arya wrote 10/25/2017 at 04:32 point

Had to sit on this for a while before responding. This looks interesting! I'd love to take a look at the hardware, there's very likely going to be a software overlap, too. This looks like one of those projects that could give lots of value to people, and could also be used by ZeroPhone users! 

However, there's a problem - there's a lack of info on this project. I do seem to be able to find multiple accounts of its author ;-) . Again, it looks promising, I'd just like to see results - how well does it work compared to claims, what are the plans for the software, what's the battery life (if there are provisions for battery life improvements at all - I wrote a great worklog on it recently https://hackaday.io/project/19035/log/69596)

  Are you sure? yes | no

Morning.Star wrote 10/16/2017 at 06:26 point

I thnk that might well be historic Ars :-) Most people cant, some can with a workshop or a PC and some tools... When I first got interested in the ZP I told my mates about it (non-hackers) and how it could be used to 'hack' stuff with its hardware, plus it runs Linux.

'What, you can break into peoples computers with it?'

Probably, but thats not what its for right? I'm a hacker, I dont go around breaking into computers do I lol

'You broke into mine...'

Yeah but you forgot your password/spilled coffee on it/updated Windows and it broke/havent got a clue how to switch it on/etc... Look, I'll have to take this away and fix it, I dont have any equipment on me.

Naaah, Superphone lol. Stand back and watch THIS... Dude, you are awesome XD

  Are you sure? yes | no

Arya wrote 10/16/2017 at 07:06 point

I might've learned much more things, if only I had the tools and materials to do what I wanted to do. So, I'm hoping this is going to cover the "tools" part for someone. There's also the "motivation and drive" part, and I hope that one day I'll have an idea on how to make improvements there, too - maybe it'll even involve using a ZeroPhone =)

I'm still wondering, just how much I can embed into this without making it too complicated/expensive, or crippling it? The USB slave functionality might be really easy to achieve, by the way, so you could make a ZeroPhone into a small bootable drive... I hope that's achievable, that'd be hella cool - not having to take laptops away and being able to debug some things on the spot, for one =D In the end, it's all about the software, of course, but, by a great coincidence, Raspberry Pi is well-known for the software support ;-)

1 hour before DHL is likely to pickup three ZeroPhones - hopefully, I'll have time to prepare something else, like, find a spare MicroSD card, burn latest image on it and throw it in the box.

  Are you sure? yes | no

Tor wrote 10/16/2017 at 04:22 point

This is fantastic! I am just overly excited about this project. I'd love to be able to flash bootable usb sticks from a phone. That's what I'd end up doing I think. As I tend to play with lots of live Linux usb sticks. 

I love seeing this post though! Thank you for sharing. 

  Are you sure? yes | no

Arya wrote 10/16/2017 at 05:48 point

I'm happy I'm delivering something you like =) As I said many times and will keep saying, I'm surprised nobody really did this before. 

What software do you typically use for making live USB sticks? dd or something like it, or one of those fancy GUI toolkits that let you flash multiple images?

  Are you sure? yes | no

Tor wrote 10/16/2017 at 15:55 point

Depends on which environment I'm on. In Linux Mint there is a super quick little USB writer application. But I'm not apposed to using dd. For the zerophone I'd probably make an application in python that just uses dd :) 

  Are you sure? yes | no