Modify scan_tuner.pl to limit scans

zaxcomtn

Active SatelliteGuys Member
Original poster
Sep 5, 2024
20
11
TN
Is there a way in scan_tuner to limit the range of UHF channels it scans for? My HDHR was designed before the UHF repack and when scan_tuner is running it keeps trying to tune channels that no longer exist. It would be great if we could limit the UHF range between 14-36.
 
Zax, I did this for my Raspberry Pi installation of Live Bandscan (basically a linux installation).

(0) Stop scan_tuner.pl if it's running.
(1) Grab the hdhomerun_channels.c file from the libhdhomerun directory at Bitbucket.
(2) Replace the hdhomerun_channels.c file in the libhdhomerun tgz file obtained from Silicondust (linux [HDHomeRun]) with the one you just grabbed from the BitBucket site.
(3) Copy the newly modified libhdhomerun tgz file (give it a new name) to your unix device and move it to the same directory where the original libhdhomerun tgz file is located.
(4) Switch to that directory and extract the contents of the new libhdhomerun tgz file (tar -xvzf etc.).
(5) Switch to the hdhomerun_config_gui directory and reinstall with these commands
./configure [don't forget to include the period at the beginning]
make [takes a while]
sudo make install
(6) Restart scan_tuner.pl

Again, I did this on my Raspberry Pi, so it may not be the same for all Unix-based installations. And I've left out some details, like how to group files into a .tar file and compress that into a .tgz file, and how to transfer files from the PC to the Pi. Step 5 corresponds to instruction #2 given on the hdhomerun linux page linked in my step 2 above.

Good luck with it. Let us know how you fare.
__
Neil
 
Zax, I did this for my Raspberry Pi installation of Live Bandscan (basically a linux installation).


__
Neil
Thanks for this. Unfortunately I know very little about linux and Pi's. I have scan_tuner running on a Pi but only because it was a simple installation following Rabbitears instructions. I had no idea changing the scanned channels was so involved. I wonder why SD still releases their software with those channels included. Channels above 36 have been out of use since the 2017.
 
Because those channels are still in use by other countries that use ATSC 1.0.

You can filter out the display of the extra channels in your mobile rabbitears page with Sort By: Logged RF Channels, if that is all that bugs you. It's not like the scan wastes much time on 38+. I find it interesting to see what T-Mobile is up to on those channels.

If you built your Pi system with all that configure, make and make install business, you should have all you need to do this yourself. Make a backup copy of the current hdhomerun_channels.c file and the hdhomerun_config executable, so you can roll back if needed. Edit the hdhomerun_channels.c file as described at AVSForum (i.e., delete line 99 with the channel 38-51 info), and repeat the configure and two make steps. I verified this all works on my Debian box.
 
If you built your Pi system with all that configure, make and make install business,
I actually did not do all the steps listed on the install guide. I realized that there were several unnecessary ones and I modified the process. I also found the install process for Mac was over the top and eliminated a bunch of un needed steps. Mac is my area of knowledge.
 
I have no idea if my Debian executable is compatible with your Pi, but here is a copy of hdhomerun_config (named hdhomerun_config36) that stops at RF36 since I have it handy. I'll delete this share after a few days. On my system it is in /usr/local/bin.


---

Some verification info:

ron@dx-debian:/usr/local/bin$ file hdhomerun_config36
hdhomerun_config36: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b4d2b7bab74524a65a9d302886709786c056a6eb, for GNU/Linux 3.2.0, stripped

ron@dx-debian:/usr/local/bin$ ls -l *36
-rwxr-xr-x 1 root root 96960 Sep 13 10:19 hdhomerun_config36

ron@dx-debian:/usr/local/bin$ sum hdhomerun_config36
08702 95
 
Unfortunately I know very little about linux and Pi's. I have scan_tuner running on a Pi but only because it was a simple installation following Rabbitears instructions.

I actually did not do all the steps listed on the install guide. I realized that there were several unnecessary ones and I modified the process.

Hahaha. When I first did it, I knew next to nothing about linux, so those instructions were much like Greek to me (no offense to any Greek readers out there :) ). You must've known something about linux if you were able to recognize unneeded steps in the instructions (I didn't). It was a huge learning curve to get mine working the first time. Google was my friend to teach myself how to do things and I took copious detailed notes on what I did to get it to work so I could replicate the process later. I've probably had to go through the process a dozen times now and do so with constant reference to my notes each time.

Perseverance pays off in the end.
_
Neil
 
  • Like
Reactions: FTA4PA
Hahaha. When I first did it, I knew next to nothing about linux, so those instructions were much like Greek to me (no offense to any Greek readers out there :) ). You must've known something about linux if you were able to recognize unneeded steps in the instructions (I didn't). It was a huge learning curve to get mine working the first time. Google was my friend to teach myself how to do things and I took copious detailed notes on what I did to get it to work so I could replicate the process later. I've probably had to go through the process a dozen times now and do so with constant reference to my notes each time.

Perseverance pays off in the end.
_
Neil
I knew enough about Perl on the Mac to know all the Brew steps were not needed. A small change to the scan_tuner.pl file made it work with Perl on the Mac. Going to Pi is an effort on my part to learn it since I had one lying around. The terminology is a bit different for me since I am used to bash scripts and Mac tools for compiling launch agents and daemons.
 
Oh well. It was worth a shot to try the Debian Linux build. I know more about CP/M than Mac and Pi. (Sounds delicious.)

I started here to set up my Live Bandscan laptop. I had to install some software development packages in addition what is on that page to get it all done.

 
So I decided to have a go at compiling this from the files listed above and I am almost there except when I run the ./configure commands it gets all the way to the end of the run and gives me this error.
 

Attachments

  • Screenshot 2024-09-13 at 2.58.53 PM.png
    Screenshot 2024-09-13 at 2.58.53 PM.png
    127.9 KB · Views: 10
All I can suggest is to make sure you are in the .../hdhomerun_config_gui directory that was created when you extracted those source .tgz files, when you run "./configure". The missing files -should- be found or created in the po and src directories below that.

Could also be a permission or ownership conflict of those files if they are indeed there and you may need to correct or run configure and make as root.
 
Download the zip file from this link and open it.

majortom / hdhomerun / Downloads — Bitbucket

Grab the file hdhomerun_channels.c in the libhdhomerun folder and set it aside.

Go to:
GitHub - Silicondust/libhdhomerun: Silicondust library and cli utility for controlling HDHomeRun tuners and click the green CODE button and download the zip file and open it.

Now replace the hdhomerun_channels.c file in the folder you just opened with the file you set aside earlier.

Move the libhdhomerun-master folder to the tmp directory.

Open a terminal window and navigate to /tmp/libhdhomerun-master

Run make
 
  • Like
Reactions: FTA4PA
Folks,

I started the process of updating the documentation for the Live Bandscan today. I moved the instructions off the main page and into separate pages for each operating system linked from the "Next Steps" page that I e-mail to people after they sign up. I'm about to have to run out for errands, but one of my goals for the weekend is to get at least some of these sets of steps updated. The instructions haven't been touched for 5 years, and weren't exactly freshly up to date as of that date either. (Note how they still talk about Windows XP separately.)

Zaxcomtn, I have your instructions you e-mailed me for the Mac and while I have yet to look at them, I intend to format them for use them on the site. I plan to deal with the Linux instructions myself. I have less familiarity with Windows, but will discuss with Russ and see if I need more input from there.

Is there anything else I should include? I know there's a lot of interest in cutting channels above 37. While I don't officially recommend or support that, it wouldn't be hard to include, I don't think. Thoughts?

- Trip
 
  • Like
Reactions: FTA4PA

More news on ATSC 3.0...