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

Does this code work with st25r3911b? #7

Closed
don41382 opened this issue Oct 11, 2020 · 21 comments
Closed

Does this code work with st25r3911b? #7

don41382 opened this issue Oct 11, 2020 · 21 comments

Comments

@don41382
Copy link

Hi guys,

does this library also works with the st25r3911b? I heard they have the same base api. I would appreciate any hint.

Cheers,
Felix

@cparata
Copy link
Contributor

cparata commented Oct 12, 2020

Hi @don41382 ,
when I developed this library some years ago, I started from an old version of the X-CUBE-NFC3 software package for CR95HF chip. Now the X-CUBE-NFC3 library has been reworked in order to be based on RFAL (RF Abstraction Layer) and also X-CUBE-NFC5 (that is for ST25R3911B chip) and X-CUBE-NFC6 (that is for ST25R3916 chip) now are based on RFAL as well. Also the NDEF library now is common to all ST NFC chips. So, we need to rework the X-NUCLEO-NFC03A1 library in order to be based on RFAL and the new NDEF library and in this way it should be easily ported also on X-NUCLEO-NFC05A1 and X-NUCLEO-NFC06A1. Unfortunately, I don't have bandwidth currently to rework this library. Any help will be appreciated and maybe in this way we can easily develop also the libraries for X-NUCLEO-NFC05A1 and X-NUCLEO-NFC06A1.
Best Regards,
Carlo

@don41382
Copy link
Author

don41382 commented Oct 12, 2020

Hi @cparata,

Thanks for your fast response. Having a working Arduino Library for the X-NUCLEO-NFC05A1 and X-NUCLEO-NFC06A1 would be great. Right now the MRC522 is dominating in the RFID with Arduino space, but I believe there are some really nice features which the ST25R3911B delivers (e.g. 1.4 Watt Output). In addition it would really help STM to grow into the maker space.

Let's see how I can help you. I am pretty new to SPI/Serial communication and C++ development. Time is limited too. In other words: I might not be the biggest help.

But maybe you can give some starting points. Maybe you can share some starting documentation on this.

Cheers,
Felix

@cparata
Copy link
Contributor

cparata commented Oct 12, 2020

Hi @don41382 ,
first of all, thanks a lot for your availability. I suggest to give a look at the following documents:
https://www.st.com/resource/en/user_manual/dm00282095-getting-started-with-the-xcubenfc3-near-field-communication-transceiver-software-expansion-for-stm32cube-stmicroelectronics.pdf , https://www.st.com/content/ccc/resource/technical/document/data_brief/group2/33/fe/85/bd/82/e0/4b/64/DM00624717/files/DM00624717.pdf/jcr:content/translations/en.DM00624717.pdf, https://www.st.com/content/ccc/resource/technical/document/data_brief/group2/75/1f/88/31/e6/d7/45/6c/DM00624040/files/DM00624040.pdf/jcr:content/translations/en.DM00624040.pdf , https://www.st.com/content/ccc/resource/technical/document/data_brief/group2/61/07/64/e4/51/c3/4e/1c/DM00624716/files/DM00624716.pdf/jcr:content/translations/en.DM00624716.pdf and the X-CUBE-NFC3 (https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-nfc3.html#documentation), X-CUBE-NFC5 (https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-nfc5.html) and X-CUBE-NFC6 (https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-nfc6.html) libraries available in ST.com in order to understand how the source code is organized. Then, if I have well understood the software architecture (I have given a quick look at the documents mentioned above), I would define an interface for RFAL (that in C++ it would mean a class with just "virtual" methods) taking into account the APIs contained in the files that you can find in the folder "Middlewares/ST/rfal/Inc" in one of the software package above. Then, I would define a class that implements this interface for each of the supported ST NFC reader chip (so, basically I would create a class for ST25R95, one for ST25R3911B and one for ST25R3916); obviously you can start to port the NFC reader chip that you prefer at the beginning. Then, I would create a common NDEF class for all ST NFC reader that depends on the RFAL interface. Finally, I would create a sample sketch that combines the usage of NDEF class and RFAL class like you can see in the X-CUBE examples. I suppose that it could be a difficult task for people that do not know very well C++ programming, but if we organize the code in this way, I think that we can write only one application that will work with all ST NFC reader shields with very small modifications. I hope that these tips can help you.
Best Regards,
Carlo

@don41382
Copy link
Author

Hi Carlo,

That sounds like a good plan (as far as I can tell).

I am currently trying to understand how the ST25R3911B-DISCO dev board is designed. You can download the sourcecode from the STM website. I think this is a good starting point for me to understand how they manage the communication. It has front facing STM32L476 which communicates with the ST25R3911B.

ST25R3911B-DISCO source code

Anyway, please go ahead and create the new structure. I try to walk the line and assist you.

Cheers,
Felix

@cparata
Copy link
Contributor

cparata commented Oct 13, 2020

