Posts

ESP-01 WiFi Credential Manager

Image
  ESP-01 WiFi Credential Manager If you've played with an ESP-01(s), you know they can be a huge pain! Pull this pin to low on boot to start in programming mode. Pull that pin high on boot to run the installed sketch. Seriously, if you simply give this device power, it neither runs the installed sketch nor allows flashing a new sketch. Oh, and if you have a different version of the ESP-01, there may be other quirks. But if you have the patience to work through all of the quirks surrounding this device, it can be a lot of fun though! So the big deal here is the WiFi capability. You can put this little guy on a network and spin up a web server so that you can interface with other devices. All that in something with a footprint smaller than a half-dollar. For my first project, I made a pollution sensor, and I used the ESP-01 to serve measurements over the network. It was pretty cool, but I had the WiFi credentials hard-coded in my Arduino sketch which meant that changing any WiFi sett

Flashing TL-WR703N firmware directly to the flash chip

Image
I have already posted a couple times about the TL-WR703N travel router including information about how to flash this router via the serial interface. Today, I am posting yet another method for flashing this router. Here is what you'll need if you're following the same process I took. Prerequisites A Linux system with flashrom installed (I used Ubuntu) A SOIC8 SOP8 Flash Clip A flash programmer Custom firmware to install on the TL-WR703N (OpenWrt, DD-WRT, PirateBox, ...) If purchasing on Amazon, look around. At the time that I performed my search there was a bundled clip and flash programmer available for about $10 . The Method This approach to flashing custom firmware is much simpler than using the serial interface, though it is not without its challenges. On any given router, the flash chip contains more than just firmware. At the very least, a boot partition and a partition for saving user configurations will also exist as well as other identifying information

Parsing bash arguments

If you've ever programmed in bash, then you know that command line arguments are accessed numerically with $1 being the first argument, $2 the second, and so on.For years I've written scripts and just accessed the arguments by their position. This means that if I want to skip an argument, I have to pass an empty string. It also means I must not mix up the order of the arguments I pass! I can finally put those days behind me if I so choose and use switches! A search online, reveals that the question of how to do this is not new and has been answered many times over , but I wanted to abstract the argument parsing code and get it out of my scripts. As I got my first version working, I found that someone else had already done this , but even that code didn't work exactly like I wanted mine too, so I kept working because there's one key bit that everyone seems to ignore. We should be able to use switches with the functions contained in our scripts too! My Goals  I wan

Getting mplayer status from a bash script

Have you ever wanted to query mplayer for playback information? How does one go about querying mplayer for things like the time elapsed, pause state, volume level, mute state and more? If you just want my script sans-details of how it came about, click here . I'm currently working on a project that is basically a modern-day version of those old read-along audiobooks, the kind where you listen to a cassette/CD while you look at the book, turning the page whenever you hear a chime. When (if) I get it all put together, it will get its own dedicated post, but for now, let me just describe my mplayer dilemma and fix. I decided pretty early on that I did not want to hard-code the chime sound for page turns into the audio files. There are two reasons for this. First of all, I want to be able to change out the chime sound, and second, I want to be able to control the volume of the chime sound independently from the audiobook so that chimes can be completely muted if desired. This means

Encrypted Ubuntu Installation with "Manual" Partitioning

If you've ever installed a recent version of Ubuntu, you'll know that there is an option for Full-Disk Encryption (FDE) shortly after you begin the installation process. However, if you want to manually partition things (like I do), then you're out of luck! The Ubiquity installer does not support FDE and manual partitioning. That being said, you can still do it. I could be wrong, but I believe I was the first person to document the exact process . I was wrong. I've since found at least two other posts that document this process and predate my initial documentation considerably. If you follow that link and check out my answer, you'll see I note that the process of setting up FDE with LVM is not for novice users. Today I take that back! In this post I present what I call the LGMP (LUKS guided manual partitioning) installation script. I set up different systems from time to time, and it was annoying having to go through the system prep and finalization steps manual

Turning a USB printer into a network accessible device

Raspberry Pis are fun. You can do a lot of cool things with them. For that matter, there are some really lame educational albeit non-utilitarian projects out there. To be fair, this project doesn't really require a Raspberry Pi, but the small form factor of the Raspberry Pi makes it ideal. I chose to use a Raspberry Pi Zero W. So what's the project? Turn an all-in-one printer/scanner into a network accessible device. I should make it clear that I run Linux OSs. As such part of what I have written here probably won't apply directly to the Windows crowd. How does it work? The approach here is twofold. The printer can be shared with CUPS from the PiZeroW, so that part is rather trival. Sharing the scanner over the network is the less trivial part, though not horribly complicated. To accomplish this, I used usbip which provides a way to share a USB device over an IP network. Hosting a USB devices with the usbip server introduces a new problem. When usbip is hosting the d

U-PATCH -- A mechanism for distributing patches in Ubuntu

In my job, I manage a number of Ubuntu Linux systems that are networked. Most of these systems are desktop systems, intended to be used by faculty. Some systems are in offices and others in classrooms. As you can imagine, there are times when changes to these systems need to be made. I don't have an Ubuntu for Enterprise subscription and the enterprise-wide support and management tools that come with it, so I often find myself creating my own management tools. In this post, I'll be covering one such tool that I've created, and I'll be sharing the code that I've written. I've dubbed this tool Ur Patches Applied To Computers Herewith, or U-PATCH for short. U-PATCH So what does one do when managing multiple Ubuntu Linux systems on a single network with the need to be able to install new software, remove old software, change settings, or perform general maintenance on all of these systems? One option is to visit each system one-by-one, in person or over the netw