Onion Omega – a brief pause from ESP32

The Onion Omega

I’ve got a lot of work to do (yep and also I’m a bit tired at night when I play on my own things), so I stopped a little bit developing on the ESP32 platform. But in the meantime I had the opportunity to use a device I baked on Kickstarter in 2015.

It was a really nice project and I was so proud to have baked it, than when Onion relesed its version 2, i baked that too, and I reported its arrival in this article.

Since then, I  hadn’t so much time to spend on that project, neither I had any idea about what to build on it. But then soomething happened that made me wonder and thinking how to use it for my urgent need.

The background

I have a garage, which is connected by an Ethernet cable to my house network. In this way I can monitor everything with an IP camera, and lay some other stuff there (like my server, my OpenMediaVault NAS, …). But the garage is at floor -1, so is basically under the terrain. In this way when I’m there I cannot use my smartphone to make any call and being reachable from my wife.

So I had a thought: I grabbed an old ADSL + WIFI router with the ADSL port broken, i wired one of its LAN port to a firewall (I spoke about its hardware in this article, but I forgot to mention that as ESXi installation wasn’t gone well, I installed a plain pfSense firewall to play with) and then the WAN port of the firewall to my Ethernet cable. Just a little bit of configuration and I created a garage wireless LAN which is able to navigate in Internet using my home router, but can’t reach or surf my internal network. Awesome.

But sometimes what is working good suddenly stops working. This happened a couple of times, and just replacing the router’s power supply fixed the problem. But after three failures, I decided it was time for the router to be exchanged with something other, more cool, more modern, more… Well something I had already here without having to pay another time for a new power supply.

The Omega

Omega is an hardware platform running an OpenWrt O.S. on an Atheros chipset. You read it good: OpenWrt and Atheros. Basically we have the routing O.S. for excellence and the one of the widest available wireless platform, both at the same time in the same product. Said in another way, we have a wireless router in our hands.

The guys at Onion did a very nice work creating a project book, wich collects a wide range of designs for their hardware platform. The book is freely available here, both in the online version and in the downloadable PDF version. One of the articles available depicts how to create an Ethernet dongle, which routes the Ethernet connection to the Wifi (and vice versa). So all we need to do is to change the /etc/config/network file with a one suitable for routing and eventually configure the WiFi interface for encryption, SSID and password. Let’s start.

The first step is to connect to the board, using the preferred method. I’m just skipping the detailed instructions as they’re already listed in the Omega’s project book. Following the proposed link to Github repository, we can use the following file:

config interface 'loopback'
 option ifname 'lo'
 option proto 'static'
 option ipaddr ''
 option netmask ''

config globals 'globals'
 option ula_prefix 'fd1d:48c4:7633::/48'

config interface 'wlan'
 option type 'bridge'
 option ifname 'eth0'
 option proto 'static'
 option ipaddr ''
 option netmask ''
 option ip6assign '60'

config interface 'wan'
 option ifname 'eth0.2'
 option proto 'dhcp'

config interface 'wwan'
 option ifname 'apcli0'
 option proto 'dhcp'

After this we are almost done with the bridging. We can probably omit the IPV6 configuration at line 7, 8 and 16 (but I left it as I was not completely sure). The last step we can do is to configure the WiFi interface to expose with the wanted SSID. As I was going to replace a previous WiFi router with this one, I decided to use the same SSID and password. To configure them you have to use the following commands:

uci set wireless.@wifi-iface[0].ssid=MyPreviousSSID
uci set wireless.@wifi-iface[0].key=MyPreviousPassword
uci set wireless.@wifi-iface[0].encryption=psk2
uci commit

Then you can restart the WiFi with the


command, which will apply the new settings. The interesting part in this setup is that the Omega board is powered with an USB cable directly from the APU, so I don’t need a new power supply.

All done. I have a new WiFi router wich is smaller (probably also less powerfull but, it suits my needs). I only have to find a plastic box to wrap it around and avoid any accidental contact with something.


ESP32 Clock – Introduction

Ok, let’s start our big little project based on the ESP32.

First of all, we provide some guidelines on the project, which will be followed for the realization of the first prototype:

  1. ESP32 board has no many way to interact with a user, so at first glance our project will have only one purpose: connect to a NTP server and get the correct time;
  2. Neither it has a real RTC clock peripheral, so at the moment an RTC peripheral has to be emulated by software; when power is lost, also clock is lost, so we need to restart the board and reconnect to the NTP server to synchronize time again;
  3. To connect to the network, we have to provide a network configuration and WiFi configuration; as we don’t have a way to configure it (yet), we will hardcode the access point name and password, we will use DHCP and we will put at least one NTP server in the firmware.

