Bug 448185 - SNCF physical ticket PDF417
Summary: SNCF physical ticket PDF417
Status: REPORTED
Alias: None
Product: KDE Itinerary
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Unspecified
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-09 22:49 UTC by Nils
Modified: 2022-01-10 16:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
whole ter ticket photo (1016.00 KB, image/jpeg)
2022-01-09 22:49 UTC, Nils
Details
ter brest st-brieuc (912.44 KB, image/jpeg)
2022-01-09 22:57 UTC, Nils
Details
tgv brest rennes (956.68 KB, image/jpeg)
2022-01-09 23:01 UTC, Nils
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nils 2022-01-09 22:49:54 UTC
Created attachment 145282 [details]
whole ter ticket photo

a physical ticket with a PDF417 barcode for a TER from St-Brieuc to Brest on 2022-01-01 for an under 26 years adult in 2nd class

It is a one-way ticket for any TER on that route on that day.
Comment 1 Nils 2022-01-09 22:57:43 UTC
Created attachment 145283 [details]
ter brest st-brieuc

TER from Brest to St-Brieuc on 2021-12-31 for any TER on that journey
Comment 2 Nils 2022-01-09 23:01:06 UTC
Created attachment 145284 [details]
tgv brest rennes

TGV ticket for  Brest-Rennes journey on train 8610 departing at 9h05 the 2022-01-03
Comment 3 Nils 2022-01-09 23:23:55 UTC
It would be nice to have a way to import such tickets via a photo or the barcode text read via other means.

There is an article (in french) about them and other on https://zestedesavoir.com/articles/3625/anatomie-dun-titre-de-transport-du-billet-a-la-carte-a-puce/#1-le-billet-cartonne-classique

They should be IATA-compatible, the norm they follow is available at https://www.era.europa.eu/sites/default/files/filesystem/tap/baseline_1.2.0_archive/era_technical_document_tap_b_6_v1.2.pdf

The ZXing library implements PDF417 decoding from pictures, it could be used as an example, I don't know if libre C++ libraries exist: https://github.com/zxing/zxing
Comment 4 Volker Krause 2022-01-10 16:49:53 UTC
Interesting material, this seems to be yet another type of barcode used by SNCF.

I can only decode the first two, zxing both on my workstation and on my phone fails on the third one unfortunately.

The first two contain a 171 byte binary payload in base64 encoding, which doesn't match the ERA SSB binary formats nor the ERA ELB format observed in TGV tickets (see also https://community.kde.org/KDE_PIM/KItinerary/SNCF_Barcodes). The latter is what the documents you linked to refer to as well, and which we already have support for.

So supporting this format depends mostly on either finding documentation about it, or getting a lot more samples hoping we can reverse-engineer it from those. That's a lot of work though, with no guarantee of success.