Hands-On With PineCube: An Open IP Camera Begging For Better Kernel Support

When the PineCube was announced by the Pine64 project in 2020, it created a fair bit of interest. Most of this was due to the appeal of a single-board computer (SBC) in a network-based (IP) camera form factor with integrated camera module, for a mere $29.99. Add an enclosure to it, and you would have a neat little package combining a 5 MP camera module with 100 Mbit Ethernet and WiFi. As a bonus, the system could be powered either via an optional battery pack as well as passive PoE, in addition to MicroUSB.

A few weeks ago I bought two of these boards, as part of a client project, and set out to use it for a custom IP camera implementation. With existing Linux-on-SBC and MIPI (CSI) camera experience on my end ranging from the Raspberry Pi to the Odroid, Orange Pi and Banana Pi boards, I felt fairly confident that I could make it work with minimal fuss.

Unfortunately, my experiences were anything but positive. After spending many hours with the PineCube, I’m not able to recommend it for those seeking an IP camera. There are many reasons for this, which I’ll try to explain in this article.

First Impressions

The front of the PineCube, with the lens cap removed.

Ordering these two PineCube boards (PineCubes?) was a somewhat curious experience, even if one is used to ordering hardware online. After clicking through the dialogs in the Pine64 Store and paying for the order (selecting standard shipping), I got a confirmation email. There was no estimated shipping date, but after waiting for a few weeks and wondering whether I would ever get an update, I got a notification that my order had shipped, along with a tracking link.

This tracking ended somewhere at the customs office, so that one day I suddenly was handed the parcel with the PineCubes. Inside the plain cardboard box were the two small white boxes, each containing a PineCube board in a little baggy. During the unboxing I was concerned about tearing off some wires or flex cable while extracting the contraption from the soft baggy.

The enclosure for the PineCube which one cannot get. Yet.

The speaker module is dangling at the end of its two rather long wires, and I felt it necessary to check the flat flex which connects the two boards that make up the system (is Dual-Board Computer a term yet?), in case it had become dislodged. It does not feel like the kind of board you want to handle too often, like one would a Raspberry Pi or similar. It feels fragile and you wish that you could put it into an enclosure right away to keep it safe, with no truly stable orientation to put it down on a desk.

Since the PineCube Wiki page contains a link to what should be an STL file of the case that would be put later on sale – according to a recent blog post – I had figured that I’d print a copy on the 3D printer I have standing around here before the boards got here. Unfortunately, as people in the comments to that blog post noted, no STL files were posted, but proprietary SolidWorks CAD files. Three months later still no STL files are available (Update: a “quick and dirty STL conversion” was added between writing and publishing this review). No enclosure is available for sale yet.

EoL Sensors and Linux Support

There is a GPIO header that provides a UART, SPI, I2C and such as well.

With the enclosure just being a ‘nice to have’ detail in the bigger picture (pun intended), I then focused on the functional parts of the hardware which I had received. It is rather disappointing to see the camera is an OV5640, a roughly 9-year old sensor that has been End-of-Life for a while now. It makes the PineCube’s future seem rather dubious and probably short-lived.

On the bright side, this also means that support for it under Linux is no problem, with Video4Linux (v4l) happily accepting it as an input source when setting up an RTMP stream using ffmpeg. This is quite different from the situation with the GPU in the S3 SoC, however. As one can see on the ‘Linux mainlining effort‘ page over at Linux-sunxi, Linux kernel 5.11 is the first to list S3 support as having been merged. S3 support in kernel 5.10 is done via the V3s SoC support, as one can tell when looking at the hardware overlay file in Armbian for PineCube, which is using kernel 5.10. The S3 and Allwinner V3 SoCs are derived, so some compatibility there makes sense.

A look inside the PineCube. Notice the easily damaged wires.

At this point in time, Video Encoding is still WIP (Work In Progress). This means that ffmpeg, gstreamer, or whichever graphics framework one uses for video encoding has to do all of this in software, using the single Cortex-A7 CPU core and NEON vector processing extensions. With a simple RTMP stream from the camera, this seemed to be sufficiently performant.

