Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Hitag#2658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
blackvault88 wants to merge25 commits intoflipperdevices:dev
base:dev
Choose a base branch
Loading
fromblackvault88:hitag
Open

Hitag#2658

blackvault88 wants to merge25 commits intoflipperdevices:devfromblackvault88:hitag

Conversation

@blackvault88
Copy link

@blackvault88blackvault88 commentedMay 10, 2023
edited
Loading

What's new

  • Included support for RTF (Reader Talks First) mode in RFID app, both for read & emulate modes.
  • Included the Hitag1 protocol as first RTF protocol (more to come later, like Hitag2, HitagS) supporting read & emulate of public non encrypted pages
  • Updated the RFID scenes & views accordingly
  • Updated the RFID key file save & load functions, by adding 'Hitag1 specific data' after the general section (fully backwards compatible with existing keys)

Verification

  • Run RFID app and read/emulate/save/view/edit any of the already supported protocols
  • Run RFID app and read/emulate/save a new Hitag1 card
  • Run RFID app and emulate/view/edit a saved Hitag1 card (sample key files for verification are added below)
    sampleHitag1.zip

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

wosk, imash05, and AtharWulf reacted with thumbs up emojisemrekkers and brotkastn reacted with heart emojiimash05 reacted with eyes emoji
@hedgerhedger added RFID 125kHz125, 134 kHz RFID UIAffects UI New FeatureContains an IMPLEMENTATION of a new feature labelsMay 11, 2023
@blackvault88
Copy link
Author

hey@hedger ,@DrZlo13 ,@nminaylov ,@skotopes ,
any action required from my side?
forgive my ignorance, this is my first contribution to an open source project

@skotopes
Copy link
Contributor

Scheduled on next release

blackvault88 reacted with thumbs up emoji

@skotopes
Copy link
Contributor

Waiting for hardware to verity, moving to next release

@skotopes
Copy link
Contributor

Sorry for delay. This PR requires some extra spaces that we planning to free in 0.87 release.

@blackvault88
Copy link
Author

not sure if I understand what you mean with extra spaces (extra memory space?)

but no worries, just let me know when you plan to pick this up, since I've seen that meanwhile furi_hal_rfid has undergone some changes with the FuriHal bus abstraction. and I might need to rewrite some code to make it compatible again

no point in continuously keeping it updated with all intermediate commits, I'd rather do a final update when it's relevant...

hitoshi-5963 reacted with thumbs up emoji

@skotopes
Copy link
Contributor

I'll post update as soon as we free enough space

@skotopes
Copy link
Contributor

We are ready to merge this PR, please merge dev and update to match new API. There were couple changes that may require change in furi_hal_rfid, please ping@DrZlo13 to get more details

@blackvault88
Copy link
Author

alright, on it.
reviewing the furi_hal_rfid changes, though I suspect there's some thread handling changes as well I might need to catch up with
any advice on where to search for this/whom to contact?

@skotopes
Copy link
Contributor

@blackvault88 feel free to ping@DrZlo13

@blackvault88
Copy link
Author

