Bad Account Management

I have been getting my hair buzzed at various Rudys Barbershops around seattle for the past few years. They’ve had a web site that visitors can log into to make appointments.

It looks like they’ve updated the engine since I last logged in, and it’s not recognizing the password that I am pretty sure I last used. They have a password recovery link.


Well that’s not useful at all is it? How do you use email address as a unique key for the account and have multiple entries?


VLAN Tagging for CenturyLink

I’ve dealt with CenturyLink provided WiFi access points in two locations I’ve lived recently, and not been happy with their performance. My 5 year old Netgear WNDR3800 seemed to provide better speed with both 5GHz and 2.4GHz than the Actiontec C1900A provided by CenturyLink, which only supported 2.4GHz.

Unfortunately it was not as simple as learning the PPoE credentials that the Actiontec was using and putting those details into the Netgear. Centurylink in their infinite wisdom decided that the network packets need to be tagged to run on VLAN 201.

One solution would be to go out and buy a new WiFi router that supports VLAN Tagging. The newer Netgear Nighthawk routers support tagging, following the details at this support page.

The Netgear AC1900 router (also referred to as R7000) would do what I want, but would also cost close to $150.

Instead I spent $33 on a Netgear GS105Ev2 switch and spent a little time configuring its VLANs and am mostly happy with the result. My only disappointment is that this switch doesn’t seem to support SNMP for traffic monitoring.


I have this configured so that Port1 connects to the Centurylink Fiber Termination Box, Port2 connects to my WNDR3800 WAN Port, and Port3 is connected to one of the LAN ports on the WNDR3800.

Port1 is configured to send Tagged Packets on VLAN 201.
Port2 is configured to send Untagged Packets on VLAN 201.
Ports 3-5 are configured to sent Untagged Packets on VLAN 1, the default for this switch.

The steps to get this working, starting with existing setup of Actiontec connected to Fiber Termination box.

  1. Connect GS105Ev2 Port3 to available LAN port on Actiontec and make sure link connection LEDs appear.
  2. Find what IP address the GS105Ev2 acquired on local network using a network scanning tool. I used  NirSoft Wireless Network Watcher and found that my switch was on Going to gave me a login to the new switch with the default password of “password”. gs105ev2-login
  3. You should get a switch information page similar to this.gs105ev2-login-successful
  4. Select the menu item VLAN, then 802.1Q and the radio button Enable. You should get a warning message that it’s about to erase all current VLAN settings. Hit OK.gs105ev2-vlan1
  5. Go under Advanced, VLAN Configuration, there’s a text box on the right that says VLAN ID. Enter 201 and push the Add button above it. gs105ev2-vlan2Now we have a new VLAN with no Port Members assigned.gs105ev2-vlan3
  6. Go to Port PVID on the left menu. Select Port 1. Type 201 in the text box. Hit Apply.gs105ev2-vlan4Select Port 2. Type 201. Hit Apply.gs105ev2-vlan5
  7. Now we go to the VLAN Membership setting. With the VLAN ID dropdown showing 1, click Port 1 and Port 2 through the available options until neither T nor U is showing, leaving Ports 3, 4, and 5 showing U. Then click Apply.gs105ev2-vlan6
  8. Now drop down to select VLAN 201. Click so that Port 1 is T, Port 2 is U, Ports 3, 4, and 5 are blank, and Apply.gs105ev2-vlan7
  9. If you look at the VLAN Configuration, you’ll now see that ports 1 and 2 are assigned to 201, while 3, 4, and 5 are assigned to 1.gs105ev2-vlan8
  10. At this point the GS105Ev2 has been configured as much as it needs to be. I had already configured my WNDR3800 to connect to the ISP using PPoE and given it the correct credentials.
  11. Power off Actiontec and put it in a closet. Connect Fiber Termination device to port 1 on GS105Ev2. Connect WNDR3800 WAN to port 2 on GS105Ev2. Optionally connect port 3 on GS105Ev2 to a lan port on WNDR3800, as it will only gain you one extra gigabit port compared to the four built into the WNDR3800.