The PineCube also has a speaker, as mentioned earlier. Unfortunately, this cannot be used currently, with no audio device being registered. It appears that support for this may arrive with the next Armbian release, however, courtesy of an improved hardware overlay fix that was recently contributed.

Use as a Camera

In general use, the PineCube is much like any other SBC. You download the image for the target board, write it to a MicroSD card and insert it into the board’s MicroSD card reader before turning the system on. Since the PineCube has no video outputs, interaction methods are limited to either a serial connection, or SSH (if hooked up to Ethernet). After establishing a console connection using either method, logging into Armbian is as simple as 1234. (That’s the default root password.)

Once logged into Armbian, getting to the point where it’s possible to set up an RTMP stream takes little more than installing  media-ctl (package v4l-utils) and ffmpeg, before running the following commands to set up a 640×480 FLV-encoded stream to an RTMP server:

$ media-ctl --set-v4l2 '"ov5640 1-003c":0[fmt:UYVY8_2X8/640x480@1/15]'
$ ffmpeg -s 640x480 -r 15 -i /dev/video0 -vcodec flv -f flv rtmp://<rtmp_server>/live/pinecube

After running this command and connecting to the RTMP server with a player from a desktop system, the video from the PineCube can now be observed in glorious 640×480 at 15 FPS, with a few second delay. The FPS can be increased to 30 FPS at 1080p, but without hardware encoding support, this may result in stuttering and glitches.

While setting up the system, I noticed that it would reliably hang while downloading some resources via HTTP and only resume again after the HTTP download timed out. When I kept top open in another SSH terminal, I could see that the system load went up to 12 and beyond, as the system’s 111 MB of RAM (out of a total of 128 MB) filled up, along with the swap.

This same pattern repeated when I tried to set up an RTMP stream which added more local processing (h.264 encoding) and a custom security layer (encryption). Without hardware encoding support, I could see system load skyrocket until the system stopped responding. Sending Ctrl+C via the SSH terminal eventually worked after about a ten-minute delay.

The S3 SoC

The S3 SoC can be spotted deep inside the PineCube stack.

When I compare the PineCube to other SBCs I have worked with, the S3 SoC on this particular board seems to be the main limiting factor, and in particular the low amount of RAM and ongoing lack of hardware support. It seems to be first and foremost an SoC aimed at low-cost IP cameras, which means that trying to exceed the limitations that come with that focus will come with repercussions.

In that regard it is fascinating to see that Olimex are also planning to release an S3-based board this year, in the form of the S3-OLinuXino. Perhaps that having more open source boards like this around helps with increasing the support for these more obscure SoCs. What is clear to me is that without full hardware support, particularly for video encoding, the uses of these platforms will be limited.

Wrapping up

For the more casual user, I might compare the $30 PineCube with the above considerations, and something like the Raspberry Pi Zero W ($18) or Banana Pi M2 Zero (Allwinner H2+ SoC, $25), along with something like the Raspberry Pi V2 camera module with Sony IMX219 8 MP camera module ($25). For less than $50 one would have a board with more RAM (even the RPi Zero has 512 MB), a better camera, as well as the option of ready to buy or print enclosures (including with camera module).

Both the Allwinner H2+ and Raspberry Pi Zero’s BCM2835 SoCs have had mainline Linux support for years, including things like video encoding. All of this leads one to wonder just what exactly the raison d’être of the PineCube is, along with that of the presence of the S3 SoC in more general settings.

As for the more specialized setting for which I bought these PineCube boards, I’m fairly confident that it can be made to work, and very likely most lingering issues and gaps in hardware support will be resolved over time. After this experience, I do however feel that it is not the right platform for anyone who does not feel inclined to put in significant amounts of time to make even basic things work.

