NCam "Cannot Decode" Error: Causes & Fixes
If you're hunting for an ncam cannot decode fix, the first thing to understand is that this error is not one problem — it's at least four different problems that produce the same log message. Restarting NCam and re-entering your line is the advice you'll find on most forums. It fixes almost nothing. This guide works through the actual cause by following the ECM lifecycle from PMT parse to control word application, so you can isolate exactly where your setup is breaking.
What "Cannot Decode" Actually Means in NCam
NCam is an OSCam fork. The config directory is typically /etc/tuxbox/config/ and the files follow oscam.* naming — ncam.conf, ncam.server, ncam.dvbapi, ncam.user. If you're used to OSCam, the structure is identical. The behavior is identical too, including how it logs decode failures.
The "cannot decode" message means NCam either received a control word (CW) from a reader but the descrambler rejected it, or no CW arrived in time. The stream stays encrypted. The box shows a black screen. This is distinct from three other failure states you'll see in logs:
- no source available — no reader matched the CAID at all
- sid not found — the service ID isn't in any reader's channel list
- no matching reader — CAID exists but provider/group filter blocked the reader
"Cannot decode" specifically implies the ECM pipeline went further — a reader was contacted — but the final decode step failed. That's the distinction that matters.
The log line and where it appears
Open the NCam webif at http://your-box-ip:8888 (or whatever httpport you set in [webif]) and go to Live Log. You're looking for lines tagged dvbapi and entries showing ecm hash, no cw, or the explicit cannot decode string. The log file path is set in [global] of ncam.conf — typically logfile = /var/log/ncam.log or /tmp/ncam.log on embedded systems.
Decode failure vs. no ECM request vs. ECM rejected
This is where most troubleshooting goes wrong. "No ECM request" means the dvbapi layer never asked for a CW — that's a pmt_mode or socket problem. "ECM rejected" means the server replied with an error. "Cannot decode" means a CW arrived but didn't work. These three outcomes need completely different fixes, and they look superficially similar in the log if you're not reading carefully.
How NCam differs from OSCam dvbapi naming
Barely at all, honestly. The ncam.dvbapi file uses the same P:/I:/D: syntax as oscam.dvbapi. Some builds place configs in /usr/keys/ instead of /etc/tuxbox/config/ — check your specific image. The webif port defaults to 8888 on most NCam builds versus OSCam's 8888 as well, so no change there.
Read the Logs Before Changing Anything
Seriously. Every config change you make blind adds a new variable. Before touching anything, get a clean trace of what NCam is actually doing with one specific channel.
Enable full logging (debug 255) safely
In ncam.conf under [global], set debug = 255 temporarily. This logs everything: PMT parsing, ECM PID selection, reader matching, CW timing, and descrambler calls. On a Pi or weak STB, this will flood the log and can actually slow things down enough to cause late CWs — which creates a symptom that looks like the problem you're trying to diagnose. Capture 60 seconds of log for one channel, then set debug = 0 again. Don't leave it running.
You can also toggle verbosity per-reader in the webif without editing the file, which is cleaner during live debugging.
Tracing the ECM lifecycle: request, found, cw, decode
A successful decode trace looks like this in order: dvbapi parses the PMT and finds ECM PID(s), NCam selects a PID and sends an ECM request to a matched reader, the reader returns a CW, NCam hands the CW to the descrambler, the descrambler applies it and the stream decrypts. "Cannot decode" breaks at that last step — either the CW never came, came too late, or came wrong.
Look for the line showing ECM time in milliseconds. Something like ecm time: 340ms is fine. 1800ms on a channel with a 1.8-second crypto period means the CW is arriving right at the edge and may be getting discarded.
Spotting CAID/provider/SID mismatches in the trace
With debug 255 active, you'll see the full CAID:provid pair NCam is using to match a reader. If your reader has caid = 0500 but the channel's ECM is tagged with provider 032830 and your reader's services or ident line doesn't include that provider, NCam matches on CAID but the reader rejects the specific ECM. The log will show the reader attempted but returned nothing valid.
Fix the dvbapi Binding and PID Mapping
This is the most common cause of an ncam cannot decode fix being needed in a setup that was previously working — something in the dvbapi binding is off, either from an image update, a channel retune, or a config that was never right to begin with.
ncam.dvbapi syntax: P/I/D lines, CAID, provid, SID, ECM PID
The ncam.dvbapi file controls how NCam maps channels to ECM sources. Here's a concrete example:
# Prefer provider 032830 on CAID 0500P: 0500:032830# Ignore CAID 1800 entirely on this adapterI: 1800# Add 500ms delay before requesting ECM (for slow channel switches)D: 500# Pin a specific SID to a specific ECM PID (SID 1234, ECM PID 0x0640)P: 0500:032830:1234:0640The four-field form P: CAID:provid:SID:ecmpid is what you use when auto-detection picks the wrong ECM PID. This matters more than most guides acknowledge — a channel with multiple ECM PIDs under the same CAID will have NCam guess, and it often guesses wrong after a channel rescan.
boxtype / dvbapi mode (au, pmt_mode, listen_socket)
In ncam.conf, the [dvbapi] block needs to match your hardware and image. A typical enigma2 setup looks like:
[dvbapi]enabled = 1au = 1pmt_mode = 6request_mode = 0boxtype = dreamboxuser = your_local_userlistenport = 0listen_socket = /tmp/camd.socketWrong pmt_mode is a silent killer — NCam never gets the PMT, never requests an ECM, and the log just shows nothing happening for that channel. The box appears to freeze without any error. Different enigma2 images (OpenATV, OpenPLi, OpenViX, E2iPlayer) behave differently here.
Forcing the correct ECM PID when auto-detect picks the wrong one
This bites people most often when a channel carries both a primary and a backup ECM, or when FTA and encrypted audio share the same transport stream. NCam's dvbapi layer parses the PMT and sees multiple ECM PIDs. With debug 255, you'll see all of them listed. The log shows something like:
dvbapi: found 2 ECMpids for SID 0x1234: 0x0640 (CAID 0500) 0x0641 (CAID 0500)NCam picks the first one. If only the second is valid for your reader's provider, you'll get a CW back but it won't decrypt. Pin it explicitly with a four-field P: line as shown above. After a channel changes its broadcast parameters, old pin lines in ncam.dvbapi can point at ECM PIDs that no longer exist — the channel silently gets no ECM and you're back to black screen.
Permissions and the /tmp/camd.socket / dvbapi device path
On Linux-based STBs, NCam needs permission to write to /tmp/camd.socket and read from /dev/dvb/adapter0/ca0 (and demux nodes). If NCam runs as a non-root user, check that the user is in the video group and that the socket path is writable. A permission failure here causes NCam to silently not bind — you get the same black-screen symptom as a pmt_mode mismatch, but the log will show a socket bind error if you're watching at debug 255.
When the Card/Share Is the Problem, Not NCam
Once you've confirmed the dvbapi is working and an ECM is being requested and answered, but the channel still won't decode, the problem has moved upstream. This is the second half of any proper ncam cannot decode fix investigation.
ECM answered but CW invalid: wrong key, AES/CWPK, or tier
Some systems — Nagra variants, certain Conax implementations — layer an additional key on top of the CW. The reader returns what looks like a valid CW, NCam applies it, and the descrambler produces garbage. This is an AES or CWPK mismatch. The share has the right CAID and provider but a different key variant than what your content requires. You'll see the ECM complete successfully in the log but the stream doesn't decrypt. Fix: verify the exact CAID variant your channel uses (0500 and 0503 are different), and confirm the share explicitly covers that variant.
Missing tier is the other case: the card or account has CAID 0500 but not the specific subscription package that unlocks this channel. The ECM is answered (the card processes it) but returns a null or invalid CW. Some readers log this explicitly as cw not found.
BISS, Tunneling (constant CW) and Powervu special cases
BISS-encrypted channels and constant CW (tunneling) channels don't use ECMs at all. If you're trying to decrypt a BISS channel through the normal ECM path, you'll get a perpetual "cannot decode" because there's no ECM to answer. BISS keys go in ncam.keys or SoftCam.Key depending on your image, using the standard format for the SID. PowerVU is similar — it needs specific handling and the right key file, not a cardsharing reader.
If your channel is BISS and you're debugging it as an ECM failure, you're debugging the wrong thing entirely.
Latency, ecm timeout and 'cw too late' decode failures
In [global] of ncam.conf, ctimeout = 1500 sets the maximum milliseconds NCam waits for a CW. If the share takes 1600ms to respond, the CW arrives after ctimeout and gets discarded. The log shows cw too late or similar. The channel stays black even though the key was technically correct.
Tuning: you can raise ctimeout to 2500ms as a test, but the real fix is a faster share or fewer hops. On CCC readers, cccmaxhops controls how many resharing nodes the ECM traverses — every hop adds latency. Set it to 1 or 2 if you can. ccckeepalive = 1 prevents connection renegotiation latency on keepalive-capable servers.
Reader matching: localcards, ccc/cccam reader, group/services
NCam's services and group filters in ncam.server and ncam.user can silently block a SID from a reader. If you set up a services whitelist or a SID table in ncam.services (sidtab) and the current channel isn't in it, NCam won't route the ECM to that reader. The reader shows as online. The CAID matches. But the SID is filtered out before the ECM is ever sent. Check services = and group = lines in your reader config and verify the channel SID is allowed.
Step-by-Step Diagnostic Checklist
Run these in order. Each step tells you exactly which layer is broken. This is the systematic ncam cannot decode fix process — don't skip steps even if you think you know the answer.
Confirm reader is online and has the right CAID
- Open webif → Readers. Confirm status is green/connected, not red.
- Check the reader's CAID list includes the exact CAID of your channel. 0500 ≠ 0503 ≠ 0504.
- If using a CCC/CCcam reader in
ncam.server, verifyprotocol = cccam, correct host/port, and thatuser/passwordmatch the server side exactly — including case. - Check
group =on the reader andgroup =on the user account. They must share at least one group number.
Confirm dvbapi requests the ECM (not silent)
- Set
debug = 255, tune to the failing channel, check live log within 10 seconds. - Look for
dvbapi: got PMTor equivalent. If absent, NCam isn't receiving the PMT — wrongpmt_modeor socket path. - Look for ECM PID line showing the CAID and PID NCam selected. If absent after PMT is seen, check I: lines in
ncam.dvbapiblocking that CAID. - Confirm the socket
/tmp/camd.socketexists and is writable by the NCam process.
Confirm a CW returns and its timing
- In the log, find the ECM request line, then look for the CW response line showing timing (e.g.,
ecm time: 342ms). - If no CW response: the reader got the ECM but couldn't answer it. Check tier/subscription on the card, or CAID:provid mismatch on a share.
- If CW response exists but timing is >1500ms: you're hitting
ctimeout. Test withctimeout = 3000in[global]temporarily. - If CW response is fast and clean but channel still doesn't decode: AES/CWPK mismatch, wrong ECM PID, or BISS/constant CW channel being mishandled.
Isolate one channel/CAID at a time
- Test with a known channel on the same CAID that should work. If that also fails, the problem is the reader/share, not the specific channel.
- If only one channel fails: check for a unique ECM PID situation or a SID that's in a different subscription tier.
- If all channels on one CAID fail: reader is connected but not authorized for that CAID.
- If all channels on all CAIDs fail: dvbapi binding is broken at the socket/pmt_mode level.
If every step above checks out — reader online, correct CAID, ECM requested, fast CW returned — but decode still fails, you're looking at a key/tier/stream issue, not an NCam configuration problem. The fix is on the source side, not in your config files.
FAQ
Why does NCam say "cannot decode" but the reader shows as online?
Reader online just means the TCP connection is alive. Actual decoding needs three more things to go right: the reader must match on CAID:provid, the card/share must have the right subscription tier for that channel, and the CW must arrive before ctimeout expires. Run the ECM trace in debug 255 and check whether a CW actually returned versus just a connection being present.
How do I find the correct ECM PID for a channel in NCam?
Set debug = 255 in [global] and tune to the channel. The dvbapi layer logs every ECM PID found in the PMT along with its CAID. Identify which PID is valid for your reader's provider, then pin it with a four-field P: line in ncam.dvbapi: P: CAID:provid:SID:ecmpid. This is especially useful after a channel retune where NCam is auto-selecting the wrong PID from multiple options.
What does "cw not found" or "no cw" differ from "cannot decode"?
"No cw" means no control word was returned at all — the reader either didn't match or the card/share couldn't answer the ECM. That's a source problem. "Cannot decode" means a CW was returned but failed to unscramble the stream — which points to wrong key variant, wrong ECM PID, late timing, or AES/CWPK mismatch. The two errors need completely different fixes, and confusing them is why most "restart NCam" advice wastes time.
Which pmt_mode should I use for enigma2 boxes?
pmt_mode = 6 with listen_socket = /tmp/camd.socket works for most current enigma2 images including OpenATV and OpenPLi. If NCam logs show no PMT being received despite the channel being tuned, try pmt_mode = 4 or pmt_mode = 0. Wrong pmt_mode is completely silent — NCam doesn't log an error, it just never gets the PMT, never requests an ECM, and the channel stays black with no useful log output at all.
Can a slow share cause a decode failure even with the right key?
Yes, and this is more common than people realize. If the ECM response time exceeds ctimeout (default 1500ms in [global]), the CW is discarded even if it's correct. The log may show cw too late. Test by temporarily raising ctimeout = 3000 — if the channel suddenly works, latency is your problem. The real fix is reducing hop count with cccmaxhops or using a faster source, not just raising the timeout indefinitely.
Does "cannot decode" mean my configuration is wrong or the card is wrong?
Either — and the only way to tell is to follow the ECM trace. If dvbapi never requests an ECM, it's a config problem (pmt_mode, socket, I: filter). If an ECM is requested and a CW returns but decode fails, it's a key/tier/PID problem on the source side. The diagnostic checklist above separates these cleanly. Skipping the trace and guessing wastes hours.