How to use hooks?

February 11th, 2010

Hooks are ways to customize your installation. They are scripts that you have to write, which will be called automatically when certain events occur.

The entry-point script HAS to be a “Windows DOS” script. But, within this first script you can call any software you like, may it be other scripts (Perl, PowerShell, etc.) or 3rd party software).

Notes:

  • Sample hooks are supplied with the software. You can start from them to build your own customizations.
  • Your customized hook files HAVE to be located in your \Data\<yoursource>\hooks\ folder to be found and lunched by the software.
  • If the software finds a hook with the right name at the right location, it launches it automatically. No need to enable anything special (except for the change-channel.cmd hook).
  • You can enable verbose logging of DVBLink for HDPVR to get additional hook debugging information in your output.log file.

Development Notes:

  • It is highly recommended to test/dry-run and debug your customized hooks manually. Just open a Command window and change the directory to your hooks location and call them from the Command Prompt.
  • To have a re-producible environment, your hooks should always start by changing the Current Directory to a known location. For instance, the supplied sample hooks set the Current Directory to the folder where the hook file is located (pushd %~dp0)
  • It is important not to stall the DVBLink thread that calls the hook for too long. The software implements an internal timer and will kill your script if it stalls for too long. Your software and or script may then be left in an undetermined state.

The hooks:

  • change-channel.cmd
    • This hook is used to customize your channel changing technique at your will.
    • The hook has to be enabled in the Source Properties, in the Blaster Configuration tab. If enable but not found, an error will be logged. If not enable, it will not be called.
    • The hook has 5 seconds to complete, after which it will be terminated.
    • The hook is called with the first parameter being the channel to switch to. The channel has no leading zeros, no enter key, no prefix key. The sub-channel separator digit is a dot (.). Examples:
      • change-channel 55.1
      • change-channel 700
      • change-channel 2
      • change-channel 1802
  • on-idle.cmd
    • This hook is called before entering idle mode and when exiting it.
    • The hook is called automatically if found.
    • The hook has 5 seconds to complete, after which it will be terminated.
    • The hook is called with the first parameter being either 0 or 1. 1 when entering idle mode. 0 when exiting idle mode. Examples:
      • on-idle 1
      • on-idle 0
  • on-standby.cmd
    • This hook is called before the computer is put in standby/sleep and when the computer resumes from standby/sleep.
    • The hook is called automatically if found.
    • The hook has 5 seconds to complete, after which it will be terminated.
    • The hook is called with the first parameter being either 0 or 1. 1 when entering standby. 0 when resuming. Examples:
      • on-standby 1
      • on-standby 0
  • on-device-error-power-cycle.cmd
    • This hook is called when the devices has crashed beyond recovery and needs to be power cycled. The hook triggering condition is VERY SPECIFIC; only a specific crash will fire this hook. You will not be able to reproduce the conditions manually to have it triggered, other than having the specific crash (issued ERRORABORT error messages in output.log)
    • The hook is called automatically if found.
    • The hook has 30 seconds to complete, after which it will be terminated.
    • No parameters are passed-on to this hook.

Where are my configuration and log files?

February 11th, 2010

Here is the summary of the various location used and where you can find your files

  • %ProgramFiles%\DVBLogic\DVBLink\Data\<yoursource>\Config.xml contains your configuration settings for the DVBLink source, and also for the MceIR blasting parameters.
  • %ProgramFiles%\DVBLogic\DVBLink\Data\<yoursource>\output.log contains the error and warning log messages.
  • %ProgramFiles%\DVBLogic\DVBLink\Data\<yoursource>\IR\*.IR is where are stored the learned IR code files. Your Config.xml file should point to these files.
  • %ProgramFiles%\DVBLogic\DVBLink\Data\<yoursource>\hooks\*.cmd is where are fetched the hook files.
  • %ProgramFiles%\DVBLogic\DVBLink\Sources\<yoursource>\ is where DVBLink runs the software for your specific source. This is where you would need to manually replace executable files when doing various testings with files downloaded from the forum.
  • %ProgramFiles%\DVBLogic\DVBLink\Templates\HDPVR\ is the installation folder of DVBLink for Hauppauge HDPVR software. When a source is created this folder is integrally copied into the \Sources\<yoursource> folder.
  • %ProgramFiles%\DVBLogic\DVBLink\Templates\HDDVR\ is the installation folder of DVBLink for AVerMedia USB HD DVR software. When a source is created this folder is integrally copied into the \Sources\<yoursource> folder.
  • %ProgramFiles%\DVBLogic\DVBLink\Templates\<product>\hooks\*.cmd is where templates and examples for the hooks are located.

DVBLink for HDPVR 2.0

February 11th, 2010

