HOWTO: Compile OSCAM on Raspberry Pi, Dockstar or similar NAS running Debian

There are 17 replies in this Thread which was already clicked 26,932 times. The last Post () by LuPoX.

  • found this guide by nsane off another forum, i used it to compile/install oscam on my raspberry pi running debian.


    1. Preparations:


    Update apt-list and install required packes:



    Code
    apt-get update 
    apt-get -y install apt-utils dialog usbutils
    apt-get -y install gcc g++ wget
    apt-get -y install build-essential subversion libpcsclite1 libpcsclite-dev
    apt-get -y install libssl-dev cmake make 
    apt-get -y install libusb-1.0-0-dev nano



    If you need PCSC support:

    Code
    apt-get install pcscd pcsc-tools




    2. Get OSCAM source
    Now switch to /usr/src, create a directory for oscam and download sources:


    Code
    cd /usr/src
    svn co http://www.oscam.to/svn/oscam/trunk oscam-svn



    3. Compile OSCAM
    Now compile oscam for your machine:

    Code
    cd oscam-svn
    mkdir build
    chmod 755 build
    cd build
    cmake -DWEBIF=1 .. (those 2 dots are required. THIS IS IMPORTANT)
    make



    NOTE: If you get Errors while compiling e.g.

    Code
    --   no libusb 1.0 found. No smartreader support


    See the hint at the bottom before proceeding


    Now we got our oscam binary
    We're gonna move it to /var/local

    Code
    cd /usr/src/oscam-svn/build
    ls


    there should be a file called "oscam"
    So lets copy it:

    Code
    cp oscam /var/local/
    cd /var/local
    chmod 755 oscam



    4. Make OSCAM start at system startup:
    We're adding oscam to rc.local to make it start at system boot.


    Code
    nano /etc/rc.local


    Now add

    Code
    /var/local/oscam &


    right above line

    Code
    exit 0


    Oscam will start everytime the system boots up from now on


    5. configs and logfiles
    We still need to get some config files.
    By default oscam looks in /usr/local/etc for these file

    Code
    cd /usr/local/etc
    ls


    There should be at least 3 files: oscam.user, oscam.server, oscam.conf
    If not, copy your configs here


    Now we need to create some logfiles and make them writable:


    Code
    cd /var/local
    mkdir oscam
    chmod 755 oscam
    cd oscam
    mkdir cw
    chmod 755 cw
    nano oscamuser.log (enter a space and save file)
    nano oscam.log (enter a space and save file)
    chmod 755 oscamuser.log
    chmod755 oscam.log


    Thats it


    6. Start oscam
    You can now run oscam to check if it works

    Code
    cd /var/local
    ./oscam




    HINT: Oscam compile error: No smartreader support:
    If you get Errors while compiling e.g.

    Code
    --   no libusb 1.0 found. No smartreader support


    go to /usr/src, get libusb 1.0.6 from sourceforge and compile for your system:

    Code
    cd /usr/src/
    mkdir libusb
    chmod 755 libusb
    cd libusb
    wget http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.6/libusb-1.0.6.tar.bz2
    tar xjf libusb-1.0.6.tar.bz2
    make
    install


    After make install of libusb, start over with compiling oscam

  • the last quoted part of the guide (for smartreader support) seems to have some steps missing, so I will show what I had to do (at least if you are using the new Debian Raspbian “wheezy” image)



    not sure if all the above steps are needed but it seemed to work, the problem being that when uncompressing the file it creates in another folder, and also the ./configure needs to be done or there is no way that make and install will work.

    If I take a while to respond, you can see why.....


    :red:

  • Hi,


    On Raspberry Pi, you don't need to compile libusb yourself it is already an existing package, you simply need to create a symlink.


    Code
    sudo ln -s /usr/lib/arm-linux-gnueabihf/libusb-1.0.a  /usr/local/lib/libusb-1.0.a


    But to be sure to have libusb support compiled you need to add the flag: -DHAVE_LIBUSB=1 (this will also compile list_smargo then).


    Code
    cmake -DHAVE_LIBUSB=1 -DHAVE_PCSC=1 -DWEBIF=1 -DHAVE_LIBCRYPTO=1 -DWITH_SSL=1 ..


    Pr2

  • thanks but just to make it clear - do you suggest that when compiling oscam instead of

    Quote

    cmake -DWEBIF=1 ..


    we should instead do


    Quote

    cmake -DHAVE_LIBUSB=1 -DHAVE_PCSC=1 -DWEBIF=1 -DHAVE_LIBCRYPTO=1 -DWITH_SSL=1 ..


    and rather than


    we can just do

    Quote

    sudo ln -s /usr/lib/arm-linux-gnueabihf/libusb-1.0.a /usr/local/lib/libusb-1.0.a


    i was looking for list_smargo because I am having problems getting it to read a conax card in mouse or smargo mode so looking to try it in smartreader mode


    will try this after the footy!

    If I take a while to respond, you can see why.....


    :red:

  • Hi,


    Yes if you want to have libusb support and then list_smargo compiled you need to add at least (other option are optional by definition):


    Code
    cmake -DHAVE_LIBUSB=1 -DWEBIF=1  ..


    This will compile your OScam with libusb support and compile list_smargo (you will find it in your build directory under ./utils/list_smargo).


    And yes you don't need to download compile and install libusb, it is already build-in you simply need to create the symlink.


    Give it a try. :-)


    Pr2

  • I did pr2 - I deleted everything and started from scratch and your edits worked fine, as you rightly said libusb is already there - the only thing that needs to be done is moving the list_smargo out of the source folder, then delete the sources.

    If I take a while to respond, you can see why.....


    :red:

  • to amend step 2 of the guide that was posted by dui -


    Code
    svn co http://www.oscam.to/svn/oscam/trunk oscam-svn


    needs to be changed to

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


    as the location of the oscam repository has changed.

    If I take a while to respond, you can see why.....


    :red:

  • Hi,
    My 13 year old told me about the raspberry pi. I was amazed when he compiled a server on it but was disappointed when I found out that it could only support oscam. I wanted cccam. He now uses it as a media server for music and video etc.
    Amazing product for 30 odd bucks.

  • Hello, you know how to install OSCam on an USB flash drive to use on a Linux Sat Receiver (Opticum Actus Solo)


    Thank you


    Nis2

  • Hi all, i have a raspberry with Debian distro, i install the oscam and put the config files from a oscam runing in other computer with ubuntu, all clients are showed, but after 10 secons all of the user disconect and change status to OFF, the config files where from a friend, we change the dns to my computer too, but we dont know why dont work now, in her computer works fine. Anyone know what should happend ?
    Thx

    • Official Post

    Does the raspberry have a static internal ip address ? Have you checked canyouseeme.org to see if the port is open ? Start oscam in telnet and see if you can find any errors ( if oscam binary is named oscam and is in /var/bin folder use the following).

    Code
    cd /var/bin
    ./oscam


    When you start oscam do you see any other errors in the live log ?

  • I have static internal ip on rasp, i checked the port and is open, and the other question i will try it with my friend, i am really noob with linux and need here for check.
    Its really strange because the clients are conected and OK but the Proxies are connected when i reset the cam but disconect and stay OFF after 10-15 secs.
    In log when i join trought the http only show this

    Quote

    2014/08/31 14:45:59 116 p ******* [cccam] connecting to ******:*****
    2014/08/31 14:45:59 116p cccam(r) *******: login failed, usr/pwd invalid
    2014/08/31 14:46:24 116 p ******* [cccam] disconnected: reason inactivity

  • I try openelec too and have the same problem, the config works fine on ubuntu, but when we put the config on rasp with debian or openelec, the peers disconect after 10-15 secs

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!