Charger Shows Online, Platform Says Offline: A Three-Layer Diagnosis
The screen is lit, the SIM has data, and the backend still shows the charger offline. An ordered diagnosis that finds the cause in under ten minutes.
A customer sends a photo: the charger’s screen is on, the signal bars are full, the logo is spinning, and the platform shows the station as offline. Somebody has already restarted it three times.
The diagnosis below is the one we run, in this order. It takes about ten minutes and it almost always ends at one of seven causes.
Why “online” means two different things
Before the layers: the charger and the platform disagree because they are measuring different things.
- The charger thinks it is online when its TCP socket to the backend is established. Some firmware goes further and requires a
Heartbeatresponse. - The platform thinks a charger is online when it has received a recent
BootNotificationand accepts the subsequentHeartbeatorTransactionEventtraffic — and marks it offline after a configurable timeout (typically 1.5× the heartbeat interval).
Everything in between — TLS, the WebSocket upgrade, the subprotocol, the path, the identity — can break one side’s definition without the other noticing. That is why the three-layer order matters.
Layer 1: network reachability
Goal: prove the charger can open a TCP connection to the backend host and port at all.
Checks, in order:
- DNS. Does the charger resolve
csms.example.com? Many industrial controllers have a hardcoded resolver and no fallback. If the site’s router hands out a captive-portal DNS, resolution silently fails. - Outbound 443. Corporate and hotel networks routinely block everything except 80/443, and some block long-lived connections. Test with a phone hotspot — it is the fastest way to eliminate the site network.
- NAT and session timeouts. A charger behind a router with a 5-minute NAT timeout and a 10-minute heartbeat interval will lose its mapping and never know. Symptom: connected for exactly five minutes, then dropped, repeat.
- SIM data plan. “Data exhausted” presents as a connected socket that transfers nothing. Check the operator portal, not the signal bars.
- Proxy interception. Some venues run transparent proxies that break WebSocket upgrades. If
curlworks but the charger does not, suspect this.
If this layer is clean, the socket opens. That is all layer 1 proves.
Layer 2: the WebSocket upgrade
Goal: prove the request that arrives at the backend is the request the backend expects.
This is where most cases die. Four things must match exactly:
① URL path
wss://csms.example.com/ocpp/CP-0001 ✅
wss://csms.example.com/ocpp/CP-0001/ ❌ (trailing slash — different resource)
wss://csms.example.com/ocpp16/CP-0001 ❌ (backend serves /ocpp/)
wss://csms.example.com/OCPP/CP-0001 ❌ (case matters)
② Charge point identity
The identity is the last path segment. It must match what the backend expects — and if your backend derives the tenant from the identity prefix, a wrong prefix means the station lands in the wrong account or nowhere.
Watch out for identities that look identical but are not: CP-0001, CP-0001 (trailing space), cp-0001, CP_0001. Some chargers append the serial number automatically; check what is actually in the message, not what the config screen shows.
③ Subprotocol
The upgrade request must carry:
Sec-WebSocket-Protocol: ocpp1.6 (or ocpp2.0.1)
and the response must echo it. A backend that accepts the socket without negotiating the subprotocol will receive messages and interpret them as the wrong version — or drop them. If the charger sends ocpp1.6 and the backend only handles ocpp2.0.1, you get a connection that opens and immediately closes with code 1002.
④ TLS trust
TLS failures are the worst category because chargers report them generically. A charger with an old CA bundle — common on hardware built around 2019–2021 — rejects a valid certificate and says “network error”.
Quick test from the backend side tells you which side is at fault:
echo | openssl s_client -connect csms.example.com:443 \
-servername csms.example.com 2>/dev/null | openssl x509 -noout -dates -issuer
If the chain is valid from a normal client but the charger rejects it, the charger’s trust store is the problem. Two fixes: install the intermediate CA on the charger, or issue from a CA the firmware already trusts. Do not fix this by disabling TLS verification — you will be doing it again in six months with a security audit attached.
How to see what the charger actually sent. Put a tiny logging server in front, or run wscat against the same URL from a laptop on the same network:
npx wscat -c "wss://csms.example.com/ocpp/CP-TEST-01" \
-s ocpp1.6 -H "Authorization: Basic $(printf 'CP-TEST-01:pass' | base64)"
If wscat connects and the charger does not, the difference is in the charger’s request — path, subprotocol, TLS, or identity.
Layer 3: OCPP message flow
The socket is up. Now check whether the conversation is correct.
① Did BootNotification arrive?
[2, "1", "BootNotification",
{ "chargePointVendor": "Acme", "chargePointModel": "AC-7kW",
"chargePointSerialNumber": "SN-88213", "firmwareVersion": "1.4.2" }]
If the socket is up and nothing arrives, the charger is waiting for something — sometimes for the backend to send a GetConfiguration first (unusual but real), sometimes because the OCPP module initialised before the network stack and gave up.
② Did the backend answer Accepted?
[3, "1", { "status": "Accepted", "currentTime": "2026-11-19T08:00:00Z",
"interval": 300 }]
A Rejected here means the backend does not know this identity — usually a provisioning bug, not a network one. Note that some chargers treat Rejected as fatal and stop retrying for an hour.
③ Is Heartbeat arriving on schedule?
Silence for longer than interval × 1.5 and a correct backend flips the station offline. Here is the subtle part: many chargers reconnect the WebSocket but skip BootNotification after a network blip. The socket is up, so the charger’s UI says online; the backend never sees a fresh boot, so it stays offline. You can confirm this by counting boots versus connections in your logs.
④ Is the clock sane?
A charger that is five minutes ahead will have its StartTransaction timestamp rejected or, worse, accepted and stored out of order, so the session appears to end before it started. Compare:
charger screen time vs date -u on the backend
Anything more than 30 seconds off is a bug. Stations without NTP configured drift for months and then “break” suddenly.
The seven causes, ranked by frequency
From our own support log, roughly in order:
| # | Cause | How it looks |
|---|---|---|
| 1 | Path or identity mismatch | Socket opens, closes immediately, or lands in the wrong account |
| 2 | Subprotocol not negotiated | Connection opens, closes with 1002, no messages |
| 3 | TLS trust failure | “Network error” with no detail; wscat works, charger does not |
| 4 | BootNotification skipped after reconnect | Socket up, platform offline, resolves on full power cycle |
| 5 | NAT / firewall timeout | Drops at a fixed interval, reconnects cleanly |
| 6 | Clock skew | Sessions with impossible timestamps, auth failures |
| 7 | Backend state machine bug | Heartbeats arrive, platform still shows offline — the bug is yours |
Number 7 deserves emphasis, because it is the one people refuse to consider. If Heartbeat frames are in your logs with valid payloads and the dashboard still shows a grey dot, stop debugging the charger. Check the timeout logic: a common bug is treating Heartbeat as activity but only updating the timestamp on StatusNotification, so an idle but perfectly healthy station ages out.
What to instrument so this takes two minutes next time
Four things, all cheap:
- Log the upgrade request — path, identity, subprotocol, TLS version, client certificate subject. One line per connection.
- Count boots, not connections. A station with 40 connections and 1 boot today is telling you something.
- Alert on “connected but no heartbeat for 2× interval” — this catches the silent half of the problem before the customer calls.
- Store the charger’s reported time on every message. Clock drift becomes visible instead of mysterious.
When you suspect the backend instead
If you want an independent reference station to compare against, point a virtual charge point at the same backend. If the virtual one is online and the real one is not, the difference is in the charger’s request; if both are offline, it is the backend.
Our free OCPP simulator does exactly that in a browser tab — it connects outbound to your CSMS with a normal ocpp1.6 / ocpp2.0.1 handshake and shows the raw JSON both ways. It is the fastest way to split “charger problem” from “platform problem”, and it is what we ask customers to do before opening a ticket.