So basically speaking, this would be just a proof of concept about the building of an ESP32 clock. Then we will start adding features to make this project more usable.

I decided to create a public GitHub repository to host all of the code needed so it will be easier to track down issues, bugs and improvements. You can find it at this address.

My ESP32

Several time ago I bought on Banggood an ESP32 dev board equipped with a OLED display. At a fancy 10,50€ including shipping I received:

  1. the board itself, which consist on
    1. the main control chip using Le Xin ESP32, Tensilica LX6 dual core processor, clocked at 240MHz, computing capacity of up to 600DMIPS,
    2. 520 SRAM
    3. 802.11 KB chip b/g/n HT40 Wi-Fi transceiver, baseband, and LWIP protocol stack, Bluetooth (Bluetooth dual-mode integrated traditional and BLE low-power Bluetooth) and Wi-Fi antennas
    4. onboard 16 Mt bytes (128 Mt bit), Flash
    5. 0.96 inch White OLED display
    6. lithium battery charging circuit and interface
    7. CP2102 USB to serial chip, perfect support for Arduino development environment
  2. a couple of pin strip
  3. a heatsink for the main processor
  4. a cable to power the board with a lithium battery

Even though I don’t know what Mt means… it’s a great board. As ESP32 is widely used at the moment, I thought that it would be nice to have one to play with, especially at that price and with a display.

I started today to play with it, and thanks to Banggod comments and Q&A section I was able to get the original demo sketch, load it, modify it and make some changes. Now all I have to do is just find something to do with it. As it has WiFi and a display, a neat application could be to create a digital clock synchronized via NTP. Maybe I’ll post the code in the following days…

Server upgrade

I told about the new hardware I bought for my server in this article.

Specifically the hardware is:

  1. An HP 491838-001 network card, that is a NC375i PCIe quad gigabit port
  2. A QLogic QLE2560 SFP FCA with it’s fiber module
  3. A Brocade 4Gb SFP module

Let’s start from the first item, even though it is an HP spare part, it works fine even in my DELL. It is a PCIe x8 card and, as in my PowerEdge I only have x8 slots, I put it in one of them, using the riser card. Both the BIOS and ESXi recognized it and it started working.

The second item it’s a QLogic FCA card. It’s basically a network card but with a firmware oriented to SAN connection. At first I bought it to connect the server to the data center switch using a fiber. I wasn’t expecting a big throughput, as my switch has only 1Gb connectivity on SFP: it was just to try to use a different kind of connection. When I realized that the card was indeed unusable for my needs, I decided to let it in the server just to see how it appeared in ESXi: it is recognized as QLogic FCA as expected, but I’m going to remove it and resell, as I don’t need it anymore.

The last item is a Brocade SFP 4Gb adapter. Well I bought it to be placed into the SFP slot in the switch, and I assume it’s working. Unfortunately it can’t communicate with the QLogic’s one, as they are meant to talk different languages. But I have another SFP and I’m quite sure than soon or later I will find something to connect them to.

Back online…

Today I decided that it was time to turn on my NAS box again. Well in fact it was about two or three weeks since I bought a new USB stick (I hope it’s more reliable than the oldest one I was using) and I put on it the latest OpenMediaVault release.

In the past week I tried several time to boot the box, and all of the time it ended with the machine running for less than an hour, and then suddenly shutting down without any advice. It seemed to end up in an unknown condition, where it seems to be sleeping, the power supply has a yellow led on (instead of a green one) and network cards blinks, so it seems more a power saving feature rather than a real shut down.

Today I decided I wanted to know more… so I started up the server and waited on the console. After it booted I opened two consoles, one for upgrading the whole system and the other one to monitor it using htop, whose package is included in all of modern Linux distros, even in OpenMediaVault.

I already told that after some time of usage, video suddenly disappears. Today it didn’t happen. Video output from VGA connector worked like a charm, so I was able to upgrade the whole system from the console and finally rebooted the system. I connected through the web console and I was able to activate SMB, import the RAID filesystem and USB filesystem on an external drive, browse to the shared folders I created and then make them again available on the network.

So it seems that now my OpenMediaVault box is running again. Now I wonder when it will shut down again without any warning… Maybe in the meantime I will look for a way to proper backup setup and configuration, so that a restart could be easy to manage.

Got a new bunch of hardware to play with…

Ok, my OpenMediaVault NAS is again K.O. and I’m really upset with it, as I loaded some data on the RAID array and I want it back again soon.

But in the meantime I ordered on eBay some cool stuffs to play with my DELL server.

I grabbed a quad gigabit Ethernet card, an SFP card and a couple of SFP fiber optic adapters.

