3D Printing Stands for Traxxas TRX-4

After getting a Traxxas TRX-4 kit with the Defender body some time ago, I learned that it’s not good to let the car sit on its tires in the shelve all the time, because the tires will get flat spots.

So a good opportunity to get into 3D printing again and design stands to put under the car.

I did the design in Fusion 360 (which is free for hobbyists) and then printed on my cheap Prusa i3 MK2 style printer from Taobao. Here’s the result:

Here you can download the design (Fusion 360 file and STL files for the components):

And for anyone interested, here’s the toolchain I used:

  • Fusion 360 for 3D design and STL export
  • Slic3r for slicing, i.e. converting the STL 3D model to GCODE printer control command
  • Pronterface to control the printer and to send the GCODE

WordPress behind web proxy

As I searched for a long time for a solution, here a short note on running a WordPress site behind a web proxy, like e.g. in a company network needed to access the internet. I’m not talking about a reverse proxy setup here.

Some time ago, a WordPress setup in a company network stopped installing updates. As internet access was only possible through a web proxy, I assumed that this caused the issue (already know the trouble from many other tools…).

WordPress still displays information, that there are updates available, but install fails with the message “Download failed”. I could not figure out what was going on.

After some more research I found that there are two things to observe:

  • Set up WordPress by configuring the proxy server in the wp-config.php file like this:

    This is the easy part and described on many other websites, too. But this alone is sometimes not sufficient.
  • The important, and in my case missing part is th following: You need to make sure, that the PHP curl module is installed on your webserver (at this time php7.2-curl), because curl is used to download plugins and updates.

Setting up a Banana Pi M2 with Armbian

Since some time I have a Banana Pi M2 sitting in the storage room used as a server for files and media. I do not exactly remember where I got the installed Linux, but it was something based on Raspbian, which is not really suitable for the A31 processor. So some days ago I decided to re-install it from scratch with Armbian. The following are some notes related to setting things up.

Armbian

Installing Armbian was quite straight-forward: Download the image for the Banana Pi M2 (they offer images for a wide range of Arm-based boards) and write it to the SD card with dd:

For the first boot, I attached keyboard and monitor. The BPi rebooted once to extend the file system to the whole SD card and when logging in with the root account with default password 1234, it forced me to change the password.

Armbian login message of the day
Armbian login message of the day

So until now the experience with Armbian is really great. Everything works flawlessly.

Basic Setup

From all the Raspberry Pis I have installed, I found some basic things that I always need to configure after installing the OS in the same way. The main things are:

  • Create a new user account
  • Add this account to the sudo group to be able to do administration tasks
  • Copy my SSH public key to the .ssh/authorized_keys file
  • Set up capability to send mail
  • Set up unattended-upgrades

The first three steps to set up a user account are really standard. If you do not yet use SSH public key authentication, read one of the many available tutorials and get familiar with it!

Setting up Mail Sending

As the Banana Pi and also the Raspberries all run headless, I need some other way to let them talk to me and send status updates. So my preferred way is to set up a very simple mail server to send out mail. For this I use the ssmtp package and as a client tool for sending mail from the command-line I use bsd-mailx:

ssmtp is not really a mail server, because it cannot queue the mails. Instead, whenever you send a mail, it directly connects to another mail service for sending.

For setup, you just configure ssmtp by its configuration file in /etc/ssmtpd/ssmtpd.conf. My file looks similar to this:

Depending on the mail service you use, the configuration needs perhaps to be adapted. At least mail server, user name and password need to be set correctly.

To test sending mail, use the mail command like this (please use your own e-mail address for this…):

It asks for the recipient. After that, you can enter text. A dot (.) in a separate line ends the entered text and the e-mail gets send out.

Unattended Upgrades

When having only one or two Raspberry Pis, it’s fun to keep them up-to-date. Until some time ago I used the apticron package to send e-mail notifications when updates are available. But at some point it got too much to always log in by SSH to various computers to install the updates. So now I switched to use the unattended-upgrades package. If it’s not yet installed, install it like this:

After that, you need to edit the configuration file in /etc/apt/apt.conf.d./50unattended-upgrades. I changed the default to send status mails to root (ssmtp later translates this to my real mail address) and to reboot if this is required by packages. Finally you need to enable the unattended upgrades like this:

For Armbian, you need to adapt the standard configuration for allowed package sources, from which packages are installed unattended. This is stored in /etc/apt/apt.conf.d/50unattended-upgrades:

With this configuration, all available new packages from Ubuntu and Armbian repositories are installed automatically.

After installing the package, I recommend to monitor the log file at /var/log/unattended-upgrades/unattended-upgrades.log for a few days to see if everything is running fine. For a more detailed explanation of this package, you can have a look at the Debian website.

 

Opening Mifon IPTV 4K Box HG680-J

Today I had some time and while tidying up, I found a set-top box we got some time ago from our Internet provider. It came with a contract for combined 50Mbps fiber connection and IPTV.

The guy who installed the IPTV box (labeled FiberHome HG680-J) showed us that it worked, but afterward we tried once and did not get it to work, because it did not want to connect to the network. We lost interest and since then it’s sitting next to the TV and is not used. So today I got  curious about the contents of this little box and decided to open it and share the findings with you.

Continue reading “Opening Mifon IPTV 4K Box HG680-J”

E-Mail Notification for Windows Updates

Sometimes I have to deal with a Windows server. But I do not log in regularly, so I wanted to be informed about available Windows updates by e-mail. Some short research in the internet indicated, that this is not possible out-of-the-box.

So I enjoyed hacking a bit of Python to create a script that triggers the check for new Windows updates and send out an e-mail with the result. You can find the script on Github: https://github.com/motlib/email-win-updates

The README explains how to set it up in detail. Basically, after cloning the script, you copy the configuration file template and add your e-mail address and SMTP server name. Then you can e.g. add the script to the Windows Scheduler and run it once per day.

Here is an example e-mail sent by the script:

 

Raspberry Pi service startup scripts

Sometimes you want to start a service or daemon. That is a program running in the background which is usually automatically started when Linux boots and which is shut down when Linux goes to shutdown.

The idea is to put a shell script to the directory /etc/init.d which can start and stop your daemon. This script accepts standard command line options like start, stop, restart (restart the service by stoping and then starting it) and reload (reload and apply the configuration while the service keeps running). Then you tell the system to set up everything to call the script with the right parameter during boot or shutdown.

Continue reading “Raspberry Pi service startup scripts”