Moshe Zioni

@dalmoz

Turn Your PocketCHIP Into a Badass On-The-Go Hardware Hacker’s Terminal

I’ve always wanted to have an ultra-portable terminal for testing hardware projects that I am involved in. The cumbersomeness of turning-on a laptop and dedicate a USB for a simple task as to watch for terminal messages seemed a bit excessive for a that mundane a task (and my desk space is always limited).

Actually, I was in the midst of designing a Digispark based solution to fulfill that need for myself while there came the PocketCHIP KickStarter campaign. To me, it sounded like a much more robust project (wielding a full blown computer, running a Linux distribution) — tackling, although indirectly, my demand.

At the moment it landed on my table, some years ago, I realized this dream through several options of utilization, and eventually landed on the slickest way to have an on-the-go, conference-hall friendly, hardware hacker’s terminal.

L-R: DEFCON 24 (2016) electronic badge, Bender Badge by AND!XOR (v1) — both utilizing UART

Throughout the past two DEFCONs I’ve been walking with the PocketCHIP alongside other ‘badge-life’ occasional novelties, and was having a request to teach the tinkering required to make the device sing along routers, electronic badges, IoT devices, and practically every kind of hardware with a terminal interface.

Here, I put my promise, to release a tutorial about how to transform the PocketCHIP to a practical terminal — to rest.

Preparing the board

In order to make the CHIP a truly portable solution, start by soldering some breakout pins. Some prefer installing those, just in case, all over the top row of pinouts. Myself, I much prefer the minimal version.

Pins of interest for our mission are (from left to right): 3 volts, 5 volts, RX, TX and GND.

After fixing the pinout — an extra step that I recommend is flexing the breakout pins by 90 degrees. That achieves three things:

  1. Preventing wires from obstructing screen or keyboard;
  2. It’s easier to add a probe to while testing;
  3. While wearing it, dangling, it won’t puncture your shirt.

Releasing PocketCHIP’s UART ports from duty

The breakout for the CHIP, which is conveniently enough available on top of the case, has UART pins as well, but they are there to provide serial access to the CHIP, in case of need. We need to locate the device and free its status as a debugging interface.

Device file path designation of those ports should be the same across all PocketCHIP firmware out there, as far as I can tell, but in any case — a quick way to designate them is reading dmesg and looking for TTYs under /dev.

In all cases until now the designated port was tty0. The following commands takes this into account, while if your case varies you should modify it to reflect the change in port.

Next, we need to release the port from its current operation, only then we can utilize them to connect to other devices.

Put on some pants and go running

Last piece you will need is a terminal emulator — I go with minicom, a long-standing, stable, and text-based emulation software.

To install it:

First run (-s for configuration menu):

That’s It? Yes, not rocket science!

Connect to your favorite serial pinout and enjoy your portable life. Connect according to UART specification (Voltage optional most of the time):

Enjoy the result!

The Moment of Truth

Appendix — Serial Testing Script

If you don’t have an exposed router laying around for testing it all — you can use the following script with your Arduino-compatible device, connecting it in a similar fashion to the above table and have a safe test-run.

More by Moshe Zioni

Topics of interest

More Related Stories