Worked example: the backend rejects the card

The ocpp-rejected demo read step by step: an ISO 15118-2 AC session with external identification, in which the backend answers the OCPP Authorize with Invalid twice while the charger keeps telling the car Ongoing, until the car gives up after 61.5 s.

What you see

  • Load the demo Card rejected (ocpp-rejected). It loads two files: the capture of the cable, 64.7 s of an ISO 15118-2 AC session without TLS, and the OCPP 1.6 log the charger wrote to its backend on the same clock.
  • Stage strip: SLAC, SDP, TCP / TLS and Handshake passed; Setup failed; Parameters and everything after it not reached.
  • Two findings, both errors: TIM-02 and TC-02. The OCPP tool lists no transaction.

The verdict

Never charged, Authorization not granted, likely party EVSE, confidence medium. The explanation reads: authorization stayed Ongoing until the capture ended at 63.7 s, so the backend never approved the session. The chain of evidence is TIM-02, then TC-02.

Reading the capture step by step

  1. EVSE: ServiceDiscoveryRes, 1.968 s: ExternalPayment only
  2. EV: PaymentServiceSelectionReq, 2.030 s: ExternalPayment
  3. EV: AuthorizationReq, 2.140 s
  4. EVSE: AuthorizationRes, 2.188 s: OK, Ongoing
  5. both: AuthorizationReq and AuthorizationRes, every 2.05 s, always OK and Ongoing
  6. EVSE: AuthorizationRes, 63.688 s: the 31st answer, still Ongoing
  7. EV: TCP FIN, 64.640 s: the car closes the connection
  8. EVSE: TCP FIN, 64.670 s
TimeOCPP messageContent
Before SLACStatusNotification.req, charger to backendAvailable, then Preparing
2.400 sAuthorize.req, charger to backendidTag DEMO-RFID-07
2.610 sAuthorize.conf, backend to chargerstatus Invalid
23.100 sAuthorize.req, charger to backendidTag DEMO-RFID-07
23.290 sAuthorize.conf, backend to chargerstatus Invalid
67.140 sStatusNotification.req, charger to backendAvailable
  • On the cable everything looks healthy: every response is OK (SQ-05), the slowest comes after 58 ms (TIM-01), and the car polls at a steady pace. Only EVSEProcessing never changes.
  • The OCPP log shows what the cable does not: the backend answered the Authorize for DEMO-RFID-07 with Invalid 210 ms after it was sent, and again 190 ms after the second try. From 2.610 s on the charger knew the answer.
  • No StartTransaction.req follows and the connector goes from Preparing back to Available, so the backend never saw a transaction either.
  • TIM-02 reports that Authorization stayed Ongoing for 61.5 s, from 2.140 s to 63.640 s, against a limit of 60 s, and never reported Finished. TC-02 reports that the car closed the connection without a SessionStop.

tim.ongoingTimeoutS (60 s) is the ongoing timer of the profile and is flagged for verification. The timer of the car itself is not in the capture; here it closed the connection 0.95 s after the last answer.

What the cause is

  • The backend does not accept the identifier DEMO-RFID-07. Invalid means it does not know the token or does not allow it; the reason sits in the backend, not on the cable.
  • The charger then kept the car waiting. It never passed the refusal on, and kept answering Ongoing for a minute until the car gave up on its own. The car can only report a timeout, not a refused card.
  • The verdict names the charger because it held the session in Ongoing. That is correct for the cable; the refusal that started it came from the backend.

What to fix

  • In the backend, look up the token: unknown, blocked, expired or not allowed at this site. Register or unblock it, or give the driver a token that is valid here.
  • In the charger, end the wait when the backend has refused: answer AuthorizationRes with a FAILED response code instead of Ongoing, so the car stops at once and can tell the driver why.
  • If the charger is meant to wait for the driver to present another card, it should say so with EVSEProcessing Ongoing_WaitingForCustomerInteraction and show the refusal on its display.
  • The session stops at authorization covers the other ways a session stops at authorization, including Plug and Charge.

How to confirm the fix

  • With a valid token: Authorize.conf reads Accepted, the next AuthorizationRes reads Finished, ChargeParameterDiscoveryReq follows and the OCPP log gains a StartTransaction.req.
  • With a token the backend still refuses: AuthorizationRes answers FAILED right after the Authorize.conf. The verdict then reads FAILED response instead of Authorization not granted, and TIM-02 passes because the loop ends long before its limit.

Sources

  • ISO 15118-2:2014, Authorization, EVSEProcessing and the ongoing timer
  • OCPP 1.6, Authorize.req, Authorize.conf and IdTagInfo
  • SPEC.md of this tool, FR-ENC-05, the failing demo sessions