Posts by s3n0

    If these are different CAIDs, then you only need to determine which reader will belong to which CAIDs. So for one reader it was enough to write caid = 0100 and for the other reader to add caid = 0500. Instead of using specific services (channels). If an exclusive CAID is specified for each reader, Oscam will only search for those ECM requests for a specific CAID.


    In terms of priorities, the settings in the "oscam.dvbapi" file should help with the following content:

    Code
    #### Setting priority rules for CAIDs (user dvbapi):
    
    P: 0100
    P: 0500
    
    #### Ignore every CAID that was not handled before:
    
    I: 0

    However, you need to make sure you have lower LB weight values in Oscam-Webif. See if that is the case. Make sure your local reader has the lowest value. Or should it be the highest ? :-D Sorry, I don't remember. Follow and try to achieve the highest and then the lowest weight in the local reader. You have to wait a while before the average LB weight in the Oscam is created for each reader.


    Set your local reader in "oscam.server" as a fallback reader (or as a fallback_percaid):

    OSCam/en/Config/oscam.server – Streamboard Wiki


    In the "oscam.conf" file, try to set:

    preferlocalcards = 0

    You probably didn't read what I wrote. It takes a few seconds for the local reader to start, depending on the type of encoding and firmware in the card. So... this 500 ms is a small value and also it's the default value (=500), so you set it unnecessarily. Set there at least 5000 value (i.e. 5 sec. = 5000 ms). However, this will only help at the beginning, then later the problem may reappear.


    It is better to use an LB weight. You set the LB weight mode in the "oscam.conf" file, then add the LB weight for each card reader (in "oscam.server" file). You can use the default value of 100 for all of them. And then, for the card you want to prioritize based on access speed, you will use a higher weight value. I know it can be done with this LB weight. But I've never tried it, so I can't advise you on the details. I don't know what value you need to set. You can try to set, for example, the value between 200-300 for your local card reader. This LB weight value reduces the calculated ECM response time from the card. This means that Oscam will ask for and prefer this card reader in particular - i.e. with lower response time (re-calculated time). LB mode must be set to 1 in the "oscam.conf" file (lb_mode = 1).


    The LB weight is calculated from the average of the last few data (10 default ? If I'm not mistaken) access time from ECM requests. Of course, this can also be configured if necessary (so you can change, for example, the number of last values from which the average LB of the balance is calculated). The LB weight as an averaged data, if you use it, is also displayed directly in OscamWebif (column with the name: "LB Value / Reader").

    Hi.


    As far as I know, this setting is used to determine how the local reader will be accessed. This does not serve to prioritize the local reader in general, but only in conjunction with the CacheEx configuration.


    OSCam/en/Config/oscam.conf – Streamboard Wiki


    In translation, it should mean something like this:


    preferlocalcards = 0 # local cards behave as if they were remote readers

    preferlocalcards = 1 # prefer CacheEx resources, if available, over card readers (default)

    preferlocalcards = 2 # prefer local readers over CacheEx resources


    If you want to prioritize the local card reader over external card readers, you must first delay the start of the local card reader. For example, when restarting or starting Oscam, an external card reader is connected first - within a few milliseconds. Unfortunately, the local reader initializes for several seconds. The following setting is used for this purpose: https://wiki.streamboard.tv/wi…#waitforcards_extra_delay (additional delay in milli seconds after waiting for local SCs on startup before opening nework ports). For example, set 15,000 milliseconds there. Of course, each restart or Oscam start will always be delayed by 15,000 milliseconds (15 seconds). That might help.


    However, it would be better to play with lb_weight + lb_mode settings. Set the LB (Load Balance) weight so that the local reader is always preferred rather than external. However, this has its pitfalls and problems:

    OSCam/en/Loadbalancing – Streamboard Wiki

    ... or check this:

    I don't have Debian Linux and I don't use this kind of "service launcher", so, I guess I can't advise you. I use "/etc/init.d" to run OSCam / CCcam. See the script of mine as well as the instructions inside the script:

    https://github.com/s3n0/e2scripts/blob/master/softcam


    However, Linux systems are CASE SENSTIVE. Therefore, make sure that the binary file name or service name is correct. Use the same capital letters everywhere - use CCcam, not cccam. Maybe it will help. Your binary contains the first two capital letters.


    Or it will be easier if you change all your "CCcam" to "cccam". To lowercase letters. Also rename the binary file to "cccam" from the original "CCcam.x86_64". Of course, then also edit your config file and change this "CCcam.x86_64" to "cccam".


    I don't know for sure, but it seems to me that the PID file must have about the same name as the binary file name or the service name.


    I also think that the "-B" argument is not necessary. Linux creates the PID file itself. But I don't know for sure either. My CCcam binary file (in the Enigma2 / Linux set-top box) does not contain any "-B" argument. Although it depends on the build version of a particular CCcam. In my opinion, this "-B" argument is not necessary. I'm not sure, sorry.


    I recommend using this line as a trigger for cccam:

    ExecStart=/bin/bash -c '/usr/bin/CCcam -c /var/etc/CCcam.cfg'

    Or if you changed everything to "cccam" (lower case), then:

    ExecStart=/bin/bash -c '/usr/bin/cccam -c /var/etc/cccam.cfg'


    Or try the following start script (source: http://www.digital-eliteboard.com):

    Don't forget to match the size of the characters in the service name, script name and binary name.


    I hope your CCcam binary also has the execution attributes set:

    chmod a+x /path/binary_file

    STAPI interface ? Hmmm ... is this an Android system ? Write which set-top box you use (manufacturer + type). Please do not write the detected platform from the LOG, but write what the exact device is. Is it some Android-Box ? What brand and type ? Of course, the STAPI interface is configured a little differently.

    Do you mean SurfLock function in the firmware algorithm on the decoder card ? This feature prevents ECM requests from being frequent, such as sharing protection.


    Of course, the problem can be elsewhere. Algorithm in the decoder card firmware, can contain any other functions.


    For example, a decoding card may request to receive a particular EMM packet of a certain type, always on a regular basis, at certain time intervals. Sometimes it's once a month, other times it's a day, and other times it's 10 minutes, for example.


    Of course, the problem may involve other things as well. Not what I mentioned above. However, you need to describe your problem (your question) in more detail.

    Hi.


    Please specify your question in more detail. What exactly do you want to achieve and where exactly is the problem? You have two identical 0B00 CAIDs (Conax encoding) but a different operator. If the operator is different, then this ident should be different and not 000000 for both, or am I wrong?


    Use the basic configuration. Oscam can do everything himself. It tries to search for channel (PID) availability first on the first reader and then immediately on the second reader. If it finds and the ECM request is successful, it will be used this one card-reader for this one channel (PID).

    Hi.


    Of course yes, why not ? You just have to modify all the necessary files so that instead of Oscam it is Cccam. And also modify the arguments of the softcam. For example, the "-b" argument is used to start a specific Oscam softcam in the background. Of course Cccam softcam uses different arguments and by default it starts automatically in the background (no argument is needed for any starting in the background).

    The default port for Oscam is 8888, but in some cases, if the "oscam.conf" configuration file is already stored in the set-top-box when Oscam IPK is installed, sometimes the oscam-webif port may be modified (for example, to port number 83). Then you can find out the location of the file, simply by searching it in the file system, via the Linux Shell:

    find / -name 'oscam.conf'


    And to display the content, also in the Linux Shell, you use the command:

    cat /path-found/oscam.conf


    There probably will be the changed oscam-webif port... so then... to check this port, use the following command (in Linux Shell):

    cat /path-found/oscam.conf | grep -i 'httpport'

    ok got it working by adding enable 1 I had to use a new oscam file from provider.


    Do I still have to use the other 3 files same as before if the provider only supplies oscam.server file?

    Hi.


    Without the "oscam.conf" file, Oscam probably won't even run. This is the basic configuration file for Oscam. If it doesn't exist, Oscam should guess it automatically. I don't remember that, sorry.


    Fo sure... you should definitely have these 3 files mentioned above, which I mentioned above and also attached as an attachment in the zip-archive. In my opinion, not only the file "oscam.server" is enough.


    The cause of Oscam's malfunction may be elsewhere. Have you wondered if it is possible to connect Oscam-Webif ? Try it through any web browser on your PC, on your LAN. Simply connect by entering the IP address of your set-top-box and the default port for Oscam-Webif, such as... for example:

    http://192.168.0.147:8888


    If you can connect, try to find out which configuration directory for Oscam is used in your Oscam:

    OscamWebif > MENU Files > and check the line with a text "ConfigDir:" there

    Hi.


    No converter is required if you use a converter. This converter can, on the other hand, send your private data (name and password) somewhere on the internet. So avoid such bullshits. Just use common sense and this conversion table (C-Line data to "oscam.server"): How to setup Oscam.server on H 7 C box


    If that doesn't work, you probably need 2 more configuration files for Oscam in addition to the "oscam.server", i.e. files "oscam.conf" and "oscam.user". In attachments (see below) is the basic configuration for Oscam (you need to edit this config, according to your needs). If you want to use C-Line in Oscam, simply add another reader (for Cccam connection) to the "oscam.server" file.


    //// EDIT :


    Sorry, I forgot to add an example for an external cccam reader to the "oscam.server" file. By the way, you should get this information from your provider. Personally, I do not use Oscam as a client to connect to the Cccam server. The Cccam client is better than the Oscam client. I prefer "cccam-2.3.0-mipsel" to softcam client. However, this is a problem for the ARM architecture, so if you use a set-top box with an ARM chipset, it's more complicated there. However, I am talking about specific problems with IRDETO encoding. there is only a special version of Cccam for the ARM processor, but there is no specific Cccam v2.3.0 that is probably the most stable for IRDETO encoding.

    A simple explanation of the times in the CRON configuration can be found here:

    https://crontab.guru/

    ... and there is also the option to test / configure your own configurations.


    If you want to run the script every 5 minutes, use this:

    https://crontab.guru/#*/5_*_*_*_*


    If every 1 minute, there will be stars everywhere, because CRON detects time every minute and not every second:

    https://crontab.guru/#*_*_*_*_*


    //// EDIT:


    As for the location of the CRON configuration file for Ubuntu Linux, all you have to do is use the Google search engine:

    https://askubuntu.com/question…s-the-user-crontab-stored

    Oh, then OK, but you don't have to write the whole script (file) at all. Just paste it as a command directly into the cron config file.


    It just depends on what basis you want to test the Oscam process. I don't know what works on Ubuntu. Maybe it would be enough to use "pidof". I have already written a large number of similar "commnad-line". It depends on the specific Linux and the type of Softcam startup.


    Example:

    * * * * *        if ! pidof oscam > /dev/null; then /etc/init.d/softcam restart; fi


    Or this one:

    * * * * *        if ! pidof oscam > /dev/null; then killall -9 oscam; /usr/bin/oscam -b -r 2; fi


    Instead of "pidof" it is possible to use "ps" which is much more complex, or other tools to control processes. This is because a process can be started... but frozen... and "pidof" will always return process numbers (even if they are frozen). The "ps" tool is then better for this purpose.


    Or change the way Oscam's functionality is tested. For example, it is possible to open Oscam-Webif every minute (but you must also enter the password in the URL here) and if Oscam-Webif does not open, it means that Oscam has frozen.


    ///// EDIT :


    I wrote some extra examples.

    Some of that might work on your Ubuntu Linux :).

    Take a look at other examples of Oscam functionality and its conditional restart:


    Hi.


    This is not a clean answer from zilizila. Namely, on each Linux (you mentioned Ubuntu) a different CRON can be used. There are several, and each has a different init.d script in the /etc/inid.d folder, so restarting CRON may be a little different. But maybe what I wrote above works for you to restart the CRON service, after the CRON changes.


    As for Oscam, why do you want to restart ? Don't you need to find out first if Oscam is alive or if Oscam needs a new entitlements ? Each satellite provider behaves differently. Each firmware in the decoder card behaves differently. Also, each coding system behaves differently.


    So, the right question for you is: Why do you need to restart Oscam every 5 minutes ?


    This allows you to stop watching TV for a few seconds (every 5 minutes repeatedly). Doesn't that interfere ? Or is there a coding system used that doesn't hinder it ? Or do you use a shell script in which everything is clear and in which the activity of your Oscam is detected ?


    As for the file in the "/etc/cron.d/" folder, these files inside, have a special purpose. You have to study / find it on the internet yourself. Colleague above probably forgot to mention this fact to you. In this case, you do not have to insert another configuration line into the basic configuration file for the CRON service. This line will already be in the mentioned file "/etc/cron.d/<something>".


    For example, some info from the source: https://opensource.com/article/17/11/how-use-cron-linux

    cron.d

    The directory /etc/cron.d is where some applications, such as SpamAssassin and sysstat, install cron files. Because there is no spamassassin or sysstat user, these programs need a place to locate cron files, so they are placed in /etc/cron.d.

    The /etc/cron.d/sysstat file below contains cron jobs that relate to system activity reporting (SAR). These cron files have the same format as a user cron file.

    Code
    # Run system activity accounting tool every 10 minutes
    */10 * * * * root /usr/lib64/sa/sa1 1 1
    # Generate a daily summary of process accounting at 23:53
    53 23 * * * root /usr/lib64/sa/sa2 -A

    The sysstat package installs the /etc/cron.d/sysstat cron file to run programs for SAR.

    The sysstat cron file has two lines that perform tasks. The first line runs the sa1 program every 10 minutes to collect data stored in special binary files in the /var/log/sa directory. Then, every night at 23:53, the sa2 program runs to create a daily summary.

    Hi.


    These scripts, on the Linux machine, should logically be Shell scripts - i.e. Bash / Sh / Ash / etc. - depending on which command interpreter your Linux contains.


    Alternatively, it could be a Java script, but I don't know how this Java code is implemented and executed. It's probably running inside the OscamWebif interface ... but I don't know because I don't use Java scripts.


    After executing the shell-script, if any standard output has been generated (from commands such as "cat" or "echo" without output redirection), this will be displayed in the lower blank form window.


    You set the directory for these scripts in the "oscam.conf" file, for example as follows:

    Code
    [webif]
    httpscript = /usr/script
    httpjscript = /usr/script

    Of course, these scripts must also have an execution attribute assigned to them:

    chmod a+x /path/filename

    (or set file attributes to 755 using an FTP client)


    More info here:

    https://wiki.streamboard.tv/wi…fig/oscam.conf#httpscript

    https://wiki.streamboard.tv/wi…ig/oscam.conf#httpjscript


    Since it is not possible to run any script, a running shell-script can also help. I created my shell-script, for the TPL conversion oscam-pikon, which in turn represents a Python script:

    https://github.com/s3n0/e2scri…rter_OscamWebif_script.sh

    https://github.com/s3n0/e2scri…oscam-picons-converter.py

    I describe up to two installation methods in my "init.d" softcam script. The first method depends on OpenATV / OpenPLi. The second method is a universal procedure. This universal method must work on any Linux set-top box. It is based on the Linux system. It must work anytime, anywhere on Linux that uses "init.d" - and that means it should work on 99% of all Linux set-top boxes :).