Latest Oscam with emu.

oscam-git11921-802

webif: add service counter
 

Attachments

oscam-git11933-802

webif: embedded wiki help system
Features
* Offline Help: All parameter descriptions are available directly in the binary
* Clickable Parameters: A click on the parameter name opens the help popup
* Draggable Popup: The popup can be freely moved (also via touch on mobile devices)
* Resizable: Size can be adjusted
* Position Remembered: The horizontal position and size are stored in the browser
* Reset Button: Reset to default position and size
* Wiki Link: The title in the popup is a link to the online wiki for more details
* Directly from OSCam Wiki: Parameters dynamically extracted from wiki pages during the build process
* Automatic Updates: Any changes to the wiki pages are automatically integrated into the binary on the next build
* LZO Compression: Wiki data is compressed like WebIF pages (~64% smaller), controlled via WITH_COMPRESS_WEBIF or USE_COMPRESS
* Smart Filtering: Only help texts for actually compiled modules are included in the binary (based on is_defined.txt)

Advantages
* Available Offline - no internet connection needed - perfect for isolated networks
* Fast - instant display without network latency
* Always Up-to-date - wiki content matches exactly the binary version
* User-friendly - help right where you need it
* Touch Support - also works on tablets and smartphones
* No Tracking - the wiki web server sees no requests from your device

Disadvantages
* Larger Binary - approx. 76 KB with LZO compression, or ~45 KB with UPX binary compression
* More RAM - wiki data is kept in memory
* Build Dependency - wiki markdown files must be present during build

The build process:
- New build option WEBIF_WIKI (default=off)
- Git submodule is automatically initialized and updated
- wiki_gen.c parses all markdown files in the wiki/ folder
- Generates pages_wiki.c and pages_wiki.h with all parameter descriptions
- Compiles everything into the final binary

Technical details
- Position Storage: Browser localStorage (wikiPopupLeft, wikiPopupWidth, wikiPopupHeight)
- API Endpoint: /wiki.json?config=conf&param=serverip
- Generation: wiki_gen.c parses the markdown files and generates pages_wiki.c
- Compression: Controlled via WITH_COMPRESS_WEBIF (same as WebIF pages). Automatically disabled when using USE_COMPRESS=1 (UPX binary compression) - UPX compresses the entire binary more efficiently, making internal LZO compression redundant.
 

Attachments

oscam-git11936-802

webif: add BOTTOM navigation link
- css.css: add BOTTOM navigation link and adjust TOP link position
- Both links positioned on the right side (right:10px)
- TOP link: bottom-right in footer
- BOTTOM link: top-right in menu area
- Arrow symbols after text for both links

- menu.html: add BOTTOM link element with class "bottom_link"
- Link anchors to #statusfooter for navigation to page footer

webif: fix BOTTOM navigation link
* define bottom_link as a html div container like top_link
 

Attachments

oscam-git11940-802

reader: add maxparallel feature to limit simultaneous services per reader
This feature allows limiting the number of services that can use a reader
simultaneously, essential for card readers with slot restrictions.

=== NEW CONFIGURATION OPTIONS ===

maxparallel (default: 0 = unlimited)
Maximum number of active services per reader. When reached, the reader
is skipped and other readers are tried (fallover).

paralleltimeout (default: 1000 ms)
Buffer added to the measured ECM interval for slot expiration.
A slot expires when no ECM is received within (measured_interval + timeout).

parallelfactor (default: 1.5)
Multiplier for pending slots to support zapping without blackscreen.
Set to 0 to disable pending slots (strict maxparallel enforcement).

=== ARCHITECTURE ===

Dual-slot system with active and pending services:

- Active slots (size: maxparallel)
Confirmed services actively receiving CWs from this reader.

- Pending slots (size: maxparallel * parallelfactor)
Temporary overflow during channel zapping. Pending services are
promoted to active when slots free up (FIFO), or dropped when
active services need the capacity.

Slot reservation timing:
Slots are reserved when a reader DELIVERS a CW, not when the request
is sent. This prevents readers from blocking capacity for services
they don't end up serving when multiple readers are queried in parallel.

=== BLOCKLIST FOR CLEAN FALLOVER ===

When a pending service is dropped, the client+service combination is
added to a per-reader blocklist. This causes:

- Subsequent ECM requests for blocked combinations to skip this reader
- Clean fallover to other readers without repeated drop cycles
- No log spam from services repeatedly going to pending and getting dropped

Blocklist lifecycle:
- Added: when service is dropped from pending
- Removed: when client zaps to a different service
- Cleared: when an active slot becomes free

=== TYPICAL USE CASE ===

- Reader 1: maxparallel=1 (card allows only 1 service)
- Receiver records Service A on Reader 1, user zaps to Service B
- Service B goes to pending slot (no blackscreen during zap)
- Service A sends ECM -> Service B dropped from pending
- Service B blocklisted on Reader 1 -> falls over to Reader 2
- User stops Service B -> block cleared, Reader 1 available again
 

Attachments

oscam-git11942-802

streamrelay: fix fallback host comparison and resource leaks
- Fix fallback host comparison using streq() instead of pointer comparison
- Fix socket leaks in connect_to_stream() on setsockopt/connect failures
- Add safety checks for glistenfd before close operations
- Fix remove_newline_chars() to also handle carriage returns
- NULL key pointers after dvbcsa_bs_key_free() to prevent double-free
- Rework stream_server() using do-while(0) pattern for cleaner error handling
- Some code formatting according to CODING.RULES.txt

webif: fix entitlements display for cccam
Separate card sorting functions from cccshare module to allow
cccam clients to view received entitlements in webif even when
MODULE_CCCSHARE is disabled.

This fixes a design issue where MODULE_CCCSHARE controlled both
share functionality (server-side) and entitlements display (client-side),
preventing pure cccam clients from seeing their entitlements.
 

Attachments

Hello,

My OSCam will not start ... could you please check?

I am using VU Solo4K
Stop OSCam from menue
Change the bin ... give the right attribute 755
Start OSCam from menue
But nothing happend, OSCam will not start ... also when I reboot the box new

When I go back to 11921 with the same way, everything is ok

Thanks
 
oscam-git11943-802

dvbapi: use SERVICE_TYPE_MASK descriptor to fix CW delivery for shared services
When stream_write_cw() successfully delivers a CW to a stream client,
it returns true and prevents the same CW from being written via the
CA device (ioctl/netsend). This exclusive routing causes a CW gap
on demuxers that require CA device delivery until the next cw cycle,
because stream_write_cw() consumes the CW before the stream client
has fully disconnected.

Parse the SERVICE_TYPE_MASK descriptor (0x85) from the CA PMT to identify whether a demux serves a stream client (type 7/8) or requires
direct CA device or netsend descrambling. For demuxers that require CA device or netsend delivery, always write the CW via dvbapi_write_cw
regardless of whether stream_write_cw() consumed it. For stream-only demuxers and clients that don't send descriptor 0x85, preserve the
original exclusive behavior.
 

Attachments

oscam-git11945-802

dvbapi: suppress pmt mode 6 connection retry log spam
Log the connection attempt and error only once, then silently retry every second until the CA PMT server becomes available.

warnings: fix C23 and glibc-2.43 -Wdiscarded-qualifiers warnings
For ISO C23, the function strstr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.
 

Attachments

oscam-git11946-802

signing: fix build with OpenSSL 4
 

Attachments

oscam-git11949-802

webif: remove poll from request read loop
Simplify WebIf request handling by relying on check_request() to detect complete HTTP headers and request bodies instead of polling the socket between reads.

This removes the extra poll-based wait path while preserving correct handling for fragmented GET and POST requests.

thx to @lpm11

Extend service and group handling to 128 entries and harden related limits
Add platform-aware 128-bit group and service support for builds with __int128, while preserving correct 64-bit fallback behavior.

- introduce group_t and GROUP_BITS so group and sidtab bitmasks scale to 128 entries where supported
- enforce MAX_SIDBITS consistently across parsing, runtime checks, and WebIF handling
- fix off-by-one, buffer sizing, and numbering issues in group and service serialization
- improve validation, truncation handling, and warning messages for invalid or oversized group/service definitions
- add and document the httpmaxrequestsize config option, and make WebIF request parsing enforce the configured limit
- add clearer startup diagnostics for effective group/service capacity and ABI details
- update WebIF limits and documentation to reflect build-dependent 64 or 128 entry support

chore: align README with markdown rules
 

Attachments

oscam-git11953-802

net: remove obsolete gethostbyname resolver and use getaddrinfo exclusively
gethostbyname() is not thread-safe and has been marked obsolescent by
POSIX. Newer glibc versions could emit a linker warning for any binary
referencing this symbol, even if the code path is gated behind a
runtime config option.

The modern replacement getaddrinfo() was already fully implemented as
the default resolver (resolvegethostbyname=0). This removes the legacy
gethostbyname() fallback path along with:

- the resolvegethostbyname config option (oscam.conf [global])
- the Resolver dropdown from the webinterface
- the gethostbyname_lock mutex (no longer needed since getaddrinfo
is thread-safe)

cmake: switch library detection from auto-detect to opt-in
* cmake: declare STATIC_* and LIBCRYPTO_LIB/SSL_LIB as cache variables

When a user passes -DSTATIC_PCSC=0 while HAVE_PCSC is also 0 (or
vice-versa for libcrypto/libssl/libusb/libdvbcsa), cmake prints:

CMake Warning:
Manually-specified variables were not used by the project:
STATIC_PCSC

The warning is harmless but confusing: the STATIC_* flag is only
read inside if (HAVE_*) blocks, so when the feature is disabled
the -D value is indeed unreferenced.

Declare the flags via option() (and LIBCRYPTO_LIB/SSL_LIB via
set(... CACHE STRING ...)) at the top of the file so cmake
considers them known even when the feature guard is inactive.
Placed before system detection so they don't override the
macOS-specific set(STATIC_LIBUSB True).

