Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hydranfc bbio #121

Merged
merged 3 commits into from
May 27, 2020
Merged

Add hydranfc bbio #121

merged 3 commits into from
May 27, 2020

Conversation

gvinet
Copy link
Contributor

@gvinet gvinet commented May 24, 2020

To be cleaner, I have created a branch for "Add special bbio mode for hydranfc #120" pull request with the code updated with your remarks.

Copy link
Collaborator

@Baldanos Baldanos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi ! Really nice (re-)work !

I made some comments in the review, let me know what you think.

Also, I was able to make it work using the following Python script :

In [1]: import pyHydrabus                                                                                         

In [2]: h = pyHydrabus.Hydrabus()                                                                                 

In [3]: h.write(b'\x0c') 
   ...: print(h.read(4))                                                                                          
b'NFC1'

In [4]: #Set ISO_14443A 
   ...: h.write(b'\x05')                                                                                          

In [5]: #Set RF on 
   ...: h.write(b'\x02')                                                                                          

In [6]: #Send REQA, get ATQA 
   ...: h.write(b'\x03\x26\x07') 
   ...: length = int.from_bytes(h.read(1), byteorder="little") 
   ...: print(f"{length:02d}  =>  {h.read(length)}")                                                              
02  =>  b'\x04\x00'

In [7]: #Send anticol, get ID 
   ...: h.write(b'\x04\x03\x00\x93\x20') 
   ...: length = int.from_bytes(h.read(1), byteorder="little") 
   ...: print(f"{length:02d}  =>  {h.read(length).hex()}")                                                        
05  =>  3fee983f76

src/hydranfc/hydranfc_bbio_reader.c Show resolved Hide resolved
@gvinet
Copy link
Contributor Author

gvinet commented May 27, 2020

I am updating my old https://github.com/gvinet/pynfcreader code also.

@Baldanos Baldanos merged commit 0264ac7 into hydrabus:master May 27, 2020
@Baldanos
Copy link
Collaborator

All good and merged.

Thanks for your contribution !

@bvernoux
Copy link
Member

Thanks for your contribution very good work !!

@Baldanos Baldanos self-assigned this May 27, 2020
@Baldanos
Copy link
Collaborator

I found an issue on the command numbers.
The BBIO_MODE_ID (0b00000001) was assigned to BBIO_NFC_RF_OFF. I reordered the command numbers in order to make the mode work like all the others.

This has been fixed in 9444937

@gvinet gvinet deleted the add_hydranfc_bbio branch May 28, 2020 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants