OpenWrt Standalone Computer

From the combination of the smallest board on which you can run Linux (that is, the VoCore2) with a tiny USB2TTL interface CH340E MSOP10 and the TTGO VGA32 board, I accidentally created a mini-computer that I named OSC – OpenWRT Standalone Computer. A retro Unix-style system that allows connecting a monitor and a PS2 keyboard (or USB via a cheap adapter). I enclosed it all in a case designed for the TTGO VGA32 board and printed on a 3D printer using a 3D project by user morris1972 (yes—all the components fit inside the small case prepared for the TTGO VGA32 board alone). The computer allows working exclusively in console mode via the serial port (hence the retro tag) through the TTGO VGA32 and VGA output directly to a monitor. On this last board, the terminal software AnsiTerminal from the FabGL project by user fdivitto is installed.

The VoCore2 board contains quite limited but complete resources (RISC processor, 128MB DDR, WIFI, USB, UART, I2C, SPI, storage).

The system is not based on emulation—only the terminal is emulated.

The cost of the entire set (the whole computer) is $29:

I did not include the cost of the case, as it is optional and it’s just a 3D print.

The computer does not require a single SD card (both for VoCore2 and TTGO VGA32)—the necessary software installs directly on the boards, leaving the entire 10MB of free space for additional applications :). There is a slightly more expensive version of VoCore2 with an SD slot, which significantly increases the available space.

Connecting the OSC Computer to the Network

We connect with a laptop or phone to the wireless network available from the VoCore2-UID chip, and then in the phone/computer browser, we open the address: http://192.168.61.1, enter login: root, password: vocore, and select Network -> Wireless -> first position radio0 -> click SCAN -> select your network from the list -> Join Network -> WPA passphrase: YourWirelessNetworkPassword -> Submit -> In the new window: Save -> In the new window: Save & Apply. From now on, the computer has an internet connection, and it did not require manually entering the password, as it was enough to paste it from the clipboard on the second computer.

Opening Ports

To allow quick configuration of VoCore2 from the local network using the luci web application, and to enable SSH connection to the computer, you need to open TCP and HTTP ports:

Network -> Firewall -> “Traffic Rules” tab -> Click “Add” at the bottom -> Name: Allow-SSH, Protocol: TCP, Destination port: 22, Destination zone: Device (input) -> Save -> Again click “Add” at the bottom -> Name: Allow-HTTP, Protocol: TCP, Destination port: 80, Destination zone: Device (input) -> Save -> In the new window: Save & Apply.

Then, you need to check the assigned IP, disconnect from the VoCore2 network, and connect to the home router—using this new IP address, check the connection via SSH and HTTP.

We connect to VoCore2 via SSH with a slightly longer command: ssh root@192.168.61.1 -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa

Disabling the VoCore2-UID Network

Should be done only after the previous steps and checking the operation of luci over the home network by visiting the page at the IP address assigned by the DHCP server.

Network -> Wireless -> SSID: VoCore2-UID -> click Disable

Transferring Files via SCP

scp -O -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa test.zip root@vocore:~/

System Update

System update involves individually updating each package that is marked as upgradable: for i in $(opkg --force-signature list-upgradable | cut -d' ' -f 1 | tr "\n" " "); do echo $i; opkg --force-signature upgrade $i; done

Installing Additional Software

opkg update --force-signature opkg list opkg install htop mc cfdisk You can also add an alias forcing the use of the full opkg package database: echo 'alias opkg="opkg --force-signature"' >> /etc/profile

The search option works rather poorly, so it’s best to grep the main list of applications: opkg list --force-signature | grep htop

Connection via Serial Port

Such a connection can be established after disconnecting the power to the TTGO VGA32 and plugging in a USB-to-microUSB cable to the second input, which is connected to the USB2TTL interface. The power supply to VoCore2 must, of course, remain active. I make the connection using the picocom application in the Enterprise Linux system because this application does not require additional steps. Minicom also works but requires additional configuration. Example of connection via picocom:

picocom /dev/ttyUSB0 --baud 115200 --omap crcrlf --echo

Connecting via SSH Using Keys

Involves transferring the authorized_keys file to the /etc/dropbear/ directory:

scp -O -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa ~/.ssh/authorized_keys root@vocore:/etc/dropbear/authorized_keys

SSH connection is possible only for the root user.

Removing Automatic Login to the Root Account

Since OSC is to be a fully-fledged home computer ;) after previously changing the password with the passwd command, you should remove automatic login to the root account and force the login prompt to appear with the command: uci set system.@system[0].ttylogin='1' && uci commit system

Adding New Users

OpenWRT is a single-user system, but you can add additional users by installing extra packages. Unfortunately, access via SSH will be possible, as mentioned earlier, only from the root account. opkg update && opkg install shadow-useradd shadow-su useradd -m user passwd user opkg install sudo echo "user ALL=(ALL) ALL" >> /etc/sudoers

After adding users, the unnecessary package can be removed: opkg remove shadow-useradd

Setting the Europe/Warsaw Time Zone

uci set system.@system[0].timezone='CET-1CEST,M3.5.0,M10.5.0/3' uci set system.@system[0].zonename='Europe/Warsaw' uci commit system && reboot

Changing the Hostname

uci set system.@system[0].hostname='new-hostname' && uci commit system && reboot

Retro Terminal

To create the effect of working with terminals from the ’70s, you need to change the terminal speed to 300bps by executing the commands: opkg install coreutils-stty stty -F /dev/ttyS2 ispeed 300 And then quickly change the speed to 300bps also in the settings of the AnsiTerminal application installed on the TTGO VGA32 board. This way, we will achieve very smooth cursor movement and text filling line by line, thanks to the excellent terminal emulation performed by the software by user FabGL.

Emergency Situations

If we want to restore factory settings, just run the command: firstboot

If VoCore2 is bricked and it is impossible to run the above command, you need to send new firmware using the Kermit protocol. Below is an example of such a transmission performed in the Enterprise Linux system (Red Hat / Fedora / Alma / Rocky / Euro)—after previously connecting the computer to VoCore2 via a USB2TTL converter: sudo dnf install -y ckermit cat << EOF > ~/.kermrc set line /dev/ttyUSB0 define sz !sz %0 > /dev/ttyUSB0 < /dev/ttyUSB0 set speed 115200 set carrier-watch off set prefixing all set parity none set stop-bits 1 set modem none set file type bin set file name lit set flow-control none set prompt "Kermit> " EOF kermit And then in Kermit, just execute the command: send /path/to/file/20200811.19073.bin

Additional Information

The author of the VoCore2 board runs a very interesting blog, where for years he systematically presents the capabilities of the device and interesting solutions that can be made with this board (both software and hardware). The possibilities of using this set are virtually unlimited, utilizing the rich application base for OpenWRT.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.