How to use a cheap TV stick as a single board computer?

image

The official price for the latest Raspberry Pi is about $40 a piece. However, it is impossible to buy it at such a price, outbids wind up huge price tags for single-payers, the main advantage of which should be the price. And even alternatives from Chinese friends in the form of Orange Pi or Banana Pi cost at least 3-4 thousand rubles, which may not be affordable for everyone. But now at flea markets you can find old and cheap TV sticks at absolutely ridiculous prices: $ 2-4 per piece, sometimes even with a remote control and all the cables. Why not try using them as affordable single payers? I suggest to try.


iron question

image

Back in the noughties, people interested in embedded and developing their own devices mastered such microcontrollers as AVR and PIC32. But the scope of microcontrollers is rather narrow when it comes to some serious applications, such as fast processing of readings from sensors or the implementation of their own computers / game consoles. Of course, there were already DSPs on the market – digital signal processors that were many times faster than conventional microcontrollers and used all the advantages of the VLIW concept (which, by the way, is used in domestic Elbrus processors), but getting a devkit, and even more so unsoldering it yourself, was a real problem for singles or even small businesses.

image

Therefore, with the advent of single-board computers, everything has become much simpler: we get the computing power of an average tablet / media player, but at the same time, all this is done in the form factor of one small board, which already has everything you need: power is supplied to all the necessary modules, USB- hub, there are outputs to the display / TV and sometimes to the sound. Another major advantage is the openness of the system: such platforms usually use Linux in one form or another (Android, desktop Linux) or other operating systems. The manufacturer usually provides everything you need to develop your applications and devices on such platforms, including the source code for bootloaders, device tree, kernel source code, as well as a complete device schematic – this is called Open Source Hardware.

image

I myself have long been interested in single-payers, but, unfortunately, the prices for them, to put it mildly, bite. If you look for some old and weak models like the Raspberry Pi Zero, then even they have horse prices (from 2,500 rubles at the time of writing). Orange Pi made a pleasant surprise by releasing 2G IoT with the RDA8810 chipset for ~700 rubles, but its production was discontinued about a year ago. One day, I was looking at ads on Avito / Yule and noticed an interesting device, which turned out to be a NoName TV stick based on a Rockchip RK3028A chip. The price was indicated more than democratic, only 400 rubles. Without hesitation, I took it for further experiments.

image

Characteristics

When I received the device, I was surprised at its size: they managed to put a full-fledged and quite powerful ARM computer into a small case the size of a flash drive! Turning it on, I almost immediately realized what was the drawback: a cyclic reboot on the logo. Of the buttons on the device, there was only Fn, which did nothing, even if you turn on the device with it. I also did not find the RESET button. It’s time to take it apart, since it’s not difficult to do it: the whole body is held on by clips that need to be carefully snapped open with a plastic card.

image

Before us is a view of the board, which can be easily pulled out.

image

image

From what we see, we can draw the following conclusions:

Firmware

I had to look for the firmware: I found the name of the device, it is a certain MK805II, for which I could not find the native firmware (including by the board number). But since the TV box roms are almost identical and don’t depend on touchscreens/displays/GPIO locations (usually they are based on a reference board), I started looking for other boxes on this chip. Along the way, having found a datasheet, I found out that RK3028A is a complete analogue of RK3026 (the difference in cases is 3026 in LQFP) and BatchTool they are defined as RK301A (relative of RK3066). After some searching, I found DEXP LD303, which ran on the same chip and on the same version of Android. The firmware in img format has been downloaded, it’s time to flash the device.

image

But first, you need to enter the firmware mode. To do this, Rockchip processors have two modes: LOADER (standard firmware mode, which can be activated by holding the RESET button) and MaskedROM (for flashing new devices that have just descended to the pipeline and where the memory is still empty. Activated if the first level bootloader is not can find the second level loader). If we don’t even have a RESET button / contact on the board, then only MaskedROM remains, which is very easy to activate if you have NAND memory: you just need to close the I / O lines with a needle. When reading the bootloader, the processor will receive an incoherent set of bytes and will itself go into MaskedROM mode, then we can flash it. The I/O lines can be found in the datasheet for your memory chip.

image
You can short any of these 4 pins to each other.