Thanks to this post for the same information that I’ve presented here. I’d attempted to do this before with an existing GS108Tv2 switch I had sitting around. What I’d forgotten to do was make the port going to the WNDR3800 send Untagged packets. I’d been properly sending tagged packets to the fiber, but the WNDR3800 didn’t know what to do with the tagged packets. After confirming it worked with the GS108Tv2 I ordered the cheaper 5 port switch just to have something else to play with. My only disappointment with the 5 port switch is that it doesn’t seem to support SNMP to monitor the traffic going over the network.

Odd Wildcard Matching in Windows 10

I recently ran into an odd behavior of more files matching a pattern than I expected. I’d used exiftool to modify the dates on files my GoPro produced. It creates backup files of the original images when it modifies the tags. Here’s the command I ran.

exiftool.exe -r "-AllDates+=4:7:6 17:40:00" -ext jpg f:\GoPro\20170807

Now I had about 4000 files with the .JPG extension and another 4000 files with a .JPG_original extension.

I ran my program that parses the directory structure and turns all those images into a time lapse movie, and it seemed to be including both the file extensions, making a very disjointed movie.

I loaded my source code in the debugger and it seemed to be doing a findfirst / findnext specifically looking for .JPG files, and not some other extension, but it was definitely retrieving files both with .JPG and .JPG_original extensions.

I then ran a couple of commands at the windows command prompt and was surprised to find the same results there.

dir F:\GoPro\20170807\372GOPRO\G*.JPG /p
dir F:\GoPro\20170807\372GOPRO\G???????.JPG /p

Each command returned both the JPG and JPG_original files.

dir F:\GoPro\20170807\372GOPRO\G*.JPG_original /p

returned just the JPG_original files.

dir F:\GoPro\20170807\372GOPRO\G??????.JPG /p

had one less question mark and correctly returned no files.

This is all unexpected behavior, though I’m glad to see that it was consistent with the operating system and not something specific to the C runtime. I’d love an explanation of what’s going on.


exiftool to manage DJI media files

DJI Drones don’t seem to remember the image count between formats of a media card. This creates a problem for me when I’m trying to backup and maintain my images and video.

Because the dates are all correct in the media files, retrieved from GPS data, organizing the files by naming them based on the date works for me.

Using ExifTool by Phil Harvey is a great solution for pulling the metadata from the files and renaming the files.

The command line that I was initially using is:

exiftool "-FileName<${CreateDate}.$filetype" -d %Y%m%d-%H%M%S%%-c -ext mp4 -ext dng -ext jpg dji*

It’s problem is that it orphans the SRT subtitle files from my videos that I’d like to keep matching the video files.

I’ve tried this variation to do it in one step but it doesn’t work, because the SRT files get renamed as MP4 files.

exiftool -verbose "-FileName<${CreateDate}" -d %Y%m%d-%H%M%S%%-c.%%le -ext mp4 -ext dng -ext jpg dji* -srcfile

If anyone has a suggestion for how to rename all the media files in one directory I’d appreciate it. Even running two commands in sequence would be fine.


I’ve figured out that running these two commands in sequence will get me the results I am looking for:

exiftool "-FileName<${CreateDate}" -d -ext mp4 -srcfile dji*
exiftool "-FileName<${CreateDate}" -d %Y%m%d-%H%M%S%%-c.%%le -ext mp4 -ext dng -ext jpg dji*

I’m still looking for a way of doing it in a single command that may leave less room for error, but this is working for now.


FFMPEG and drawtext

Several years ago I wrote a program that consolidates time-lapse pictures into a directory and calls FFMPEG to create a video.

I had been wanting the time-code from when each picture was taken printed on the screen while the video was playing but had not figured out how to get it done until this weekend.

Video TimeCode

Frame from video showing the DateTimeOriginal timecode embedded.

