Howto debug Oscam

    • Official Post

    Howto debug Oscam


    The guide is based on the following system:


    Code
    1 Required to install packages with apt-get
    2 install libusb
    3 The OScam configuration files are stored here (if necessary adjust the path in the run scripts)
    4 In the following should be present oscam.config
    5 Error message. -> Ulimit: open files:



    Needed to install packages with apt-get


    Code
    apt-get update
    
    
    
    
    apt-get install-y htop automake make cmake cmake-curses-gui subversion libusb-dev libssl-dev libssh-dev g+ + gcc gdb dialog


    install libusb


    libusb-1.0.6 installed as follows: (Here the libusb-1.0.8 is installed)


    The configuration files are stored here OScam (possibly adjust the path in the run scripts)


    Code
    / Var / etc


    The following should be present oscam.config


    Code
    logfile = / var / log / oscam.log
    
    
    
    
    DisableLog = 0


    Error message. -> Ulimit: open files:


    When executing a user without admin rights the scripts you get with the entry "ulimit-n 4096" error message. -> Ulimit: open files: Can not the limit à ¤ Change: Operation not permitted


    Therefore we use in section 4.0 as the root user!


    Adding a User


    The program Putty (for Windows) as root to the server, connect, enter and then run the query:


    Code
    adduser oscam_doctor


    then oh with


    Code
    logout


    close the connection.


    OScam files download


    Connect to the program Putty (for Windows) oscam_doctor to the server. Now we are oscam_doctor the Home directory of user control with

    Code
    pwd


    If you would like to check whether a OScam playing then you can with the htop and if necessary, kill


    Code
    htop


    check out


    Code
    svn co http://streamboard.tv/svn/oscam/trunk oscam-svn


    Certain audit check


    Code
    svn co http://streamboard.tv/svn/oscam/trunk oscam-svn-r xxxx


    Select modules


    If you only certain modules (Add-Ons/Protocols/Reader) in OScam want to have, then you would enter (should at least be set for "add-ons" and debug messages Log History)


    Code
    cd oscam-svn
    
    
    
    
    . / Config.sh


    and it opens the following dialog box





    Instructions:


    Use the Enter key you can in the main modules and press space you choose the modules. Finally, click "Save" and then "Enter" to confirm not forget!


    Scripts create PS: We are in / home / oscam_doctor / oscam-svn / build directory!


    Type the following


    Code
    mkdir build
    
    
    
    
    cd build


    Then create three files in the folder with the vi
    Without cmake in scrpit


    Code
    vi gdb start


    Here i just typing not press ENTER!


    Code
    i


    Then copy the pure click here and in the putty window with the right mouse button



    Then again press the ESC key and


    Type the following


    Code
    wq


    and press ENTER


    Then the rights to change


    Code
    chmod 755 gdb start


    Ready


    With cmake scripts in


    Code
    vi gdb cmake-start


    Here i just typing not press ENTER!


    Code
    i


    Then copy the pure click here and in the putty window with the right mouse button


    Code
    / Bin / sh 
    
    
    
    
    ulimit-n 4096 cmake DCMAKE_BUILD_TYPE = debug .. make killall -9 oscam echo "oscam killed" sleep 1 gdb-ex "set logging on" ex "show logging" oscam-x run echo "oscam exit debug"


    Then again press the ESC key and


    Type the following


    Code
    : Wq


    and press ENTER


    Then the rights to change


    Code
    chmod 755 gdb cmake-start


    Ready


    Create scripts for configuration path


    Code
    vi run


    Here i just typing not press ENTER!


    Code
    i


    Then copy the pure click here and in the putty window with the right mouse button


    Code
    run-d1-r0 -c/var/etc /


    Then again press the ESC key and
    Type the following


    Code
    : Wq


    and press ENTER


    Then the rights to change


    Code
    chmod 755 run


    Then we log off from the server


    Code
    logout


    OScam start using the scripts in debug mode


    Connect to the program Putty (for Windows) as root to the server. Then we enter the following


    Code
    cd / home / oscam_doctor / oscam-svn / build


    When you first start, we use the gdb cmake-start scripts so that OScam binary is compiled for the first time!


    Code
    . / Gdb-cmake-start


    Then you should see the following in the output



    If you already have the OScam binary, then you can use the gdb-start script


    Code
    . / Gdb-start


    Then you should see the following in the output



    The one thing about the whole thing


    With both scripts, the log files are automatically created for gdb -> / home / oscam_doctor / oscam-svn / build / gdb.txt


    Now, when should crash OScam would see as output in putty following



    ! IMPORTANT! Appears now expects "gdb" an input so the backtrace that we should do with it, it is written to the log file gdb.txt



    So we simply type


    Code
    bt


    And then get the backtrace shown



    And only now the output is written in the gdb.txt!


    Source: Stream Board
    Translated from Italian using Google.

OSCam Support Forum

Configs, discussion, downloads and guides for OSCam Softcam.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!