Flashing the ESP32 DevKit V1

On occasion, dealing with embedded hardware can be a bit of a pain. Flashing ESPs is a bit of guess and check from time to time. We’ll be flashing an ESP32 DevKit V2 today. We first need to install the drivers from here: CP210x USB to UART Bridge VCP Drivers – Silicon Labs (silabs.com)

With those installed, plug the USB connection for the controller into your PC (Close out of CURA too!), and from ESPHome web, connect to the COM port for the device. After that, hold down the boot button while selecting “Prepare for First Boot” in the ESPHome web interface, and keep holding it until you see the install begin running (getting the percentage complete, etc). Once that shows up, you can release the button and wait for it to finish flashing.

Tl-Dr

  • Install Driver
  • Plug in USB
  • Connect to COM Port from ESPHome Web
  • Hold Boot button while starting the install

Fixing the WordPress App Connection to my site

It started out with the WordPress app stopping working for me on my phone. This happened a few months back as well and it stayed broken for a few months before it started working again. This time around I was rather very annoyed and wanted to figure out what was going wrong and fix it. In the end it came down to XML-RPC and an “optional” package in the WordPress health check.

Continue reading “Fixing the WordPress App Connection to my site”

Removing Passwords from Git Repos

For those who have accidentally committed passwords, api keys, etc to a guy repo, we have a great tool available to take care of it, BFG. BFG will remove those secrets from the entire git repository’s history, not just the most recent commit.

bfg --replace-text passwords.txt

git reflog expire --expire=now --all && git gc --prune=now --aggressive

Passwords.txt is just a line delimited list of passwords. Just don’t commit this to your repo

The tool is available here on github

Changing DNS Servers with NetworkManager

I’ve never used network manager before, and right now I have a need to change the DNS settings on a system of mine that just so happens to be using it. Let’s look at the commands to change the DNS servers using network manager.

To modify the DNS server settings, we’ll want to call the network manager CLI modify connection and input the DNS settings we want to change. For the terminal, this becomes “nmcli con mod”. We then give it the connection name, “ipv4.dns” argument, and a list of the DNS servers to set. The full command can be seen below.

nmcli con mod $connectionName ipv4.dns "8.8.8.8 8.8.4.4"

connectionName can be found by command: nmcli con. In the question case, it will be "System eth0"as always, after configuration changes, restart the service

As always, after configuration changes, restart the service

service NetworkManager restart

Now we should have our new DNS servers active for our network configuration.

Resources

Vxworks 6.9 Ping

I’ve started working with VXWorks now a bit, so I feel like providing some information in working in that sort of system/environment. Some of these will be short docs and some will be more in depth. Here we’ll look at the ping command.

ping("host to ping", "number of packets to receive", "options flag")

Setting options greater than 1 for printing out ping information. The list of options flags are below.

  • PING_OPT_SILENT 0x1
    • Work silently
  • PING_OPT_DONTROUTE 0x2
    • Don’t route
  • PING_OPT_DEBUG 0x3
    • Print debugging messages
  • PING_OPT_NOHOST 0x4
    • Suppress just lookup

Converting 3MF files to STL

We’ll be using Microsoft 3D builder for this conversion. Its a simple use of the tool but it works out well. Just open your .3mf file in Microsoft 3D builder, and save it back out as an STL. I’ve found this to be the easiest way as its all free software provided by MS.

It’s no simpler than opening the file in 3d builder, clicking save as, and saving it out as a new file type.

Release info change

Just about every time I update my unifi commissioner installation, I run into an error from apt about the updated codename. I should probably remember the flag by now to get past this, but I never do. Hopefully this blog post will jog my memory next time. The error is related to the repository changing it’s codename to update the version number. An example is shown below.

Repository 'x' changed it's 'Codename' value from'x' to 'y'

This must be accepted explicitly before updates for this repair can be applied. See apt-secure(8) manpage for details.

Getting around it is easy enough if you remember the apt flag, –allow-releaseinfo-change, that’s all that’s needed.

apt-get update --allow-releaseinfo-change

Using Qemu Tools

While moving virtual machines from my unraid NAS to my new proxmox node way back when, I ended up needing to use a few of the qemu-img tools. This is a toolset for handling virtual disks used by kvm/qemu.

Conversions

Something I hadn’t realized while using unraid as my kvm host was that it wasn’t always using qcow2 format, which was my go to format, despite that the webui saying that the file format was qcow2. There were also a few virtual machines I made that ended up in different forms, so to handle these, I ended up having to convert the machines using the following commands.

The first command is to convert from a raw image to a qcow2 file.

qemu-img convert -f raw - O qcow2 /path/to/file.img

The second command is to convert from a qcow to a qcow2 file.

qemu-img convert -f qcow2 -O qcow2 /path/to/img.qcow

File Information

The other command I made use of was the info command from the qemu-img tool. This gives out useful file information for the file input to the command.

qemu-img info

These are just some useful, small commands in the qemu toolbox that can help significantly when working with the VM disk files directly.

Controlling Media Volume with  a Rotary Encoder from ESPHome

The NFC Decks that I design and build have rotary encoders onboard. I added them to eventually use in a whole home audio setup, and now that I have some squeezelite speakers to control, I finally have something to use that part of my design on. Let’s take a look at how to control media volume with the rotary encoders.

Continue reading “Controlling Media Volume with  a Rotary Encoder from ESPHome”