Orange Pi Zero 2W at first glance

Orangi Pi has recently introduced the Orangi Pi Zero 2W single-board computers. There are a couple of variants, with changing amount of RAM, maxing at 4 GB. The CPU is a 4 core Allwinner H618 Cortex-A53. The main board houses CPU, some system chips, antenna connector, micro-SD socket and 16 MB flash. There is also mini-HDMI socket as well as 2 USB-C sockets, one for power in and one for general peripherals. There is also handy 2 x 20 pin hole grid in the main board, and thank heavens they have not soldered the provided pin header in because it would actually more than double the height of the construction. They played this very smart. This does not happen often in electronics industry.

One side of the main board has a flat cable connection possibility to external daughter card housing IR receiver, RJ45 Ethernet, some buttons, 2 regular USB ports and audio jack. The board is incredibly thin. Everything in this design hints it will be a killer app for so-called “smart” TVs.

We took a short exploration tour of the product tour with the vendor-provided Debian Linux  (Note: Daughter card was NOT connected nor tested.) Read more below.

Continue reading “Orange Pi Zero 2W at first glance”

Epoll tutorial and understanding the overlooked epoll_data_t

Epoll is a mechanism of Linux Kernel / Linux C runtime to monitor multiple file descriptors for I/O. Lets say you have a server program which has open connections as file descriptors. Epoll mechanism offers more performant “watching” of all these file descriptors for activity compared to some other options, like select(). Some tutorials about epoll exist on the internet, but many fail to acknowledge WHY what is happening is actually happening. So allow me to walk you through with this small example program utilizing epoll.

Continue reading “Epoll tutorial and understanding the overlooked epoll_data_t”

Forcing VMware virtual machines to appear 32-bit on 64-bit hosts

There are sometimes needs to run 32-bit VMware guest images on a 64-bit host. This is possible, for example in VMware Workstation 15 Player. The out-of-the-box behavior, however, is that the Player passes trough the CPU information more or less as such. The result is that the guest sees a x86_64 processor, not a x86 processor. Frequently this detection is made by reading the CPUID 29th feature bit for so-called “long mode” (see: https://en.wikipedia.org/wiki/CPUID#EAX=80000001h:_Extended_Processor_Info_and_Feature_Bits ). As this is seen by the guest, it might think it needs to run 64-bit image (Player does not force this, it is a decision of the image itself). The long mode bit seen from Linux /proc/cpuinfo :

Continue reading “Forcing VMware virtual machines to appear 32-bit on 64-bit hosts”

PC Engines APU2E0 – a tiny fanless server with Intel NICs

My earlier gateway box, the Lanner NCA-1010B decided to stop working, leaving everything as a messy chaos. I gobbled up my retired Zotac Zbox and hastily built a makeshift router.

A long term solution was however needed. I had heard good things from this no-bullshit-geeky Swiss company called PC Engines GmbH. They make a board called APU2E0, among other things. It is a AMD GX-412TC-based SOC product with 2 Intel i211AT NICs. And it does not have regular monitor connections. Instead, there is a DB9 serial port for installation purposes.

The board’s sister version is pictured below for reference.

Continue reading “PC Engines APU2E0 – a tiny fanless server with Intel NICs”

Building Raspberry Pi Alpine Linux drivers (splix) for Samsung SCX-3205

(Executive summary: Some prebuilt packages also available at my site http://alpine.asuka.fi/v3.12/community/ )

Remember my old war horse, the Samsung SCX-3205 black & white printer/scanner? I recently moved in to a house. My girlfriend did not want printer near TV (with my ESXi shoebox) anymore, so I had to invent something else.

I had old Raspberry Pi 2 Model B v. 1.1 around, so I thought I should hook it up with the printer. Unfortunately I ended up compiling the necessary drivers myself because Alpine Linux did not have anything relevant. (I don’t blame them, this is quite outdated and rare.)

BTW Some Prebuilt packages are available at

http://alpine.asuka.fi/

Continue reading “Building Raspberry Pi Alpine Linux drivers (splix) for Samsung SCX-3205”

LEGACY Crash Course in Debugging C Programs with Emacs GDB (annotate=3)

I have a constant need to debug specific C programs. Because I have mostly worked in constrained embedded systems Linux environments, in reality I have not had possibility to have a debugger available. So I never learned GDB. But recently I was able to compile the application binaries in a regular 32-bit Linux environment. I was finally able to do debugging with Emacs GDB after learning just one day. This crash course will probably help you if you want to learn GDB debugging with text mode Emacs. We will be using the gdb-many-windows variant layout.

Continue reading “LEGACY Crash Course in Debugging C Programs with Emacs GDB (annotate=3)”

Reverse-Engineering The Samsung SCX-3205 Scan To -Button Protocol

USB packet analysis in USBlyzer

In the year 2014, I tried to be smart with my old Samsung SCX-3205 printer/scanner device. I wanted to get the physical Scan to -button to work. I went with Windows first. It failed eventually, and as a result, I had to reverse-engineer the Samsung USB protocol to get things to work in Linux. Continue reading “Reverse-Engineering The Samsung SCX-3205 Scan To -Button Protocol”