I’d gone down multiple paths in an attempt to get this result before finally getting the drawtext feature to work. My program manually pulled the metadata from the images before feeding them to ffmpg. I’d tried creating both text files and image files for overlaying. none of those got the result that I was looking for.

When I finally got everything working, it seems simple, but the underlying problem has to do with the amount of string escaping required to get the command to work.

Here’s an example command I was issuing to ffmpeg that got the result I was looking for.

ffmpeg.exe -hide_banner -r 30 -i Wim%05d.JPG -vf crop=in_w:3/4*in_h,drawtext=fontfile=C\\:/WINDOWS/Fonts/OCRAEXT.ttf:fontcolor=white:fontsize=160:y=main_h-text_h-50:x=main_w-text_w-50:text=WimsWorld,drawtext=fontfile=C\\:/WINDOWS/Fonts/OCRAEXT.ttf:fontcolor=white:fontsize=160:y=main_h-text_h-50:x=50:text=%{metadata\\:DateTimeOriginal} -s 3840x2160 -pix_fmt yuv420p -n Test-2160p30-cropped.mp4

If you look at the -vf option parameter, I’m cropping my input pictures to 3/4 their original height, then using the drawtext feature twice. First I write the static text to the bottom right of the frame, then I extract metadata from the source image and write it to the bottom left of the frame.

Because I’m calling this from a program, I had extra escaping of the \ character in my code. All of the escaping required a lot of trial and error to get things working. I’m using OCRAEXT as my font, but I could be using any fixed spacing font. because of the fact that the time is changing every frame, it’s important that the font not be proportional to make it easy to read.


85% Processor Usage while idle

My Microsoft Surface Pro 4 has recently started showing high CPU usage even while I’ve got nothing running in the foreground.

It’s annoying because I’m used to the idea of lower CPU usage being related to extended battery life, and if the CPU is being used by an unnecessary program, I’ll stop using that program.

2016-05-15 (1)

The other interesting thing is that Microsoft Edge is showing as a significant user of both CPU and Memory. I’ve not yet launched Microsoft Edge since I told the operating system to restart.

Is this some placeholder in the Task Manager?

If I run the Sysinternals Process Explorer side by side, it shows the machine being very lightly used, which is closer to what I expect to see from task manager. If I want real information on what’s going on with my computer I’m more likely to use the Sysinternals tool, but the task manager is already installed on all windows machines, and has some simple graphs to look at, including watching network traffic.

2016-05-15 (2)


Flashing ESCs on Hobbylord BumbleBee

I bought a Bumblebee Quad from a local hobby shop a few months ago, and when I finally got around to trying to build it with a proper autopilot found that it’s ESCs used a protocol called UltraPWM that is a very uncommon protocol.

I came across this page, , which leads me to believe that I should be able to flash the ESCs with a simonk tgy firmware and use the hardware I already have.

I came across a cable from hobbyking that is designed to make contact with the surface mounted atmel device and allow programming without any soldering or desoldering. It was designed to be used with an atmel programming device that they also sell and so I thought I’d be good to go. The cable cost $20 while the programmer cost $4, but not needing to solder anything was a very positive solution for me.

USBasp AVR Programming Device for ATMEL proccessors

USBasp AVR Programming Device

Atmel Atmega Socket Firmware Flashing Tool

Atmel Atmega Socket Firmware Flashing Tool

What I didn’t recognize until it all arrived was that Hobbyking has updated the USB Programmer to use a 6 conductor connector, but not updated their programming cable from the 10 conductor cable. The message boards on hobbyking discuss the change, and have pinout descriptions, but it’s been very frustrating because getting the parts to do the correct wiring has not been as simple as plug and play.

Atmega contact points

Atmega contact points

Atmega contact points

Atmega contact points

Cable Pinout Description

Cable Pinout Description

This has been extremely frustrating to me as the parts I ordered were billed as no soldering required, but could not be simply plugged into each other.