Hi Felix,
as I said previously, at the moment I do not have bandwidth to work on that. I can come back to you as soon as I will have some time for it. Meantime, if you want to start to work on this topic, you are welcome.
Best Regards,
Carlo

@fpistm fpistm added this to To do in STM32duino libraries via automation Oct 13, 2020
@don41382
Copy link
Author

don41382 commented Jan 3, 2021

Hi Carlo,

happy new year to you! It's been a while and I was wondering if you already have some further / detailed planing for the start of the implentation?

I tried to implemnt the RFAL by myself, but I get stucked really fast. I would even pay someone to work on this.

Looking forward on some update from your side.

Cheers,
Felix

@cparata
Copy link
Contributor

cparata commented Jan 4, 2021

Hi Felix,
Happy New Year to you! I have a student that should start to work on this task in the next weeks. I hope to have a first implementation of the library by the end of March.
Best Regards,
Carlo

@don41382
Copy link
Author

don41382 commented Jan 5, 2021

Awesome news! Thanks for the update. Let me know, when he has the first commit ready!

@justinmerrell
Copy link

Just got the NFC reader - ST25R3916 evaluation board for the X-NUCLEO-NFC06A1
It looks like the current libraries need to be worked on, just wanted to see if there were any updates from this group to make sure I am adding to the latest efforts.

@cparata
Copy link
Contributor

cparata commented Feb 15, 2021

Hi @justinmerrell ,
as I said before, there is a student that is working on the porting of the ST25R3911B and the X-NUCLEO-NFC05A1. But his work is still at the early stage. So, it will take at least some weeks to have a first release of these libraries. After this porting based on the RFAL, we will work on the refactory of the NFC03 library and the porting of the NFC06 chipset always based on RFAL that is shared among all ST NFC reader chipsets.
Best Regards,
Carlo

@fpistm
Copy link
Member

fpistm commented Apr 26, 2021

Hi @cparata
Any update on this ?
Thanks by advance

@cparata
Copy link
Contributor

cparata commented Apr 26, 2021

Hi @fpistm ,
unfortunately, the student that worked on this library finished the internship. Now, I have a preliminary porting of the library based on RFAL, but it needs some rework to get it working. I will try to finish the job but I cannot work on it before end of June because I'm currently busy in other tasks.
Best Regards,
Carlo

@fpistm
Copy link
Member

fpistm commented Apr 26, 2021

Thanks @cparata for your feedback.

@justinmerrell
Copy link

Hi @fpistm ,
unfortunately, the student that worked on this library finished the internship. Now, I have a preliminary porting of the library based on RFAL, but it needs some rework to get it working. I will try to finish the job but I cannot work on it before end of June because I currently busy in other tasks.
Best Regards,
Carlo

Has the code they did write get added to github?

@cparata
Copy link
Contributor

cparata commented Apr 26, 2021

Hi @justinmerrell ,
if you want, I can create a repository for X-NUCLEO-NFC05A1 and then load the current code in my fork, so you can download and work on it. This code was derived from X-CUBE-NFC5 code but still misses some parts to be completed. Anyway, the code should be already organized in the RFAL classes in order to be used also on other ST NFC readers. My idea is to create a generic RFAL class that can be reused as much as possible. And I would like to make the same also for the NDEF class.
Best Regards,
Carlo

@cparata
Copy link
Contributor

cparata commented Apr 26, 2021

Hi @justinmerrell ,
here you can find the preliminary code. Any contribution to this library is welcome. I suggest to continue the development getting inspiration from the code that you can find in the X-CUBE-NFC5 package.
Best Regards,
Carlo

@fpistm
Copy link
Member

fpistm commented Apr 26, 2021

So I guess this issue can be closed ?

@justinmerrell
Copy link

So I guess this issue can be closed ?

Technically still as issue

@fpistm
Copy link
Member

fpistm commented Apr 26, 2021

Yes but my comprehension is that st25r3911b support will be provided by this library: https://github.com/cparata/X-NUCLEO-NFC05A1 not this one.

@cparata
Copy link
Contributor

cparata commented Apr 27, 2021

I agree with @fpistm . Actually this library is for another component (CR95HF) and the support to ST25R3911B is out of the scope of this library. The ST25R3911B component will be supported by X-NUCLEO-NFC05A1 library.
Best Regards,
Carlo

@fpistm fpistm closed this as completed Apr 27, 2021
STM32duino libraries automation moved this from To do to Done Apr 27, 2021
@cparata
Copy link
Contributor

cparata commented Aug 6, 2021

Hi all,
I'm glad to announce that the Arduino library to support the ST25R3911B component is quite ready. I was able to work on the preliminary code that you can find here and now it seems working fine on my side. You can try to play with the PollingTagDetect.ino application. By September, when I will come back from my holidays, I will package the library in the Arduino format, so I can publish it on the Arduino Library Manager.
Meantime, any feedback is appreciated.
Best Regards,
Carlo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

4 participants