-Version Beta 0.1.0.0 : June 23, 2009 Initial Beta Test release.
Please note that this version is a beta test release, which is not intended to end-users. This version has not been thoroughly tested and so, one can expect any kind of bugs and troubles ...
Purpose of this version is to test this plugin by people who accept to do so. Please report bugs or successful tests with a maximum of pieces of information concerning your configuration and your troubles.
Just put Hadu.dll and Hadu.ini into the directory affected to plugins, regarding your current DVB software. It can be the directory of the software (i.e. for old versions of ProgDVB), or a given subdirectory (i.e. ./Plugins for MyTheater and Alt-DVB, ...).
As it is compatible with the DVBCore API, use it as a DVBCore plugin (for DVBCore softwares) instead of using it with MDWrapper. With DVBViewer, use it as DVBViewer plugin instead of using it with SoftCSA.
Don't use two or more CardSharing Clients and/or SoftCam Emulators at the same time (like Yankse, S2Emu or VPlug), unless you know perfectly what you are doing.
Directories of installation for the main DVB softwares:
Put all the files (i.e. only Hadu.dll + Hadu.ini currently) in the same directory , as indicated hereafter:
-ProgDVB : main directory of the DVB software (or /Plugins subdirectory for version 4.38 or later of ProgDVB)
-Alt-DVB : /Plugins (or /Plugins/av0) subdirectory, and/or /Plugins/pip subdirectory for the pip, and others (/Plugins/av1 to Plugins/av2
-MyTheater, RitzDVB: /Plugins subdirectory (to use Hadu as a DVBCore plugin). Try to avoid the solution MDWrapper.dll in /Plugins subdirectory and Hadu in /MDPlugins subdirectory (MDWrapper is a workaround to make old MD plugins working with MyTheater and other DVBCore softwares)
-DVBDream 0.xx: /Modules subdirectory since version 0.85 (to use Hadu as a DVBCore plugin). /Plugins subdirectory (to use Hadu as a MD plugin) for precedent versions
-DVBDream 1.xx and above : /Plugins/pip00 and others (/Plugins/pip01 up to /Plugins/pip19) subdirectories, to use Hadu as a MD plugin
-WatchTVPro: /Plugins subdirectory (Hadu is using the TT Trick automatically if it is possible)
-HispaDVB: main directory of the DVB software for old versions, and /Plugins subdirectory since version 2. Hadu is no more using the TT Trick automatically for this software, because it is no more needed for HispaDVB version 2 and above
-MultiDec: main directory of the DVB software (Hadu supports natively the different versions of the SS1 firmware)
-DVBViewer: /Plugins subdirectory. Avoid the solution SoftCSA.dll in /Plugins subdirectory and Hadu in /MDPlugins subdirectory. Please, note that the CSA.dll (coming with the SoftCSA package coded by Pikachu) is recommended for faster unscrambling, though not absolutely mandatory. The CSA.dll must be located into the /Plugins subdirectory (or KeyPath2) or into the main directory of the DVB software. Otherwise, Hadu will use its own internal CSA algorithm (code kindly provided by courtesy of Pikachu. Thanks!). With DVBViewer version 3.4 and above, you can also use the FFDeCSA.dll (both with the CSA.dll) : depending of your DVB card, the 'Open whole Transponder' Hardware option in DVBViewer will have to be checked or not, to optimize the video/audio CSA unscrambling treatment.
The 'Has CI module' entry option into the hardware options of DVBViewer must be checked.
It is also possible to use Hadu with the recording service of DVBViewer, if you install first the Wrapper for recording service of Pikachu. Caution : currently, this option might lead to unstable behaviors of DVBViewer (especially when closing this software).
-SkyView: /MDPlugins subdirectory
-DvbTn: /Plugins subdirectory (to use Hadu as a DVBCore plugin)
-WinSTB: /MDPlugins subdirectory
-DiavloB: /Plugins subdirectory (to use Hadu as a MD plugin, though the software is based upon the DVBCore SDK)
-MajorDVB: /Plugins subdirectory
-TSReader: /MDPlugins subdirectory
-WinClip: /Plugins subdirectory
Caution: For DVB softwares based on the DVBCore SDK, don't install Hadu as a MD plugin and as a DVBCore plugin (choose either the first or the second solution, but not both !). Same thing for DVBViewer.
Do not use the DLL TTTrick.dll: Hadu has its own TT Trick implemented.
Other Files used :
-Active: If checked, the plugin will use the incoming ECMs to try to decode the current encrypted channel (i.e. by sending the ECMs and requesting the needed DCWs to the server(s)). Furthermore, connections with servers will only start if the plugin is active.
-Use PSI Tables: If checked, the plugin will analyze the PMT (for the list of ECMs) and the CAT (for the list of EMMs). If not checked, it will take data obtained from the DVB software. It "costs" a little more time to begin the decoding when you change of a channel, but it is strongly advised to use this option for better results. Data given by DVB softwares are often incomplete, erroneous and are not continuously updated.
-Monitor ...: Display the Monitor window to see the current analysis work and results.
-Log Messages: You can log the main actions and the incoming/outgoing messages with the servers.The log files are stored, either in the KeyPath2 directory if used, or in the directory of Hadu. Note that this option may have a negative impact on the response time.
-About...: Not much to say about it: version of the plugin and kind of DVB-API can be found here. You can also find some infos for special DVB softwares (i.e. "- TT xxxxxx" if the TT Trick is currently used, and "- MDROOT xxxxxx" for MultiDec).
In the Hadu.ini file (same location as the plugin), you can find the following options (values in brace  are default values) :
-PluginActive ( or 0) : Same as "Active" option in the main menu.
-KeyPath2: Files loaded and written by the plugin are stored in KeyPath2. If KeyPath2 is not used, only the directory of the plugin is used for loading and writing files.
-UsePSITables ( or 0) : Same as "Use PSI Tables" option in the main menu. This flag is conditional for some other options.
-SurveyPMT ( or 0) : Flag to indicate the plugin to "survey" the changes in the PMT. Only active if UsePSITables option is active. Its main use is to detect when a given channel change : non encrypted (for advertisements) to encrypted (in many pay-session channels for instance).
-UsePATforPMT (1,2 or ) : Flag to indicate the plugin to obtain the PMT directly from the PAT and not from the DVB software. Only active if UsePSITables option is active. Necessary if PMT data given by the DVB software is erroneous or missing. 0=Auto, 1=Forced to Yes, 2=Forced to No. If Auto is selected, the PAT will be scanned only if the PMT data are unavailable (in case of a change for the PMT PID): but it takes several seconds more.
-DontUpdViewer (1,2,3 or ) : Flag to don't update DVB software when ECM PID changes and/or Don't Send DCWs (Decoded Control Words). 0=Do both, 1=Don't update DVB software, 2=Don't send DCWs, 3=Don't update DVB software and Don't send DCWs. Note that if the TT Trick is used, the DCWs are not "really" send to the DVB software anyway but directly to the device.
-UseDVBTime ( or 0) : Flag to use UTC time in DVB stream (currently unused). The time displayed in the Monitor window is the local time computed from the computer system time (if it's within parenthesis), or from the last UTC DVB time received (if authorized and available).
-MaxECMPIDs (1-10. Default is [4}): Maximum number of simultaneous ECM PIDs in use. Only one ECM PID can be active at the same time for one given server.
-MaxConnections (1-32. Default is ): Maximum number of simultaneous connections (i.e. sockets). Only one connection can be active at the same time for one given server.
-LogMessages (1 or): Same as "Log Messages" option in the main menu.
-LogMessLevel (0-4. Default is 1): Level of informations to log into the text file called Hadu-Mes.log. The levels are cumulative: which means that level 0 stands for only level 0, level 1 stands for levels 0 and 1, and so on.
-DVBViewerAPI (1 or ) : Flag to force the plugin to the DVBViewer 3.2 API Type, if DVBViewer version is 3.4 and above. 0=Auto, 1=Forced to 3.2 API Type.
-DVBViewerAllAudio ( or 0) : Flag to decode all the Audio PIDs of the current channel, if more than one is present. 0=Only the current Audio PID, 1=All the Audio PIDs. Available only for DVBViewer version 3.4 and above, and if the "Use PSI Tables" option is active. This flag is also used to decode eventually the TeleText/VideoText PID : 0=No, 1=Yes (if scrambled).
-DVBViewerCSAStat (1 or ) : Flag to display some CSA statistics in the Monitor window. 0=No statistics, 1=Display some statistics. The statistics concern the number of calls to the different CSA types, and the number of video/audio encrypted TS received in the last packet.
-MDRoot (1,2 or ) : Flag to analyze the root firmware in case of MultiDec, to determine automatically DescrCommand, XorEven and XordOdd (see hereafter). 0=Auto (for Multidec), 1=Forced to Yes, 2=Forced to No. This concerns only premium DVB Card "TT-compatible". Note the values for the following options prevails from the one determined by this option.
-DescrCommand : 2 Bytes (4 hex chars)
-XorEven : 8 Bytes (16 hex chars)
-XorOdd : 8 Bytes (16 hex chars)
Don't use them unless you know exactly what you are doing.
-UseTT (1,2 or ) : Flag to use the TT Trick. 0=Auto (for WatchTVPro), 1=Forced to Yes, 2=Forced to No. This is only needed for DVB softwares which don't accept to send Direct DVB Commands. You need to have a premium DVB Card "TT-compatible" (like Technotrend DVB-S, Hauppauge Nexus-S, TechniSat SkyStar1) and a patched root firmware.
For each server declared, the convention for its declaration is to create a section with (note the "Serv_" string at the beginning) : [Serv_whateveryouwishforyourservername].
Then comes the different parameters for the server. Only the "Server" parameter is mandatory.
Syntaxe for the "Server" parameter :
Sample: Server=CCCam:MyServer.com:12000:0:MyUsername:MyPas sword, where
-CCCam: Declaration for a CCCam server (other protocols currently not available),
-MyServer.com: URL or IP address for the server,
-12000: Port for the CCCam server (decimal value),
-0: Caid/mask. Not used (may be empty), see "CAIDProv" and "NoCAIDProv" parameters instead,
-Myusername: Name of the user (limited to 20 characters for CCCam protocol),
-Mypassword: Password for the user.
Others parameters (each of them is optional):
-Active ( or 0): Server active or not active. A non active server cannot be started.
-TimeOut (0=None, or 3-7 seconds. Default is  seconds): Timeout value if the server is not answering,
-PadTime ([0=None], or (TimeOut+2)-N seconds): interval of time for which a "pad" command is sent to the server if no other commands has already been sent (usually must be kept to 0),
-WantEmus (0=No or [1=Yes]): similar to WantEmus option in CCCam.cfg. If set, friends emus are also used (if the server has authorized them for the user). Even if WantEmus is not set, the concerned nodes are displayed into the list of nodes, but are not available.
-MaxHop ([0=None], or 1-N): if WantEmus is set, nodes with a hop value superior to this limit are not used. A null value indicates no limits.
-CAIDProv ([None]): list of CAID/Providers ONLY used to make requests to the server(s). Each entry may concern a whole CAID, or just only one provider for this CAID. Entries are separated using a comma character. Samples:
CAIDProv=0100,1801 : only CAIDs 0100 and 1801 will be used.
CAIDProv=0604,0100:0084,0100:006A : only CAID 0604 and CAID/Providers 0100/84,0100/6A will be used.
-NoCAIDProv ([None]): list of CAID/Providers EXCLUDED. Syntax similar to the "CAIDPRov" option. Samples:
NoCAIDProv=0604,0500 : CAIDs 0604 and 0500 won't be used.
NoCAIDProv=0100:6A,1810,0500:032100 : CAID 1810 and CAID/providers 0100/6A,0500/32100 won't be used.
There are two kinds of display.
The "Monitor" window (called from the main menu), used to display general and CAID informations for the channel, and general informations for the server(s).
Double-clicking on an CAID row (i.e. ECM PID) will force the plugin to try to use this ECM PID entry. If it's not compatible for a given server, the following next compatible ECM PID entry will be used instead.
Double-clicking on an server will display the "Server Infos" window (see hereafter).
Right-clicking on an server will display a menu to:
-Start/Stop a server (if the server is active). Same as the "Active" option in the configuration file,
-Activate/Deactivate a server,
-Ask to retry all the possible ECMs again (if the server is started).
The "Server Infos" window (called from the server list in the "Monitor" window) is used to display informations for all the nodes of the server. Columns inside the nodes list:
-S (for Status): indicates the status of the node. [Empty] = not available (because of the configuration restrictions -see "WantEmus" and "MaxHop" options-; or because it has been declared disconnected by the server). Furthermore, unavailable nodes are grayed. "....." = node available, but forced by the user to be ignored. " +" = node available. "**" = node available and currently in use.
-Req/Got : numbers of ECM requests sent to the node, and of DCWs received from it.
-Hop, CAID and Providers : common informations for a node.
Double-clicking on an node which is available, will toggle its state between "to use" and "to ignore".
Data in the "Server Infos" window are refreshed each 2 seconds. You can force an extra refresh with the "Refresh" button.
The clipboard button serves to copy data of the window into the clipboard.
At the bottom of the window, the total numbers of nodes and CAID/providers are displayed: the first number of both of them indicates the whole total number, will the second number indicates the total number of available items.
Here are the main current limits applied into the plugin:
-Maximum number of CCCam servers (active or not active): 6
-Maximum number of nodes per server : 2048
-Maximum number of providers per nodes : 16
-Maximum number of hops per node : 16 (though more than 3 or 4 is probably useless)
-Maximum numbers of CAID/providers entries into to "CAIDProv" and "NoCAIDProv" options : 32
-Maximum length size for user and password: 20 for the user, 128 for the password.
(Many thanks to the person who has kindly provided me a CCCam server for my tests).