The long time promised “2.0 Release” is finally here. For those who followed with the 2.0 Beta versions, here is what has changed since 2.0 Beta 3:

  • Added a “Prefix Key” in MceIR so that you can now prefix all your channel changes with a custom key of your choosing.
  • Added a “Learn Timeout” parameter in MceIR. It is usefull for some set-top-boxes remotes which we fail to learn correctly with the default value.
  • Added a new parameter “AcquisitionLostManualPowerCycleTimeout” which allows you to control how long to wait before calling the on-device-error-power-cycle hook. Default value is 30000 (30 seconds). Aactually we retry once before calling the hook, so the total time is twice that. If you set it too short, you run the risk of power cycling your HD PVR needlessly.
  • Trial period is back to 30 days instead of 15 days. However, the trial counter is not reset.

For the others still using 1.0, here is a recap of the improvements between 1.0 and 2.0:

  • Full support for Multiple HD PVRs
  • Improved stability with a higher process priority AND an intermediary FIFO buffer between DirectShow and Media Center.
  • New built-in and easy to use line-up editor. That means you don’t need to use DVBLink Add-in anymore (within Media Center) to synchronize your line-up.
  • New improved installer. You only have a single installer to run and it will check UAC for you. The new installer also verifies that a compatible version of DVBLink is installed. You also won’t need to save your configuration manually anymore.
  • New hooks feature (change-channel, on-idle, on-standby, on-device-error-power-cycle). They allow you to customize your setup yourselves.
  • Fixed and improved MCE Compatible IR Blaster support (frequency detection, port selection and various options)
  • Added access to the Hauppauge HD PVR Encoder properties from within DVBLink for HDPVR (you don’t need to fiddle with graphbuilder or TME anymore)
  • Added support for sub-channel numbers (ex: 700.1 or 700-2)
  • Changed the hardware fingerprint to use the Ethernet MAC Address
  • Fix the registration dialog for all platforms.
  • Multiple UI/Configuration edition improvements.
  • Various logging improvements.

As an additional note, you should be aware of the following changes:

The upgrade from 1.0 to 2.0 is free. However, since this version now uses the Ethernet MAC address as the hardware fingerprint, 1.0 users will need to request a new activation key. Users using 2.0B2 and up do not require a new key and can use the same key used with the beta versions.

Due to the overall improvements, DVBLink for HDPVR 1.0 will no longer be available for download. All new installations should move to 2.0 and we also hope everyone still using 1.0 will progressively move to 2.0 as support for 1.0 will be more and more difficult to provide.

DownloadNow

How can I reset my installation? aka: The desperate guy guide

November 4th, 2009

Some times, things can get very bad when installing DVBLink for HDPVR. We know why: there are lots of instructions and missing a single one of them can result in an installation nightmare.

That is why we decided to write a desperate guy guide. This guide will let you reset your whole DVBLink for HDPVR installation without re-installing your OS. Try it and follow every single steps. Let us know in case one step fails you.

  1. Take a deep breath
  2. Take another one, just to make sure you’re calm enough to go through this complicated installation
  3. Stop Media Center
  4. Stop the dvblink service
  5. Using the Windows Task Manager, kill any “ehexthost.exe” that remains alive
  6. Delete your Media Center database
  7. In your registry, delete the key “HKEY_CURRENT_USER\Software\DVBLink for DigitalTuner” (if it exists)
  8. In your registry, delete the key “HKEY_CURRENT_USER\Software\DVBLink for HDPVR” (if it exists)
  9. In your registry, delete all keys under “HKEY_LOCAL_MACHINE\SOFTWARE\DVBLogic\DVBLink\Sources”
  10. In your registry, delete all keys under “HKEY_LOCAL_MACHINE\SOFTWARE\DVBLogic\DVBLink\Templates”
  11. Delete all folders in “C:\program files\dvblogic\dvblink\sources\”
  12. Delete all folders in “C:\program files\dvblogic\dvblink\templates\”
  13. Delete all folders in “C:\program files\dvblogic\dvblink\data\”
  14. Make sure your UAC is disabled (very important)
  15. Make sure you’re logged as an administrator (very important)
  16. Make sure all firewall software are disabled (very important)
  17. Download DVBLink for HDPVR
  18. Install DVBLinkServer.msi
  19. Reboot if required (very important)
  20. Install HDPVRBridgeSetup.exe
  21. Start Media Center
  22. Run TV Setup. Please follow “Configure TV Signals in Media Center” from the installation guide for this step.
  23. Open the DVBLink “Source Configuration” program
  24. Answer “Yes” when asked about stopping the DVBLink Server
  25. Click of “HDPVRBridge” source template (left pane) and then click the “green arrow” to create your source (call it “HDPVR1″ or any name you like)
  26. Select your new “HDPVR1″ source (right pane)
  27. Click the “Property” button
  28. Select a lineup from the window that pops up and click ok
  29. Wait until the Media Center channel synchronization (creation of new channels) is completed
  30. Go in Media Center and open the guide, you should see the channels for the lineup you selected (you wont be able to tune them yet!)
  31. Go back to the “HDPVR configuration dialog”, open the “HDPVR Setup” tab and configure your HDPVR’s input as they are physically (very important)
  32. If you’re using SPDIF, make sure there is signal in the cable (a red light) AND that the SPDIF cable is connected in the “IN” SPDIF jack on the HDPVR
  33. Use the “Test” button and tweak your HDPVR configuration until you get a successful test result
  34. Configure your IR using the “Blaster Configuration” tab (since I don’t know what method you use for blasting, we’ll skip that step for now)
  35. Close the “HDPVR configuration dialog”
  36. Close the DVBLink “Source Configuration” program
  37. Your HDPVR should start streaming (the red light and the cover’s blue lights turns on)
  38. Go to Media Center and tune a channel
  39. You should have audio and video (assuming that your IR blaster was configured properly)

