flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Picopass: detect and show SE / SIO

Open pcunning opened this issue 2 years ago • 11 comments

What's new

  • Adds detection and display of SE/SR cards.

Verification

  • Install with picopass app
  • scan SE or SR card

Checklist (For Reviewer)

  • [ ] PR has description of feature/bug or link to Confluence/Jira task
  • [ ] Description contains actions to verify feature/bugfix
  • [ ] I've built this code, uploaded it to the device and verified feature/bugfix

cc: @bettse

pcunning avatar Sep 05 '22 04:09 pcunning

I was testing this out, but it seems to cause a hardfault on my flipper, the following is all that is shown in logs:

68149 [D][PicopassWorker] rfalPicoPassPollerReadBlock block 70
68160 [D][PicopassWorker] rfalPicoPassPollerReadBlock 70 a30303030003e017
68162 [D][PicopassWorker] rfalPicoPassPollerReadBlock block 71
68189 [E][PicopassWorker] rfalPicoPassPollerReadBlock error 4
68191 [E][PicopassWorker] picopass_read_card error 4
68194 [E][PicopassWorker] picopass_device_parse_credential error 4
68198 [E][PicopassWorker] picopass_device_parse_wiegand error 4

me0wday avatar Sep 07 '22 01:09 me0wday

Is that the beginning of the PicopassWorker logs? Do you see any other block data? Specifically the "aia" and "config" would be useful for getting more context. The data you see on block 70 is on block 6 for me. Is this a card (vs fob)? Can you tell us what it says after "HID iClass" on the bottom left side of the back of the card?

bettse avatar Sep 07 '22 01:09 bettse

Is that the beginning of the PicopassWorker logs? Do you see any other block data? Specifically the "aia" and "config" would be useful for getting more context. The data you see on block 70 is on block 6 for me. Is this a card (vs fob)? Can you tell us what it says after "HID iClass" on the bottom left side of the back of the card?

Sure, here is the start: It's a white card with the text "HID iCLASS"

67287 [D][PicopassWorker] config 0000000000000000
67291 [T][StorageAPI] File 0000C9D0 - 0000CD44 open (/int/.power.settings)
67300 [T][StorageAPI] File 0000C9D0 - 0000CD44 closed
67303 [T][StorageAPI] File/Dir 0000C9D0 free
67307 [D][PicopassWorker] aia ffffffffffffffff
67328 [D][PicopassWorker] rfalPicoPassPollerReadBlock block 2
67337 [D][PicopassWorker] rfalPicoPassPollerReadBlock 2 eeffffffffffffff
67341 [D][PicopassWorker] rfalPicoPassPollerReadBlock block 3
67351 [D][PicopassWorker] rfalPicoPassPollerReadBlock 3 ffffffffffffffff
67353 [D][PicopassWorker] rfalPicoPassPollerReadBlock block 4
67364 [D][PicopassWorker] rfalPicoPassPollerReadBlock 4 ffffffffffffffff
67367 [D][PicopassWorker] rfalPicoPassPollerReadBlock block 5
67377 [D][PicopassWorker] rfalPicoPassPollerReadBlock 5 ffffffffffffffff
67379 [D][PicopassWorker] rfalPicoPassPollerReadBlock block 6
67389 [D][PicopassWorker] rfalPicoPassPollerReadBlock 6 a30303030003e017

me0wday avatar Sep 07 '22 01:09 me0wday

It's a white card with the text "HID iCLASS"

Anything after that?

Does this happen consistently? The config being all 00 looks wrong, and I wonder at first if it was a bad read.

bettse avatar Sep 07 '22 01:09 bettse

@me0wday give the update a try and let us know if it's fixed.

pcunning avatar Sep 07 '22 02:09 pcunning

LGTM!

bettse avatar Sep 08 '22 00:09 bettse

HID iClass DP, it now says 255 bits and no info an when you try to load the saved file it says can not parse file. I have the same card saved without this PR and it says 37 bits and the 10 chars. Also how are you getting those logs? I'm using cli logs but nothing picopass related shows up.

FalsePhilosopher avatar Sep 08 '22 22:09 FalsePhilosopher

Would you be able to share your file and the debug logs? If not publicly feel free to email or DM on discord either @bettse or myself.

For logs set the log level to debug in settings and open the cli before reading.

pcunning avatar Sep 09 '22 00:09 pcunning

Would you be able to share your file and the debug logs? If not publicly feel free to email or DM on discord either @bettse or myself.

For logs set the log level to debug in settings and open the cli before reading.

Email sent with both files. using this PR 105367 [D][PicopassWorker] csn f0ce2c15feff12e0 105393 [D][PicopassWorker] config 0000000000000000 105403 [D][PicopassWorker] aia ffffffffffffffff 105418 [D][PicopassDevice] Unknown encryption 105421 [D][PicopassDevice] bitLength: 255

Email sent with a log of working prePR card read.

FalsePhilosopher avatar Sep 09 '22 00:09 FalsePhilosopher

Thank you for the data that should help! Looks like I might have a bug with the config data to work out.

pcunning avatar Sep 09 '22 00:09 pcunning

@FalsePhilosopher I think that should fix the issues you were seeing and also fix the root of the issue @me0wday was having.

pcunning avatar Sep 09 '22 03:09 pcunning

@pcunning may I ask you to rebase?

skotopes avatar Sep 15 '22 14:09 skotopes

@skotopes updated and working for me

pcunning avatar Sep 16 '22 02:09 pcunning

Sorry guys, been a while since I've had access to my Flipper, just gave this PR another try and it's working :)

me0wday avatar Sep 20 '22 00:09 me0wday