/ music / gaming / over-the-air tv « / nutrition -


dtv dx log  /  ota setup  /  antenna simulations  /  utilities
These are some utilities I use to keep my ota setup running smoothly on Windows 10.

hdhomerun_config.exe channel ranges
These are multiple versions of hdhomerun_config with different channel ranges for use with the scan_tuner.exe autologger. Just replace the original hdhomerun_config with one of these for your desired channel range.

hdhomerun_config---24.exe -- RF2-4 (vhf-lo)
hdhomerun_config---26.exe -- RF2-6 (vhf-lo)
hdhomerun_config---236.exe -- RF2-36 (vhf-lo / vhf-hi / uhf)
hdhomerun_config---736.exe -- RF7-36 (vhf-hi / uhf)
hdhomerun_config---1436.exe -- RF14-36 (uhf)

Download on Google Drive

scan_tuner.exe parameters
These are the command line parameters I use for the scan_tuner.exe autologger.

scan_tuner.exe -p C:\TVCHAN~1\bin\hdhomerun_config---26.exe -x FFFFFFFF -t /tuner0/ -d >>%DATE%_FFFFFFFF.txt
These parameters run scan_tuner.exe with hdhomerun_config---1436.exe (uhf channel range) on the HDHomerun with ID# FFFFFFFF on tuner 0 with debugging information exported to a text file. The double arrow >> appends the text file with new scan data instead of overwriting, and %DATE% adds the date to the filename (note that your exported text file must be outside \Program Files). Exporting to a text file is helpful if you want a log of the HDHomerun's raw scanning data. Sometimes the autologger won't pick up a channel that does in fact appear in the raw scans, this could be due to various reasons like the channel isn't in the database, it's using the wrong TSID or other settings, there was an internet error, etc. Having a copy of that raw scanning data has helped me a couple times with picking up new channels, just make sure to restart your autologger every few days so the exported log doesn't get too big in size.

An easy way to look through your exported logs for new channels is with AkelPad, a small and fast text editor that's much faster with big files than notepad++. Install AkelPad, open your log file (or a backup of it, don't save over your original!), go to 'Options > Plugins', double click 'Format::LineRemoveDuplicates' to remove duplicate lines, go back to 'Options > Plugins', double click 'Format::LineSortStrAsc' to sort lines by string. Now you can scroll to the section of the file where you see 'PROGRAM' that shows the virtual channel numbers and callsigns, or you can scroll to the list of 'TSID's.

Sometimes an HDHomerun's tuner will become unresponsive and you will see in hdhomerun_config or hdhomerun_config_gui that the tuner is stuck on channel zero or "none". When this happens, the HDHomerun will need to be restarted. Thankfully there is a restart command, and this batch script will automatically restart an HDHomerun when the specified tuner is on channel zero or "none" (note that the exported text files must be outside \Program Files).

@title freeze checker
@echo %DATE% %TIME%

@timeout 600 >nul
@goto check

@"C:\dir\hdhomerun_config.exe" FFFFFFFF get /tuner0/channel >"C:\dir\tmp.txt"
@set /p freeze=<"C:\dir\tmp.txt"
@if "%freeze%"=="none" goto reboot
@goto wait

@"C:\dir\hdhomerun_config.exe" FFFFFFFF set /sys/restart self
@echo ...rebooting FFFFFFFF... %DATE% %TIME%
@goto wait

-- The ':wait' label waits for 600 seconds (10 minutes) then goes to the ':check' label.

-- The ':check' label calls hdhomerun_config to get the channel number on tuner 0 of HDHomerun ID# FFFFFFFF and exports it to tmp.txt. Then it sets the variable 'freeze' to equal what was exported to tmp.txt. Then it checks if 'freeze' is equal to "none" (a frozen or inactive tuner) and goes to the ':reboot' label, otherwise the tuner is still active and loops back to the ':wait' label.

-- The ':reboot' label restarts the HDHomerun ID# FFFFFFFF and loops back to the ':wait' label.

My remote antenna cluster runs completely on its own with automatic batch scripts and remote desktop software for emergencies. Along with the above utilities, I also run this batch script to create new raw scanning logs every few days.

@title taskkiller
@timeout 60 >nul

@echo %DATE% %TIME%
@start cmd /c "FFFFFFFF.bat"
@timeout 5 >nul
@goto wait

@timeout 86400 >nul
@echo %DATE% %TIME%
@timeout 86400 >nul
@echo %DATE% %TIME%
@timeout 86400 >nul
@echo %DATE% %TIME%
@timeout 86400 >nul
@echo %DATE% %TIME%
@timeout 86400 >nul
@goto kill

@timeout 60 >nul
@goto respawn

-- The ':respawn' label calls the FFFFFFFF batch script that contains parameters for the scan_tuner.exe autologger (as described earlier on this page), then goes to the ':wait' label.

-- The ':wait' label waits 86400 seconds (1 day) times five (5 days) then goes to the ':kill' label.

-- The ':kill' label closes the FFFFFFFF batch script then loops back to the ':respawn' label.

My remote antenna cluster connects to HDHomeruns that connect to a dedicated offline network that a computer connects to over wifi. The computer is also connected to a separate online network over ethernet for internet access. Being connected to two different networks over wifi and ethernet normally isn't a problem, until you lose the wifi connection. Ethernet takes priority and so the wifi won't automatically reconnect if ethernet is connected, even if the wifi network is set to 'connect automatically'. So I use this batch script to check the wifi connection and automatically reconnect if it needs to.

@title wifi connect
@echo %DATE% %TIME%

@timeout 300>nul
@netsh wlan show interfaces >"C:\dir\wifi.txt"
@findstr "connected" "C:\dir\wifi.txt" >"C:\dir\wifi2.txt"
@set /p connect=<"C:\dir\wifi2.txt"
@if "%connect%"==": connected" goto wait
@goto wificonnect

@netsh wlan connect ssid=antennas name=antennas
@echo %DATE% %TIME%
@goto wait

-- The ':wait' label waits 300 seconds (5 minutes) then calls 'netsh wlan' to show the status of the wifi network and exports it to wifi.txt. Then it calls 'findstr' to find the string "connected" in wifi.txt and exports the line 'State : connected' or 'State : disconnected' to wifi2.txt. Then it sets the variable 'connect' to equal what was exported to wifi2.txt. Then it checks if 'connect' is equal to ": connected" (instead of ": disconnected") and loops back to the ':wait' label, otherwise the wifi is disconnected and it goes to the ':wificonnect' label.

-- The ':wificonnect' label calls 'netsh wlan' to connect to the wifi network named "antennas" then loops back to the ':wait' label.

Back to top