Still having problems? Please post on the DVBLink for HDPVR forum.

DVBLink for HDPVR 2.0 Beta 3

November 2nd, 2009

That was fast… only two weeks after DVBLink for HDPVR Beta 2, here is DVBLink for HDPVR Beta 3 with the following changes:

  • Higher process priority (above normal)
  • Embedded DVBLink Server installer
  • Removal of faulty screen saver
  • Product version validation

The tests that were made using a higher process priority for the DVBLink service has resulted in a much improved reliability for many users. Also the “Fault Screen Saver” feature in 2.0 Beta 2 was not quite ready as it caused slow and failed channel changes. We recommend to everyone using a prior 2.0 Beta version to update to this version.

Since we have this new all-integrated installer, you will not have to worry anymore about deciding whether you need to re-install the DVBLink server or not. The installer will let you know what’s best depending on your situation. Also, there is no need to delete your HDPVRBridge sources or do backup of your current config.xml because the installer is made to handle upgrade scenarios very well (we use this functionality very often to deploy on our own HTPCs).

This beta version will most likely be the last beta release for DVBLink for HDPVR 2.0. At this point, we believe users still using DVBLink for HDPVR 1.0 should start using DVBLink for HDPVR 2.0.

DownloadNow

DVBLink for HDPVR 2.0 Beta 2

October 19th, 2009

dvblink4hdpvr-banner

After a much long wait, we are announcing DVBLink for HDPVR 2.0 Beta 2. While you wont see it, this version has seen its internals re-organized and re-written to help with maintenance and issues. The additional improvements are:

  • Added a “Stream Saver” feature to get rid of the infamous “No TV Signal” message. That is, if the HD PVR Streaming is lost, we feed a dummy stream that Media Center continues recording “unknowingly”. This way, if you have an “on-device-error-power-cycle” hook present, Media Center won’t abort your recording.
  • Added support for sub-channel numbers (ex: 700.1 or 700-1)
  • Much improved MCE Compatible IR support (fixed the frequency bug AND the port selection)
  • Improvements and bug fixes to line-up editor.
  • Added the ability to change the “set-top-box” number for your channels in your line-up.
  • Hardware fingerprint changed to use Ethernet MAC address.
  • Fixed the registration dialog for all platforms.

This version is for DVBLink for HDPVR experienced users that want to give a shot at the new features and for users experiencing issues with version 1.0.2.

Since this version now uses the Ethernet MAC address as the hardware fingerprint, you will need to request a new activation key. All future releases as well will move to this new hardware fingerprint method.

That means:

  • If you have a registration key for DVBLink for HDPVR, your registration key won’t be compatible with 2.0 Beta and 1.0, however you license will still be valid and you will be able to request a new registration key.
  • If you don’t have a registration key for DVBLink for HDPVR and you have installed the 30-days version, the trial counter will get reset with the 2.0 Beta 2 installation, for an additional 15 days.
  • If you buy a license using the 2.0 Beta 2, the registration key won’t be compatible with the 1.0.2 version, but it will be with the future 2.0 version. You however will be able to request a key for the 1.0.2 if you decide to use it instead of the 2.0.

DVBLogic is also working on an automated registration key generator that wont require human intervention. Keep tabs on it on DVBLogic website and forums.
DownloadNow

Why is my PC crashing when learning my remote control keys?

October 13th, 2009

When trying to learn a remote’s key, MceIr.exe (or MceIrLearner.exe) can sometime crash the PC (BSOD) or just causes strange error behavior.

The workaround: instead of pressing and holding the key to learn, press and release the key rapidly and repeat the operation slowly (once a second or two).

Why are my SD recordings file size the same as HD recordings

September 18th, 2009

