Archive for the ‘Hardware’ Category

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 '127.0.0.1'
 option netmask '255.0.0.0'

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

config interface 'wlan'
 option type 'bridge'
 option ifname 'eth0'
 option proto 'static'
 option ipaddr '192.168.3.1'
 option netmask '255.255.255.0'
 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

wifi

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.

Advertisements

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:

ESP32
  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…

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…

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..

News from “The Lab” – New server booting!

And finally my server is up, even though not running yet.

Even after trying to fix the backplane joints that seemed to be broken, it didn’t came up as I wanted it to do.

So I firstly purchased on eBay a replacement backplane, and tried it with no luck.

Then I finally got a replacement PERC 5i card, and I solved my problem with not recognized devices.

I only have to install ESXi and start playing now…

News from “The Lab” – New server faulty?

Today I think I found out what was blocking my new server from properly booting.

This is a close-up of SAS backplane.

It’s quite hard to see, but some pins of the main Cypress component are bent. A close look with a (cheap) PCB inspection microscope made me quite sure that this damage could prevent the PERC card to properly detect the backplane itself and, in turn, the disks.

I asked my colleague to fix the problem by reworking the joints, and tomorrow I’ll test if this patch works.

In the meanwhile I’m watching some spare parts on eBay… Murphy is always watching you…

Stay tuned!

News from “The Lab” – New server troubles…

As I recently discovered, my new server is not working as it should.

After some suggestions from my friends, I tried reseating all of the internal cards, starting from the PERC 5i controller and PCIe riser card. None of them made the server to properly boot.

As a last resource I removed the PERC card (the riser card cannot be removed because it’s used to connect the front panel, with power on switch, to the baseboard). Obviously as expected the F/W initializing , along with PERC BIOS messages, didn’t came up. Connecting only the card, removing connections with the SAS backplane, brought me to the conclusion that the problem could reside into the backplane or the disks. If I remove the disks I’m warned about their absence, but reinserting them doesn’t make any blinking LED to came up.

So I suspect that I have to look after some new disks to check and then pray that the problem is not due to a faulty backplane…

More coming…

News from “The Lab” – The new server

I decded to switch over to a new server, as the old HP Proliant was unable to handle 64bit virtual machines (due to lack of BEST in its processors).

I found a cheap Dell PowerEdge 2950 with two quad-core processors, 8GB RAM and two 146GB SAS disks.

But…

When I turned on the server after its installation, this message came up:

It seems that the PERC controller is not working… I just tried reseating it and the riser card, but no luck.

I will try to remove the controller to see if the message still persists, just to isolate the problem source.

If anyone has some ideas on how to troubleshoot this problem, please let me know.