* cmake: add LIBCRYPTO_LIB and SSL_LIB overrides for Makefile parity

The Makefile allows passing a full library path to override the
default detection:

make USE_LIBCRYPTO=1 LIBCRYPTO_LIB=/usr/lib/libcrypto.a
make USE_SSL=1 SSL_LIB=/usr/lib/libssl.a

Mirror this in cmake by honouring LIBCRYPTO_LIB and SSL_LIB when
set. The supplied path is used as-is for OPENSSL_CRYPTO_LIBRARIES
and OPENSSL_SSL_LIBRARIES, bypassing the static auto-detection.

Both static and dynamic archives work. Existing flags
(STATIC_LIBCRYPTO, STATIC_SSL, OPENSSL_*_LIBRARY) keep working.

* cmake: simplify libusb and libdvbcsa status summary

Apply the same pattern used for PCSC to libusb and libdvbcsa:
report the final resolved link mode instead of mixing request
flags with result flags.

LIBUSBDIR/LIBDVBCSADIR -> custom location selected
STATICLIBUSB/STATICLIBDVBCSA -> static linking was selected

Removes the redundant "You selected to enable static" messages
(the result message already covers that case) and the duplicate
LIBUSBDIR branches.

* cmake: simplify PCSC status summary

Restructure the PCSC summary block to describe the final resolved
link mode instead of mixing request flags with result flags:

PCSCDIR -> user selected a custom PCSC location
STATICPCSC -> static linking was actually selected

STATIC_PCSC (user request) and STATICPCSC (actual result) are not
always the same, e.g. when libpcsclite.a cannot be found despite
STATIC_PCSC=1. Using only STATICPCSC in the summary keeps the
status message aligned with the real build result.

* cmake: add static libcrypto and libssl support

Add STATIC_LIBCRYPTO and STATIC_SSL flags to independently control
static linking of libcrypto and libssl, matching the Makefile where
LIBCRYPTO_LIB and SSL_LIB can be set to .a paths separately.

When either flag is set, OPENSSL_USE_STATIC_LIBS is enabled for
find_package(OpenSSL), then find_library locates the static archives
relative to the OpenSSL include directory. The native CMake variables
OPENSSL_CRYPTO_LIBRARY and OPENSSL_SSL_LIBRARY can also be used to
pass explicit paths directly.

Usage:
cmake -DHAVE_LIBCRYPTO=1 -DSTATIC_LIBCRYPTO=1 ..
cmake -DHAVE_LIBCRYPTO=1 -DSTATIC_SSL=1 ..
cmake -DHAVE_LIBCRYPTO=1 -DSTATIC_LIBCRYPTO=1 -DSTATIC_SSL=1 ..
cmake -DHAVE_LIBCRYPTO=1 -DOPENSSL_CRYPTO_LIBRARY=/pfad/libcrypto.a ..

* cmake: add static PCSC and custom PCSCDIR support

Add PCSCDIR and STATIC_PCSC support for PCSC linking, bringing it
on par with libusb (LIBUSBDIR/STATIC_LIBUSB) and libdvbcsa
(LIBDVBCSADIR). Previously cmake could only link PCSC dynamically
with the bare -lpcsclite flag.

PCSCDIR uses find_library with IMPORTED targets for both static
and dynamic linking. Without PCSCDIR, -DSTATIC_PCSC=1 searches
the system for libpcsclite.a and falls back to dynamic if not found.

Usage:
cmake -DHAVE_PCSC=1 ..
cmake -DHAVE_PCSC=1 -DSTATIC_PCSC=1 ..
cmake -DHAVE_PCSC=1 -DPCSCDIR=/opt/pcsc ..
cmake -DHAVE_PCSC=1 -DPCSCDIR=/opt/pcsc -DSTATIC_PCSC=1 ..

* cmake: switch library detection from auto-detect to opt-in

Libraries like pcsclite, libusb and OpenSSL were auto-detected via
check_include_file, causing unwanted dynamic linking when the toolchain
sysroot contained these libraries. This changes cmake to match the
Makefile behavior where libraries must be explicitly requested.

Use -DHAVE_PCSC=1, -DHAVE_LIBUSB=1 or -DHAVE_LIBCRYPTO=1 to enable.
OpenSSL/libcrypto is auto-enabled when WITH_SSL is active in config.

Wrap the static library link step in --start-group/--end-group
(GNU ld) to resolve circular dependencies between csoscam, csmodules
and csreaders. Since 28f2598b (cleanup reader macros) the
READER_VIACCESS ifdef in oscam-aes.c caused oscam-aes.o to not be
pulled from libcsoscam.a when READER_VIACCESS was disabled, leaving
aes_encrypt_idx/aes_decrypt/aes_set_key_alloc unresolved for modules
like camd35 and camd33. Simple reordering is not possible since
csoscam and csmodules have mutual dependencies. macOS is excluded
as Apple ld rescans archives automatically.

build: isolate test build artifacts into a separate directory
 

Attachments

Back
Top