Most Set-Top-boxes (STB) includes an option to up-convert any content to 1080i or 720p over component cables. Enabling this feature will make the STB always send HD content to the acquisition device, even for SD channels.

To change this behavior, verify your STB configuration using your STB user manual.

DVBLink for Hauppauge HD PVR

It’s possible to verify the output format of your STB using the HDPVR by following these steps:

  1. Open the Source Configuration dialog, but do not stop the server when asked
  2. Select your HDPVR source from the tree and click Properties to open the HDPVR Source properties dialog
  3. From the HDPVR Setup tab, click Device Properties

The Source Resolution field should display the resolution as received from the STB.

DVBLink for AVerMedia USB HD DVR

It’s possible to verify the output format of your STB by following these steps:

  1. Open the output.log of your source
  2. Look for a message “Detected Input Format”

How do I reset my Media Center database?

September 9th, 2009

Media Center keeps all its tuners, channels, recording, EPG and other information in a single database file. The good thing about this is that it’s fairly easy to reset Media Center to a nearly original state simply by removing this file.

To remove this file, follow these steps:

  • Boot Windows in Safe mode
  • Browse to the following folder C:\ProgramData\Microsoft\eHome
  • Rename the file mcepg1-X.db to mcepg1-X.backup.db
    Note: X is a random number
  • Boot Windows in Normal mode
  • Start Media Center

That’s it. You should now have to reconfigure Media Center as if you just installed Windows.

How can I isolate my HDPVR from other USB devices?

August 17th, 2009

The HDPVR is very sensitive to USB traffic coming from other devices. We have witnessed on many occasion HDPVR failures following the pressing a button from a remote control or a key from a USB keyboard. The best solution to this problem is to completely isolate the HDPVR from other USB devices.

It is important to understand that each physical USB controller provides two logical Host Controllers drivers:  a high speed USB 2.0 (enhanced) and one low speed USB 1.1 (standard). Typical motherboards have two physical USB controllers, thus leading to 4 logical Host Controllers (2 enhanced and 2 OpenHcd/Standard).

Because it is important to isolate the HDPVR on its own physical controller, the trick part is to find out which two Host Controllers (one enhanced and one OpenHcd) are on the same physical controller.

Note: In fact we have seen cases where a single physical controller was supplying four logical Host Controllers drivers: one USB 2.0 and three USB 1.1. And, the presence of 2 physical controllers on that system led to 8 Host Controllers to sort out.

Solution 1

Using UsbView.exe, which is provided with Microsoft DDK or that you can download from this FAQ.

  1. Connect the HDPVR on an USB port (any). Check which Host Controller it appears on.
  2. Disconnect the HDPVR and connect a mouse in the same USB Port. Check which Host Controller it appears on.
  3. These two logical Host Controllers are on the same physical USB Controller (device id).
  4. Continue with the other USB ports, until you find all the relationships between the Host Controllers
  5. Change the USB connections so that the HDPVR is alone on its physical USB controller

http://1geek1tool.com/wp-content/plugins/downloads-manager/img/icons/default.gif download: USBView.zip (33.23KB)
added: 21/08/2009
description: USB Device Viewer - From Windows DDK

Solution 2

Windows offers all the information needed to determine whether the HDPVR is isolated or not. To enumerate the devices sharing the HDPVR’s USB port, follow these instructions.

  1. Open the Device Manager (Control Panel -> Device Manager)
  2. Expand the Universal Serial Bus controllers node
  3. Locate the USB device id on which the HDPVR is located:
    1. Open the properties page of each Standard Enhanced PCI to USB Host Controller, Standard Universal PCI to USB Host Controller and Standard OpenHCD USB Host Controller
    2. Open the Advanced tab
    3. Find the HDPVR from the Bandwith-consuming devices list
    4. When the HDPVR is found, return to the General tab and write down the device id from the Location description.
  4. Open the properties page of each Standard Enhanced PCI to USB Host Controller, Standard Universal PCI to USB Host Controller and Standard OpenHCD USB Host Controller which have the same device id has the HDPVR’s.
  5. For each of these properties pages, open the Advanced tab and make sure that no other USB devices but the HDPVR is in the Bandwith-consuming devices list.
  6. If other devices are found, re-assign the other devices on other USB ports by physically moving them on your computer.

Note: There are some cases where you do not find the HDPVR listed anywhere. It doesn’t mean it is not there, only that it hasn’t registered bandwidth usage properly with Windows. You then need to find on which physical USB controller (device id) the HDPVR is connected to and make sure it is alone.

each physical controller on your motherboard provides two logical USB controllers: An OpenHCD (USB1.1) and an Enhanced (USB 2.0).

Typical Motherboards have 2 physical controllers, which leads to 4 logical controllers (2 OpenHCD and 2 Enhanced). The tricky thing then is to find out which two are physically on the same controller.