27 thoughts on “Hands-On With PineCube: An Open IP Camera Begging For Better Kernel Support

  1. “Significant amounts of time to make even basic things work” is pretty much PINE64’s brand. The products are cheap at least, and the draw of collaborative hacking is fun, but dragging something out of gongkai into FOSS is pretty tough.

    1. “It which makes the PineCube’s future seem rather dubious and probably short-lived.”

      Also on-brand for Pine64. I’m still waiting for their SBC that was supposed to beat Raspberry Pi on both performance and price. So far all they’ve actually delivered is half-baked vaporware and an endless stream of promised miracle products that never actually happen.

        1. I have one as well and it works great, not just for the price which is way lower than other mini solder irons.

          I find annoying this continuous pushing of the Raspberry PI brand over other products; the Raspberries are ready for use and advertised as such, while the PineCube says very clearly it is not.

          Here are the first lines from the product shop page. You can’t buy the PineCube without having read them:

          “The PineCube Single Cube Computer Dev Kit is aimed solely for development purposes. It is not a ready-to-use end product and is not for the end user looking for an IP Camera. More specifically, we only intend for these units to find their way into the hands of developers with extensive embedded Linux OS experience, and an interest in open source IP camera or embedded computer development. “

      1. That’s not true. I think their claim about the RockPro64 being faster (in terms of raw performance) than a Raspberry Pi 4 is somewhat… ambitious. Maybe in certain single threaded cases or something. I dunno. But you can definitely buy them. I’ve bought a bunch. In a lot of ways they’re waaaaaay faster than a RPi 4, mainly connectivity. The USB subsystem is hands down, no comparison faster, they have eMMC and you can slap a SATA RAID card (or 10 gig card or whatever) in the PCIe 4x slot. That was the first fast Arm board you could get for cheap that had a PCIe slot. They’re awesome little boards for like $60. I use them all the time for my robot projects. They have a bunch of other SBCs too, but I don’t think they’re very good. But they’re all available to buy.

        …although their new website layout is so staggeringly bad that I don’t know how a person could possibly tell if they even sell physical products.

      2. You might want to look at the SBC benchmarks results here (https://github.com/ThomasKaiser/sbc-bench/blob/master/Results.md), then and compare the results for both the rock64 and the rockpro64 (both 2017 releases IIRC) to the raspberry pi 3 (and even the raspberry pi 4) and say that it’s half-baked performance. I’ve had a rockpro64 running as a gigabit connected NAS file share with 4TB of drives + NVMe drive connected, and not an issue, and has way better performance than the Raspberry Pi 3B+ ever did.

        1. All board manufacturers make terrible software unless they have some interest in it because it costs money to keep developers allocated to that task. They make a working image, support it for a while, then forget about it: no more updates, including security. Not a problem though because there are other distros which were made from the ground up to support several boards.

          That’s why once a board is supported by one of the well known distros such as Debian or other dedicated such as Armbian or DietPI, there’s no need to rely on any software by the manufacturer anymore. I have several other boards beside the obvious Raspberries, and never had to download any image from their manufacturers sites because Armbian supports them perfectly.

  2. “Unfortunately, my experiences were anything but positive. After spending many hours with the PineCube, I’m not able to recommend it for those seeking an IP camera. There are many reasons for this, which I’ll try to explain in this article.”

    I don’t think they’re meant for just any Tom, Dick, or Harry just yet. There’s a big disclaimer right at the top of the page when you go to order:

    “The PineCube Single Cube Computer Dev Kit is aimed solely for development purposes. It is not a ready-to-use end product and is not for the end user looking for an IP Camera. More specifically, we only intend for these units to find their way into the hands of developers with extensive embedded Linux OS experience, and an interest in open source IP camera or embedded computer development.”

    They followed this same sort of pattern with the watch which is just now getting a 1.0 release of a community developed firmware despite the dev kits being out for a while.

    Having said that, I hope they revisit it and come up with something with better specs. I’d love to find an opensource alternative to something like a wyze cam.

    1. I think you are spot on and Maya must have missed that. The purpose, getting developer appeal for cheap. Imagine the price of this thing when mass produced, 10 – 15 bux probably..

      And yes it needs work, but that is all winner, riding on the free OS’s bandwagon. The specs are probably fine In The end, for what its supposed to be, a cheap low cost IP can.

      Tom and Maya, give it some time.

      Foss devs, please play and help out with it.

      P.s. you can always use the “supported” upstream bsp which should cover the encoder …

      1. Double the capacity of the ram chip and push the GPU driver effort and you could have one hot product. Might need to find a new sensor vendor but one thing at a time. For all we know, maybe shenzhen has tons of those ones laying around.

      2. But it’s neither cheap nor it is viable. 9yr old EOL sensor. Pointless.
        if you are a dev, you’re getting board from the likes of HiSilicon and Ambrella, or you’re doing it wrong.
        Learning Chinese helps massively if you want support.

  3. @Steven Gann – I really don’t think anything can do that. I’ve looked at Pine64’s SBC offerings, and many more from other companies, and virtually nothing beats the Pi on IO or performance (and if they do, they are much more expensive!)
    As the Pi edges into more powerful computer territory, though, it would be nice to have better IO – like PCI or SATA, and on the connector side of things, USB-C.

    1. That’s backwards. A RockPro64 blows the doors off a Raspberry Pi in terms of IO. Raspberry Pi wins on software and has a slight edge in CPU performance, if you exclude encryption. The rest of Pine64’s SBCs are slow and kinda not great though.

  4. @Maya Posch said: “This tracking ended somewhere at the customs office, so that one day I suddenly was handed the parcel with the PineCubes.”

    This is not unusual in International postal shipments and often it is destination country specific. The sender initiated shipment will track right up to the clearance point in the recipient’s home country then it stops. In order to continue tracking, the recipient must use the tracking tool on the recipient’s domestic Postal System’s web site. In both cases the same tracking number is used.

  5. I, for the most part, agree with the article. However, I feel that the author missed a couple of key details in her review. The first is that the pinecube is not ready for the use she intended… and it specifically states that on the store page – “The PineCube Single Cube Computer Dev Kit is aimed solely for development purposes. It is not a ready-to-use end product and is not for the end user looking for an IP Camera.” In other words, don’t use it as a IP cam and complain when it doesn’t do what you want (yet!). Postage – the tracking issue has nothing to do with pine64 – once they have parted ways with the item… it’s the international and domestic postal system / courier / logistics and customs you have to take issue with. The other very crucial part is in knowing how pine64 works. They are only providing hardware, and rely on the open source community at large to then make the product work. If there are not enough developers interested to make it viable for end users, it will flop. This is exactly what happened with the PADI IoT stamp… it was a great concept, but there just wasn’t enough support for it to gain traction. If you want to complain about anything, it’s that there aren’t enough developers who are able to give their time to make these projects reach their potential.

  6. I don’t really understand the complaints, this is a dev board that’s open source, you can design your own product based on this. The cost that you should be weighing is what it costs to have your own board made and assembled based on this design, compared to something else that allows that.

    It isn’t intended as a replacement for a proprietary end-user board, and of course it won’t be as cheap. Big companies with big factories can sell you a cheaper proprietary widget, that will always be true. The smaller company that is willing to give you open an open source one, they’re not going to have the economy of scale.

    “This means that ffmpeg, gstreamer, or whichever graphics framework one uses for video encoding has to do all of this in software” An embedded board like this is normally managing heat, you wouldn’t want to be pushing this load onto a weak GPU whose purpose is to run a display. Your application should try hard to be happy running on the CPU. This is not intended as a general-purpose computer that is doing something other than the application at the same time.

  7. i disagree with the people finding fault with Maya. this review doesn’t fail to take into account the advertised nature of the board. instead, it elaborates on that shortcoming for our edification, and i appreciated it. but i have one question about this board, and about pine64 in general…are these SoCs and their integrated peripherals documented / open in any sense?

    on any decently complicated SoC, even like an STM32, it can be hard to come up with all of the needed manuals even when they’re readily available…so i have a hard time scoping this out without investing a lot of time. right away i found an allwinner S3 datasheet that at least documents a bunch of registers..maybe enough information to use CSI, but definitely doesn’t seem to be enough info to figure out how to use the video encoder/GPU? if i keep going am i gonna hit a hard wall or is that sort of information generally available?

    i mean i have the separate questions of whether i want to invest a ton of time into it, and whether i will hit a brick wall even if i do invest the time. for example, i got a pi 4 without really understanding how locked off it is. i needed to talk HDMI CEC, and as i dug into cec-client, libcec, libbcm_host, libvchiq_arm, the kernel vchiq driver, etc, my personal aesthetic sense was insulted. layers upon layers of awkward wrappers around awkward wrappers. mistakes made in lower levels compounded instead of papered over.

    i mean, it was fine, i’m just picky, right? but then i hit a wall in the kernel driver, which basically is just a badly-designed messaging interface to a proprietary firmware. the firmware was implicitly documented by looking at the open source wrapper, but there was one frustrating ?bug? that i never figured out. i replaced all the userland parts of it with a *much* smaller and simpler program that does the job for me but here’s the thing… CEC is dead simple, i could have implemented a nice CEC interface on a PIC12 or STM32 in no time. if i’d had any sort of documentation for the underlying I2C or timer/interrupt/gpio pin, and didn’t have to fight a closed firmware for control over it, i would have had an opportunity for a really good solution. at the very least, i might have been able to figure out the remaining firmware infelicity.

    if you have the time, can you get to the bottom of one of these pine64 products?

  8. The review is correct and well the store page also says so very explicitly. It absolutely requires quite a bit of Linux knowledge and some effort to get working.

    On the other hand, the relative openness means it’s quite a bit more flexible and less wonky than some proprietary alternatives. Things like u-boot also support the cube since the 2021 March release, should allow network boot for example. So things are still moving forward. Generally the Pine64 chat rooms are the best place to keep an eye on what’s going on with the devices.

  9. Sounds like par for the course for Pine64 products. I have their laptop that was praised to death when announced and turned out to be equally annoying, only being relatively useable thanks to community support. Hardware is good, software usually a disaster.

    1. I was on the fence about that one. I nearly bought it like four or five times then chickened out. I own a number of RK3399 based SBCs from a few different manufacturers, and they’re great for small SBCs in robots and servers, but I couldn’t see it being decent pushing graphics in a laptop. Other than the bugs how is performance? Some new Panfrost drivers just arrived so I’m assuming things got faster lately?

  10. I follow the changes of the sunxi community very closely and I think it will take a short time to have all the hardware working, which requires activating cedrus correctly. i have tried armbian a few times but the whole system leaves very few resources to play with.
    On the other hand, today I have sent a patch to armbian to activate audio in kernel 5.11, during the week I can compile and test in kernel 5.10.
    I was also working on activating openwrt which consumes less resources, but the official repository is missing many kernel modules to activate the hardware components. luckily I found HandsomeMod which is a fork of openwrt focused on sbc boards which has kernel modules for the camera, audio, graphics among others. as well as cedar and cedrus.
    in fact there is still much to learn and discover from this small computer with a camera

  11. I saw this cube, and thought nice for $30. However, you can buy the older 4mp ReoLink IP Camera for $36 now, so why spend time and energy to hack a product that may not exist..
    I need one that has gigabit ethernet, and so just tested the old pine 64+, and my tests show 70mB/s where I got 100mB on a Pi 4, and the camera on a pi 4 is cheap, and they just released the $30 Pi 4 with less memory, so $40 for IP 5mp IP Camera that actually works. I want one for $20 however, and nothing on the market like that now.

  12. It is smaller and waterproof and despite other such deices works with custom local rtmp.
    In additional have battery.
    Low quality sensor is really disappointing,

    PS:
    I don’t see alternatives to this device9

Leave a Reply to Joel Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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