Raspberry Pi 20×4 LCD i2c C++ Driver

Introduction

I have written a C++ driver for the common 20×4 LCD using i2c on the Raspberry Pi. These LCDs are based onΒ HD47780. Most examples I found are using the pins directly and not through i2c. I2c uses a lot less pins than directly connecting the LCD. I originally wrote this in C and then decided to convert to C++, as I am re-learning C++!

Breadboard Layout

Read more…

Please share πŸ™‚

FreeNAS Failed to create mountpoint

Problem

I have two FreeNAS servers running version 9.10 on a HP MicroServer Gen 8. The main server has 16 GB RAM with a Intel(R) Xeon(R) CPU E3-1220L V2 @ 2.30GHz while the secondary has 8 GB RAM and a Intel(R) Celeron(R) CPU G1610T @ 2.30GHz. These two replicate data in both directions for off site backup. I recently upgraded them both to FreeNAS 11 U2 while also taking the opportunity to migrate backups from ISCSI ZVOL to Datasets. This meant replicating the new datasets.

Read more…

Please share πŸ™‚

FreeNAS 9.10 Replication can not mount

Problem

Replication has been working fine using a dedicated user until I decided to move my backups from ISCSI shares to NFS shares, thus having to replicate from scratch. The replication seems to work as the dataset is transferred and the data is readable on the remote side. However on the push side it is marked as “Failed”, then after a short while it is marked as “Up to date” but no snapshot is listed in the column “Latest snapshot sent to remote side”.

In the logs (tail -f /var/log/debug.log) I kept noticing this:

AugΒ  8 19:19:29 nas autorepl.py: [tools.autorepl:157] Replication result: cannot mount ‘RBS-POOL/Backup/Backups’: Insufficient privileges

Read more…

Please share πŸ™‚

Linux – Move back in time backups

Back in time is mainly a Linux backup tool which uses rsync to perform efficient incremental backups. This quick post shows you how to successfully move back in time backups to a different location. If you try to copy the folder using a file explorer it ends up trying to copy a vast amount of data which isn’t actually there. My photos backup totals around 120 GB but trying to copy this manually resulted in the file explorer reporting 1.1 TB of data to be copied.

Read more…

Please share πŸ™‚

Route certain traffic via WiFi in Windows – Powershell

Disclaimer:

I WOULD NOT RECOMMEND USING THIS CODE TO CIRCUMVENT FIREWALLS ETC AT YOUR PLACE OF WORK. THE SAMPLE CODE ON BLOG.MONOTOK.ORG IS PROVIDED β€œAS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MONOTOK OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Problem:

Sometimes you might need to send certain traffic destined to a FQDN via the WiFi network while the rest of the traffic goes via the Ethernet. An example could be that a certain destination is only reachable via the Ethernet or WiFi but you want the rest of the traffic to go via the other interface.

Windows routing table uses several metrics to decide which interface traffic takes. Normally when both the Ethernet and WiFi are connected, the Ethernet will be preferred over the WiFi; this is decided via the Metric number. This is automatically generated by Windows unless changed, for example the Ethernet will be 10 and the WiFi will be 30. The lower number is preferred. You can also assign a metric to a static route inserted into the routing table however the routes metric is added to the interface metric. This prevents the route overriding the Ethernet even if you make the interfaces the same metric and then remove the WiFi default route (Windows kept inserting it again anyway).

Read more…

Please share πŸ™‚

EVE-NG access over Internet – Reverse Proxy

Intro

This is a follow up post to NGINX Reverse Proxy LetsEncrypt Auto-Renew where I should you how to configure NGINX as a reverse proxy. This post details the specific configuration needed to access eve-ng over the internet using a reverse proxy. I assume you have deployed the eve-ng appliance on ESXi or another hypervisor however it will probably work with bare metal installs.

Read more…

Please share πŸ™‚