I would like to set-up an optic link between my server and my main switch, which has a couple of SFP ports. It won’t be a really fast connection, as it only support 1Gb link, but it’s just to try a different media and approach a new topic.

The quad Ethernet card will be used to route some insulated networks to test other IoT devices in a separate environment.

I really hope that both cards can be detected by ESXi and all of these stuffs works… I’m quite concerned about the quad Ethernet card: it’s an HP branded card, with some strange connectors I’ve never seen before, …

More coming soon…

Remotely turn on remote desktop

Sometimes you need to access a PC remotely, but remote desktop has not been configured. What can you do without being in front of that PC?

Follow these instructions: Remotely turn on RDP

A very usefull article!

openmediavault further steps…

Some time passed since I installed openmediavault on my new small server.

I was just thinking that it would have been simple to work on, but the web interface seemed to freeze on several configuration command. I thought I was using a bad UI, but a simple search on the forum lead me to a worst case scenario: one of the drive was really failing in my server.

As I mentioned in my previous post, something weird had probably happened during transport, as I found an unpinned heatsink. But maybe also the disk had its faults (I hope it gained those too during the transport).

So what now? I’m planning to replace the faulty disk with a new spare disk as soon as possible, to see if every problem goes away and I will be able to fully test openmediavault.

Let’s see…

First experiments with OpenMediaVault

In August I wrote about my new gadget that I bought on eBay.

It’s basically a 1U micro server with two non hot-swappable 1TB disks, 8GB of RAM and an AMD Opteron quad-core 64bits CPU.

Well it arrived and I started doing some experiments on it. At first I wanted to install NAS4Free, a FreeNAS derived distro focused in storage management. My intent was to install it on a USB key, to leave the two disks available for data storage. But it wasn’t so easy to install: installer refused to go beyond network card initialization, so I thought that my new used server was faulty. So I used a Knoppix bootable media (a DVD version written onto a different USB key) to give a look on the system and test RAM with memtest86. It seemed all ok, so I tried another time with the installer, but even in this case with no luck.

Then I tried the original FreeNAS distro, assuming that it was better developed (it’s now a commercial product), but even that didn’t work. Googling around there are some reports on AMD Opteron CPU and FreeBSD, the distro on which both the NAS distro are built on. As I’m not familiar with the *BSD environment as I am on Linux, I took a totally different direction.

On my favorite channel on YouTube, MyPlayhouse, I came in contact with Xpenology distribution. This is basically a way to install a Synology proprietary operating system on a PC hardware. This is a experimental setup, that will give you the opportunity to test a really good built and Linux based NAS-like distro. I’m not going deep on that installation here, there is a lot of documentation on the web about it; I just let you know that it worked pretty well for some time, so I was convinced that my hardware was not fault, … well not at most.
In fact when I was building up a RAID 1 array the first time, one of the disk was inhibited to be used; the reason? SMART reported that the sector reallocation count was too high. Ouch! I tried to test it but system freezed several times, so I gave up and turned all off, and bought some 1TB used replacement drives. When I was to replace the defective drive, I thought I would have to give it one more try, and all errors disappeared… Why? Maybe during transport some cable were loosened, and when I touched all of the stuff inside I put it to work again.

When I was digging in the inside, I noticed a passive cooler was hanged to the mainboard only with one plastic pin; the other one with it’s spring disappeared… Maybe some of the reported errors was given by overheating of the controller chip. I then replaced the missing pin, but first put some silicone grease under the heatsink, and tried again to install something…

My last choice was OpenMediaVault, another free and Linux based distro. It can be installed from an USB key onto another USB key, and it’s pretty stable, full of features and widely used.

It’s installation process was pretty straightforward, but as I didn’t have more time to spend in front of the monitor, I launched it and went to work. When I got back home, monitor was off, no signal, and server was powered down. Tried again on the following day, but is sounded worst: after some time the monitor started flickering: VGA signal started going away randomly, even in BIOS screen, so I thought that my server time was arrived…

I tried the last time to install OMV from the beginning, this time waiting in front of the screen… And this time it all worked!

Now I have my OMV system installed and running, I just have to perform the disk partitioning and start using it.

A new gadget is coming…

Even during holidays I can’t resist watching eBay and similar sites. And thanks to YouTube channels I’m following (first of all My PlayHouse), I decided to buy a new 1U server to join to my DELL PowerEdge in my data center.

It’s basically a 64 bit dual core Opteron with 8GB RAM and 2x1TB SATA disks.

I’m planning to use it as a NAS with FreeNAS to share an iSCSI device for my ESXi host running on the DELL PowerEdge.

More info coming when the device will be in my hands..