We close the contacts, connect the device from the side of the OTG connector (the USB lines are not wired to DC IN) to the computer. Installing drivers.

image

And we launch RkBatchTool.

image

Once the device is detected and the driver is properly installed, we can flash the device. We press the Restore button (namely it, not Upgrade) and wait until the program writes a new bootloader, reboots the device into LOADER mode, formats the memory and writes a new system image.

image

Everything, the firmware process is completed, we run to stick our single-board device into the HDMI of the TV, connect the power and wait for the download. Earned! For the initial setup, you will need a mouse that can be connected to a regular USB port.

As a result, we got a stable working TV-stick based on Android 4.2. Not to say that the system is very fresh, but also quite okay, you can still live on it. Let’s try to find a use for it. Below there will be photos, not screenshots, so that you can see how it looks in action, and also because there is no built-in screenshotter.

Thin client

There are a lot of applications for such a stick, and one of them is a thin client. Remember, there were such cars before? These are small computers that have minimal characteristics (ARM, Geode, MIPS processors, a small amount of RAM, as an OS – Linux / WinCE), designed to connect to and work with more powerful computers / servers. At the same time, the thin client is engaged in input processing, image output, networking, and sometimes it can autonomously perform some tasks and can be equipped with a hard drive.

image

This stick can also be used as a compact thin client by connecting it to the back of the monitor. We display the hub, connect the peripherals and install the RDP client. I was able to connect to the main PC without any problems and use it. In addition, Android supports some other USB peripherals: potentially even external Ethernet network adapters. By the way, Wi-Fi on the stick is implemented as a USB whistle soldered to the board. Such a TC will be able to output a picture up to 1080p, which should be enough for everyone.

Game console

image

2 cores at 1.2GHz and Malii-400 are pretty good computing resources for games. You can forget about modern Modern Combat and Call Of Duty Mobile, but who said that there would be nothing to play on such a stick? Android fully supports USB gamepads in any quantity, so the device will make a good machine for games. But for what?

image

Not many Android games from the early 10s support a gamepad. Of some, almost all parts of Asphalt and other Gameloft games, some games on Unity, GTA (which, by the way, will be too heavy to play even at 720p on Mali400). But those that support usually work well. Some where you have to tinker with the graphics settings.
And with emulators, things are quite okay: dandy / sega / PS1 are doing well. Alas, the console will not be able to play games with PSP or Ps2: look towards devices with Amlogic S905X.

image

Compact Server

Yes, this is not a joke. On the device, you can deploy a server, including a file server. Or place a personal page on it – who cares what. The device has support for USB-HDD or flash drives.

image

There are quite a lot of servers of various types on Android, so we can also find application in this vein.

multimedia station

image

The most obvious point, because even the manufacturer calls this device a media player. However, most of the features of this gadget may not be obvious to everyone. The list of what such a stick can now include not only playing music or video in quality up to 1080p, but also a DLNA media server and the ability to use something like Invidous to watch YouTube.

image
MP4 h263, 1080p30

Now in hardware stores, budget TVs are still sold without support for Smart-TV capabilities, so if the budget is very limited, and you would like to get a smart device at least in some form, then why not? Some TV boxes (specifically boxes) also have analog outputs, which allows you to connect them even to old CRT TVs. Surely there is someone here who is still a fan of those healthy TVs, the size of a closet and weighing a couple of hundred kilograms?

image

Summarize

It seems that old TV sticks can still serve a person well and remain useful even 9-10 years after they were released. Thanks to a penny price, support for FHD image output and the presence of several USB hosts, such devices can be extremely useful in the country, in the garage or even in the office, especially if there is a need for a thin client. Theoretically, it is possible to install a regular desktop linux here, even on a separate SD card, but due to the small amount of RAM and a weak, by the standards of desktop Linux, processor, it will work so-so. However, at flea markets, more powerful devices based on the S905X and eight-core, fresh RockChips are rapidly becoming cheaper!

Of course, this device cannot be called a complete analogue of the RPi: there is no comb with GPIO. But this does not mean that they cannot be implemented by ourselves: we have a potential UART, we have a USB host, which means that with the help of a home-made GPIO Expander, we can control the pins of a conditional arduino the way we need. If you are interested in such a device, then go ahead to the flea markets, the choice is really large.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *