[tunefix] Automatic channel organisation and maintenance


Well-Known Member
Tunefix is a new package which is designed to fix up the channel list following a retune. It can:
  • remove channels by name that you don't want - this is what the channeldel package currently does
  • remove channels by LCN (logical channel number) that don't work/cause problems e.g. IP channels usually in the 211-299 range
  • automatically resolve duplicate regions/channels and select your preferred region for when the Humax software gets it wrong
  • force specific channels to the LCNs you choose - this is what the renumber package currently does
  • remove an entire mux. by RF channel number
It can also (without a retune):
  • add new channels when added by the broadcasters
  • move existing channels to new LCNs when changed by the broadcasters
The initial configuration is created when you install the package, based on information extracted from your currently tuned channels, and you should review the Settings for tunefix in the relevant page on the web interface to make sure it is going to do what you want.
Existing configuration data from the channeldel package is also automatically imported to tunefix at this time.

Changes to the tuning database are only applied during system startup.

If a Preferred Region is set, any LCNs which do NOT belong to the specified region are deleted. Any remaining LCNs above 799 are remapped to those from corresponding service names below 800 from the ones being deleted.

If you are in an area which receives multiple regions, there will be some service names which don't match and can't be resolved in this way. This is one reason why the "force" settings exist. (The problem is worse if you span England/Wales, like me, rather than just two English Regions - in case people in the latter might be wondering why there are so many apparently redundant entries.)

Please bear in mind that nothing is perfect regarding tuning. There will almost certainly be cases where the Preferred Region setting goes wrong - it should be better than what the standard Humax offering does in the vast majority of cases though.
Setting an incorrect Preferred Region (i.e. one which doesn't exist in your tuning database at all) should not result in all services being deleted - it will just be ignored.

Thanks are due to af123 for some excellent work on the web interface settings page. I just wrote the back-end processing bit.

Further notes on the format of the configuration file.
Last edited:
You might as well, yes. It causes no problems but it might be confusing having two (potentially different) lots of configuration data.

The old config. doesn't get removed automatically, so you may wish to remove the file /mod/boot/chandel.conf manually.

Edit: The old chandel config. file does now get removed automatically.
Last edited:
For anyone who cares, I added "170-199" to the list of LCNs to delete and just put these in the list of names to delete:
Al Jazeera Arabic
Create & Craft
Food Network
Gems TV
Ideal World
Jewellery Maker
Rocks & Co 1
The Store
This is a lot more manageable than the seemingly endless list of guff to maintain with channeldel.
Last edited:
Depends what you are trying to achieve. If you want the existing data imported into tunefix then no, otherwise yes. But you can always delete what was imported anyway - it's probably worth reviewing regardless, as a lot of it will be redundant due to defunct services and if you delete the 201-299 channels by LCN instead of name.
Right then. I have to retetune a couple of MPXs anyway due to mistakenly deleting a couple of LCNs with channeldel. So I'll backup my recording shedule, remove channeldel and its data file, install tunefix with default then do a full retune to see what happens. I don't usually get duff LCNs because I disconnect the aerial once it has tuned CH30 (highest MPX on Hastings) so that I don't get any duplicates from Heathfield. Unless you want me to let it run to see what happens. Please advise.
It would be nice to see what happens if left to its own devices, but I believe Heathfield and Hastings are in the same region anyway - this is not something that tunefix has any influence on.
Could you grab me a copy of the tuning database (/var/lib/humaxtv/channel.db) from after the retune (but before reboot if poss.) and after a reboot.
Do you have auto-schedule-restore installed?
OK I'll let it run then.
Do you have auto-schedule-restore installed?
No. I'll do that now.
How do I get at the file you want. I can see my T2 on my network in file explorer but it only lists the user folders (Media etc)? And I've not used telnet or whatever to access it before so haven't a clue. I'm using W8.1, is telnet native?If so, how do you enable it? I've been into the depths of the T2 filing system before but can't remember how I did it. I'm sure that I was just using Win file explorer though because at the time I was wondering why people were poking about with telnet.

OK. Got telnet up and running but you'll have to hold my hand from here.
It's not at all convenient from Telnet. You would be better using Windows Explorer or FTP. Alternatively, it can be done from the hidden service menu to a UPD using the "copy DB to USB" option (that copies all the .db files out). Telnet is about accessing the Humax's OS command line rather than transferring files externally.

For information, "copy USB to DB" copies the other way, but only the files that are properly named and in the root directory of the UPD (and not always then either, it seems). Thus one can (supposedly) update the channel.db file by putting a replacement channel.db on the UPD and copying it in, then rebooting so it takes effect. It helps if the UPD has an access LED so you can see when it's being read.
Thanks for that BH. I know I used W E before but don't seem to be able to get to the root of my T2. How do I do that?
You need samba installed. You are probably just accessing the DLNA service at the moment.

To use FTP you need betaftpd installed and the native FTP server turned off.
Last edited:
Belay that. I don't seem to be able to access anything outside the media tree either. Maybe the SMB share has been altered*, or it never did in the first place.

Install betaftpd and use FTP.

* Update: I seem to recall the .conf file for the SMB share was doctored, and I suspect it is possible to add something to it so that the root becomes accessible, but don't ask me what.
Last edited:
is that as in betaftpd?
How do I get a file listing using FTP?
How do I turn the native FTP off?

"The FTP server at FTP:\\ requires username and password". I have not knowingly set one.
Last edited:
is that as in betaftpd?
Yes. Mis-remembered on my part (now corrected in the previous posts).
How do I get a file listing using FTP?
You need an FTP client. My file manager has FTP built in, but if you don't have one there are plenty available. See my Trail Guide (click), Stage 1.1. If you are using a non-GUI client that just provides a command line, you will need to know the FTP command set such as "ls" for list and "cp" for copy (having opened a connection to the remote device in the first place), but it is much easier to use a graphical interface. Get FTPCommander or Filezilla.
How do I turn the native FTP off?
Menu >> Settings >> System >> Internet Setting >> FTP Server = Off
Last edited:
It's a shame the database browser and file editor in the WebIF diagnostics page don't provide a file export/import option. If they did, we could do practically everything without reaching for FTP, and if there was a WebIF command console we wouldn't need Telnet either!

Update: with the webshell package we now have a command console, but as far as I know still no import/export function.
Last edited:
"The FTP server at FTP:\\ requires username and password". I have not knowingly set one.
See the trail guide. It walks you through it.

By now you are wishing you had used the hidden service menu export option.
Downloaded FTP Commander. Connected to T2. Still the same. Only My Music, My Photo and My Video. Presumably you have to setup the server on the T2 to point to the root of the drive? How?
By now you are wishing you had used the hidden service menu export option.
bloody yes. Trouble is now HWMBO has commendeered the TV so I can't screw around with the T2 from there.

FTP from W explorer goes to the same place. Boo Hoo

Still, a crash course in FTP did nobody no harm. Or did it? :)
Last edited:
Downloaded FTP Commander. Connected to T2. Still the same. Only My Music, My Photo and My Video. Presumably you have to setup the server on the T" to point to the root of the drive? How?
Log in to FTP as the 'root' user (without the quotes) and you should see the entire filesystem. Log in as HumaxFTP and you just see the media.