I bought four of the Next Thing Co. (defunct since 2018) C.H.I.P. (CHIP hereafter) computers shortly after their successful Kickstarter campaign of 2015. The CHIP computer is an interesting beast. It was positioned as a competitor the orginal Raspberry Pi and only cost US$8.00 before shipping. The Raspberry Pi cost US$25 at the time. The CHIP had some features that the Pi did not at the time including built-in wi-fi and battery charging. It was also considerably smaller the original Pi.
The CHIP was shipped with Debian 8 (Jessie) and was a capable Linux computer. I had big plans for all of them, but the using one of them as an ad-blocking Pi-Hole was as far as I got. It worked well for that.
The other have been sitting idle for a few years and I thought it would be fun to put them back to use. I've started thinking about doing more IoT stuff, and these little guys are going to help me do it.
One of the four CHIPs is in a PocketCHIP shell/chassis/case which makes it a pretty cool handheld computer if you can get used to its keyboard. I think that this will be nice for remote control and monitoring of IoT gadgets. I have an HDMI "dip" that will allow me to connect one of them to a monitor as a desktop computer. The other two will be put to some sort of IoT "stuff".
Because it's been so long since I used them, I decided to flash them to their initial states and start again. The goal for the PocketCHIP is to bring it up to the latest version of Jessie, because I didn't want to break the Pocket Home interface, the goal for the HDMI CHIP is the same because I don't want to break the desktop (at least for now), and the goal for the other to machines is to make them headless servers running Debian 11 (bullseye). I will also be adding software that I frequently use to all of them.
Please note that the procedures documented here are time consuming, and that it is a PITA to start again from the flashing step.
Unlike the Raspberry Pi which uses an SD Card to carry its operating system, the CHIP carries its operating system on onboard NAND memory, which requires the OS to be flashed. Of course nothing is available officially from NTC, but fortunately JF Possiblities created mirrors of the the information (including flashable system images) from NTC's long dead web site. Thank you to the person/people at JF Possibilities for doing this.
There are a number of web pages that try to explain how to flash the CHIP with a fresh system. I believe I tried all of the options and failed, until I installed Ubuntu 18.04 on an old laptop. Once I did this, the script on Thore Krug's github worked flawlessly (almost). I needed to install the pocketCHIP image to one of the CHIPs, the desktop image to another, and the headless server image to the two remaining CHIPs. I say "flawlessly (almost)" because I discovered one needs patience and perserverance to succeed. Sometimes flashing would fail, and I would diconnect the CHIP from USB, make sure that the connection between FEL and GND was correct, and try again. For one of the CHIPs, it took six attempts to
- Before you do any of the below, make sure that the computer you are flashing
from is running Ubuntu 18.04 natively.
Lorenz74 says in a comment below that they were able
to do this on Ubuntu 22.10 by 'removing from the CHIP-tools scripts files the two strings “
-i 0x1f3a
” “-u
”' in 'the fileschip-fel-flash.sh
,chip-flash
,common.sh
.' I haven't tried this.
To save the readers a click, the instructions from Thore Krug are duplicated here.
- Remove the CHIP from its case (in case you have a PocketCHIP).
- Connect the FEL and a GROUND pin of the CHIP (for example, with a paperclip).
- Connect the CHIP's micro USB port to a USB port of your Linux machine.
- In the Linux machine:
- run
git clone https://github.com/thore-krug/Flash-CHIP.git
to clone this repository. cd
into the location where you stored this repository.- run
sudo chmod +x Flash.sh
- run
./Flash.sh
- Select the version you want to install.
- Wait until the installation finishes.
- Enjoy!
- run
At the end of all of this, the CHIP is a bootable Debian 8 (jessie) machine. The next step is to update to Debian
jessie and set up
the CHIPs as ssh
servers.
The instructions below are for headless server and desktop CHIPs. See below for PocketCHIP.
- Remove the FEL-GND jumper and unplug the CHIP to shut it down. Reconnect the CHIP to the
Ubuntu 18.04 machine (a real one, not virtual!) through USB.
Your CHIP should reboot, and should be ready after a minute or two.
If the LEDs are not flashing, the CHIP is not yet ready for the next step.
If they are flashing, wait another minute :). It takes a fairly long time for the CHIP to boot. - Open a terminal on the Ubuntu machine and type
screen /dev/ttyACM0
at the prompt. This creates a serial connection between the terminal and CHIP. - If you see a login prompt, great. Login with user
chip
and passwordchip
. Remember to change the password later. If you don't get a password prompt right away, try pressing some keys a few times. I suspect there are keys that should be pressed. I tried Ctl-A, Ctl-B, return, I didn't notice which of them worked :) If this fails, unplug the CHIP, plug it back in, and retry. - Connect the CHIP to wi-fi. I did this using
sudo nmtui
and selecting the appropriate access point using the correct password. After you've connected to wi-fi and exitednmtui
, you cansudo nmtui
again to change the hostname of your CHIP from chip, if you want. It's a really good idea to do this if you're working with multiple CHIPs. Exit nmtui. - Note the IP address for your CHIP with
ip addr
. We will use this to log in the to CHIP withssh
later. Mine was10.0.0.128
. Yours will probably be different and will likely start with192.168
. - Update your apt sources with
sudo nano /etc/apt/sources.list
. It should like this after your edits.
deb http://archive.debian.org/debian/ jessie main contrib non-free
deb-src http://archive.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb http://chip.jfpossibilities.com/chip/debian/repo jessie main
deb http://chip.jfpossibilities.com/chip/debian/pocketchip jessie main
Note that the references to opensource.nextthing.co
have been replaced by chip.jfpossibilities.com
. Thanks
again to JF Possibilities.
-
Update your sources with
sudo apt update
. This will take a while, and may seem to be stuck. Be patient. -
Install the openssh server and keyrings with
sudo apt install openssh-server debian-keyring debian-archive-keyring
This will allow us to connect to the
CHIP with ssh
which I prefer to screen
.
I prefer emacs
to nano
, so I also installed emacs at this stage using this command instead.
sudo apt install openssh-server debian-keyring debian-archive-keyring emacs-nox
This takes some time.
-
Shutdown the CHIP with
sudo shutdown now
, unplug it from USB, plug it back in, and wait patiently for in to reboot. -
Connect to CHIP from an Ubuntu terminal with
ssh [email protected]
, using your own CHIP's IP address, of course. Login with userchip
and passwordchip
. -
Update CHIP to the latest version of Debian 8 (jessie) with
sudo apt upgrade
. Note that we didsudo apt update
in a previous step. It is possible that you do not need to do this step if you're upgrading to Debian 9 (stretch) or later. -
Something weird seems to happen to wi-fi with the upgrade. If you edit
/etc/NetworkManager/NetworkManager.conf
to the following, you should be OK when you reboot the CHIP.
[main]
plugins=ifupdown,keyfile
[connection]
wifi.mac-address-randomization=1
[device]
wifi.scan-rand-mac-address=no
[ifupdown]
managed=false
[keyfile]
unmanaged-devices=interface-name:wlan1
- Wait a long time, for
sudo shutdown now
, unplug and replug CHIP, wait for it to boot, andssh [email protected]
again. You now have a CHIP running the latest Debian 8 (jessie). I stopped at this point for my pocketCHIP and HDMI CHIP. I probably with never update the pocketCHIP to a newer version of Debian. I may update the HDMI CHIP at some later time.
For PocketCHIP, do step 1 and then put the CHIP back into
its shell/chassis/case, and go to the terminal app. Skip step 2. Steps 3
through 9 are done on the PocketCHIP itself, not
through screen /dev/ttyACM0
. When I tried using screen
for the PocketCHIP, it would disconnect
before I could accomplish anything useful.
Perhaps screen
will work for you. I hope so, because typing on the PocketCHIP is a little awkward.
I don't plan to use my headless CHIPs with any sort of GUI, so I decided to update them to the current
version of Debian. I did this by updating jessie to stretch, then from stretch to buster, and then from buster
to bullseye. From here I assume that you can ssh
into your CHIP.
- Edit
/etc/apt.sources.list
to look like the following.
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb-src http://deb.debian.org/debian/ stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free
Note that all occurences of jessie
were replaced with stretch
and the lines referencing chip.jfpossilities.com
were deleted.
-
Do a full upgrade with
sudo apt update && sudo apt full-upgrade
. I responded 'yes' to prompts asking if I wanted to restart services, and 'no' to prompts asking if I wanted to replace configuration files. -
Shutdown and reboot.
Repeat the above replacing stretch
with buster
.
Repeat the above steps by replacing buster
with bullseye
.
I am now running a PocketCHIP with the most current version of Debian 8 (jessie). That's really outdated, but will work for me. I found a blog post from Steve McGrath describing how he set up his PocketCHIP in 2016. There are some very good ideas there:
- disabling the SSH server from starting automatically is better for security than leaving it on all the time
- aliases are very helpful if you use a small keyboard like that on the pocketCHIP
dwm
seems to be a suitable web browser for the pocketCHIP. !!!TODO!!! write some more about how to get this running.- a reminder that Pocket Home settings can be set by editing
/usr/share/pocket-home/config.json
The best reason to use PocketCHIP is the fantastic gaming platform PICO-8. Version 0.2.5e of this software can be downloaded from the developer, Lexaloffle. You will need to edit the Pocket Home settings to access this from the home screen.
Some of the CLI based games are a lot of fun. You can install the ones I did with
sudo apt install bsdgames nethack-console pacman4console nsnake moon-buggy ninvaders greed
I particularly enjoy adventure, nethack, and greed. Have fun.
I borrowed heavily from luzhuomi when doing this. His instructions seem to indicate a successful upgrade of the PocketCHIP to Debian 10 (buster), but when I tried it, I lost the Pocket Home interface. Debian 11 seems to work fine on the PocketCHIP for me when I followed the headless server instructions, but the interface was just a dumb terminal. You might have better luck.
Is a real machine. Ubuntu 22.10. Anyway yesterday I solved the issue removing from the CHIP-tools scripts files the two strings “-i 0x1f3a” “-u”. The three files I edited are: chip-fel-flash.sh, chip-flash, common.sh. It seems that those fastboot options are not needed and blocks the flash process. So in the end all worked fine.