thx, though not needed anymore, seems as if the thread updates which I was referring to (#2637 ) have no impact on my coding

meanwhile I updated my code to comply with the bus abstraction (#2614 ). it builds and runs nicely on my FD.
reading is working as it should
emulation is running without errors, though haven't had the time yet to test it with a reader, hope to do that over the weekend...

if successful, I'll recommit the updates

@blackvault88
Copy link
Author

blackvault88 commentedJul 17, 2023
edited
Loading

@skotopes ,@DrZlo13

tested and recommitted, ready for your review/approval

fyi, there seems to be some other changes in the firmware that have a negative on the successrate of the hitag emulation mode.
when built on the dev branch at time of my first developments (May 10th) the hitag emulation yielded results in +/2-5 seconds
when built on current dev branch the same coding for emulation only yields results somewhere after 10-30s (meaning that the reader which I'm testing with needs quite a few tries to successfully read the pages consecutively without issues).

note: to check if it is related to my coding updates or to other changes in the firmware, I also rewrote and built the code to match the dev branch at time of that first deep sleep mode release and that also has the same negative impact.
not 100% sure if it is related to that deep sleep setup, since also running in legacy seems to have the same 10-30s success rate, but it does make me quite sure that there's some 'external' impact on how my code gets executed which impacts the emulation mode.

I would welcome a critical eye that might know what could impact the coding in my emulation routines
for now, it's a working version with 100% successrate on the reading, and some successrate on the emulation

@blackvault88
Copy link
Author

blackvault88 commentedAug 16, 2023
edited
Loading

  • I have bunch of tags: one of them is forever reading(really small one, cable marking type), 2 otherpages read: 50/64. Do your tags behave same?

50/64 is expected behavior: there's a minimum of 14 non-public (encrypted) pages on a HITAG 1 tag.
current functionality is reading the public (non encrypted) pages only, which could be anything between 34 & 50 pages.

About the one that is reading forever, are you sure it's a HITAG 1 and not a HITAG 2 or HITAG u or HITAG S?
Does it detect an ID and then get's stuck reading the pages, or does it not detect anything at all?
can you check the debug log while reading?
it should give out something like this:

6373214 [D][LFRFIDWorker] Start ASK6373219 [D][DolphinState] icounter 1017, butthurt 06373677 [D][LFRFIDWorker] Read started6376986 [D][LFRFIDWorker] Read stopped6377041 [D][LFRFIDWorker] Start PSK6377503 [D][LFRFIDWorker] Read started6379522 [D][LFRFIDWorker] Read stopped6379576 [D][LFRFIDWorker] Start RTF6379579 [D][DolphinState] icounter 1018, butthurt 06379587 [D][LFRFIDWorker] Read started6380900 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] found6380902 [D][DolphinState] icounter 1021, butthurt 06381562 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] config page read6381565 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 1 not public/readible6381567 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 2 not public/readible6381570 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 3 not public/readible6382048 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 4 read6382507 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 5 read6382917 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 6 read6383327 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 7 read6383721 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 8 read6384164 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 9 read6384574 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 10 read6384968 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 11 read6385378 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 12 read6385805 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 13 read6386199 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 14 read6386624 [D][LFRFIDHitagWorker] Hitag1, [34 80 68 A5] block 15 read6386671 [D][LFRFIDWorker] Read stopped
  • How emulation should be tested? Reading with another flipper barely detects it.

I've tested it using a real reader, though am also experiencing issues with readers taking up to 30s (sometimes a minute) prior to succesfully reading it since after the FZ firmware updates of May June (cf my post#2658 (comment) )
Though I have no idea what caused the sudden fallback in emulation results :(

@skotopes
Copy link
Contributor

image

Some PVS warnings that need to be addressed

@skotopes
Copy link
Contributor

As for emulation issues: difficult to say what exactly happened in June. There were some major changes in July, but not in June. If you can specify working commit in this branch then I can try to fix it.

Couple more things that prevents us from merging this PR:

  • TODO: we are currently cleaning up firmware by fixing all of them, please try to close as many as possible.
  • Worker source code: requires refactoring. Not like 2k lines of code are frightening us, but we clearly we'll be unable to maintain it in its current form. I see there multiple layers mixed it will be nice if they will be split into separate files.

@blackvault88
Copy link
Author

Ok, will look into the PVS warnings & my TODO notes

If you can specify working commit in this branch then I can try to fix it.

for the emulation results, I'll see if I can trace back in time to find latest version where emulation was yielding faster results

  • Worker source code: requires refactoring. Not like 2k lines of code are frightening us, but we clearly we'll be unable to maintain it in its current form. I see there multiple layers mixed it will be nice if they will be split into separate files.

I can easily split up the functional blocks into separate files, though one of the blocks would likely be positioned better into furi_hal_rfid, though that would also increase file size there... Any advice on what would be acceptable?

@skotopes
Copy link
Contributor

I can easily split up the functional blocks into separate files, though one of the blocks would likely be positioned better into furi_hal_rfid, though that would also increase file size there... Any advice on what would be acceptable?

Yes, everything related to low level should be in furi_hal_rfid, also it will speedup this code. Also@DrZlo13 may have some ideas.

@blackvault88
Copy link
Author

worker source code refactored and moved all low level code towards furi_hal_rfid

ready for your review and approval to merge@skotopes

@blackvault88
Copy link
Author

blackvault88 commentedOct 26, 2023
edited
Loading

and some good news on emulation mode:
emulation mode is back to normal result times (eg reader manages to read the full emulated tag in +/- 5s)

not sure if this is due to moving low level code to furi_rfid_hal or due to other changes elsewhere in firmware, but it's a nice extra :)

@skotopes
Copy link
Contributor

I'll take a look after we release 0.94

blackvault88 and hnesk reacted with thumbs up emoji

@blackvault88
Copy link
Author

hey@skotopes , how's the review going?

any input/changes required?

@skotopes
Copy link
Contributor

@blackvault88 yes, are you on discord? can we chat a little bit?

@blackvault88
Copy link
Author

@blackvault88 yes, are you on discord? can we chat a little bit?

nope, not active there, any alternative? eg the FZ forum?
if not, i can always create a discord account... let me know

@jOIDIJI
Copy link

hi error after write to original card please help me 100 euros gift for succes hack

need write my need to original card (
hi_plus
hi_key_0_1
Screenshot-20240609-150410
Screenshot-20240609-150417

@drussilla
Copy link

@blackvault88 appreciate your work on Hitag! Is there any plan to continue work on this PR?

@blackvault88
Copy link
Author

@blackvault88 appreciate your work on Hitag! Is there any plan to continue work on this PR?

hey@drussilla ,

it mainly depends on the FZ team. the source code was complete & working (as tested on local hardware). I had also restructured the coding as requested, but somehow it was never picked up.

I must say though that currently I do not have the time to further restructure the coding to get it in line with any other firmware updates done since December last year...

@EarthCow
Copy link

I just flashed this to my flipper and received an error telling me to update the firmware due to the API version being too new.

9EEBC078-DA60-4F9C-84DE-818B33AFAB63

Thanks for making this@blackvault88, I was excited to try it out. Sucks I wasn't able to check out the working version.

@semrekkers
Copy link

semrekkers commentedJan 3, 2025
edited
Loading

Thehitag branch (from@blackvault88) I am working on is relatively up-to-date with the flipperzero-firmware repository. However, it is based on the unleashed firmware. I was unable to fully test it because my test tag does not appear to be a Hitag1. That said, I was able to run the LFRFID app in RTF (Hitag1) mode.

My branch:semrekkers/fz-unleashed-firmware:hitag

@skotopes
Copy link
Contributor

We are ready to accept hitag if it will be in "Extra Actions" menu. Other than that requirements are the same: clear separation in HAL/worker.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@skotopesskotopesAwaiting requested review from skotopes

@DrZlo13DrZlo13Awaiting requested review from DrZlo13DrZlo13 is a code owner

@hedgerhedgerAwaiting requested review from hedgerhedger is a code owner

@nminaylovnminaylovAwaiting requested review from nminaylovnminaylov is a code owner

@gsurkovgsurkovAwaiting requested review from gsurkovgsurkov is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

New FeatureContains an IMPLEMENTATION of a new featureRFID 125kHz125, 134 kHz RFIDUIAffects UI

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@blackvault88@skotopes@jOIDIJI@drussilla@EarthCow@semrekkers@hedger

[8]ページ先頭

©2009-2025 Movatter.jp