Message ID | 20210512144319.30852-1-krzysztof.kozlowski@canonical.com |
---|---|
State | New |
Headers | show |
Series | [1/2] MAINTAINERS: nfc: add Krzysztof Kozlowski as maintainer | expand |
Hi! On Wed, May 12, 2021 at 10:01:35AM -0700, Mark Greer wrote: > On Wed, May 12, 2021 at 05:32:35PM +0200, Frieder Schrempf wrote: > > On 12.05.21 16:43, Krzysztof Kozlowski wrote: > > > The NFC subsystem is orphaned. I am happy to spend some cycles to > > > review the patches, send pull requests and in general keep the NFC > > > subsystem running. > > > > That's great, thanks! > > > > Maybe you also want to have a look at the userspace side and talk to Mark Greer (on cc). He recently said, that he is supposed to be taking over maintenance for the neard daemon (see this thread: [1]) which currently looks like it's close to being dead (no release for several years, etc.). > > > > I don't know much about the NFC stack and if/how people use it, but without reliable and maintained userspace tooling, the whole thing seems of little use in the long run. Qt has already dropped their neard support for Qt 6 [2], which basically means the mainline NFC stack won't be supported anymore in one of the most common application frameworks for IoT/embedded. > > > > [1] https://lists.01.org/hyperkitty/list/linux-nfc@lists.01.org/thread/OHD5IQHYPFUPUFYWDMNSVCBNO24M45VK/ > > [2] https://bugreports.qt.io/browse/QTBUG-81824 > > Re: QT - I've already talked to Alex Blasche from QT (CC'd). With some > work we can get Linux NFC/neard back into their good graces. I/we need > to find time to put in the work, though. > > An example of the issues they have seen is: > > https://bugreports.qt.io/browse/QTBUG-43802 > > Another issue I have--and I suspect you, Krzysztof, have as well--is > lack of hardware. If anyone reading this wants to volunteer to be a > tester, please speak up. > Glad to see that Linux NFC might be somewhat less dead now :) I have a couple of "recycled" smartphones running mainline Linux and some of them do have NFC chips. I have two with NXP PN547 (supported by nxp,nxp-nci-i2c), one with Samsung S3FWRN5 (samsung,s3fwrn5-i2c) and even one with Broadcom BCM2079x I think (this one does not have a driver for the Linux NFC subsystem sadly). +Cc phone-devel@vger.kernel.org, in case other people there are interested in NFC :) The NXP/Samsung ones seems to work just fine. However, since there are barely any userspace tools making use of Linux NFC all my testing so far was limited to polling for devices with "nfctool" and being happy enough when it realizes that I hold some NFC tag close to the device. :S I would be happy to do some more testing if someone has something useful that can be tested. However, I guess ideally we would have someone who actually uses Linux NFC actively for some real application. :) The QT integration might be useful for people running postmarketOS [1] on these smartphones, but so far I haven't really seen any useful NFC Qt applications either. :/ Thanks! Stephan [1]: https://postmarketos.org
On Thu, May 13, 2021 at 01:49:53PM +0200, Stephan Gerhold wrote: > Hi! Hi Stephan and thanks for stepping up. > I have a couple of "recycled" smartphones running mainline Linux > and some of them do have NFC chips. I have two with NXP PN547 > (supported by nxp,nxp-nci-i2c), one with Samsung S3FWRN5 > (samsung,s3fwrn5-i2c) and even one with Broadcom BCM2079x I think > (this one does not have a driver for the Linux NFC subsystem sadly). > > +Cc phone-devel@vger.kernel.org, in case other people there are > interested in NFC :) > > The NXP/Samsung ones seems to work just fine. However, since there are > barely any userspace tools making use of Linux NFC all my testing so far > was limited to polling for devices with "nfctool" and being happy enough > when it realizes that I hold some NFC tag close to the device. :S There is a user-level daemon that is the counterpart for the in-kernel NFC subsystem. It is called neard and is available here: git://git.kernel.org/pub/scm/network/nfc/neard.git There are a few test script in it that will let you read and write NFC tags, and do some other things. We can add some more tests to that set as we go. > I would be happy to do some more testing if someone has something useful > that can be tested. However, I guess ideally we would have someone who > actually uses Linux NFC actively for some real application. :) Ideally, you should have some NFC tags of various types. Types 2, 3, 4A, 4B, and 5 tags are supported. Peer-to-peer mode is supported too so you should be able to transfer data from one of your phones to the other over NFC (and do a BT hand-over, if you're interested). Note that the specified range for NFC is only 4 cm and poor antenna design, etc. means that the actual range is usually much less (e.g., they amost have to touch). Also note that there are timing constraints so you may need to make the scheduling priority of the interrupt thread of your NFC driver real-time. Mark --
On Thu, May 13, 2021 at 07:48:55AM -0700, Mark Greer wrote: > On Thu, May 13, 2021 at 01:49:53PM +0200, Stephan Gerhold wrote: > > I have a couple of "recycled" smartphones running mainline Linux > > and some of them do have NFC chips. I have two with NXP PN547 > > (supported by nxp,nxp-nci-i2c), one with Samsung S3FWRN5 > > (samsung,s3fwrn5-i2c) and even one with Broadcom BCM2079x I think > > (this one does not have a driver for the Linux NFC subsystem sadly). > > > > +Cc phone-devel@vger.kernel.org, in case other people there are > > interested in NFC :) > > > > The NXP/Samsung ones seems to work just fine. However, since there are > > barely any userspace tools making use of Linux NFC all my testing so far > > was limited to polling for devices with "nfctool" and being happy enough > > when it realizes that I hold some NFC tag close to the device. :S > > There is a user-level daemon that is the counterpart for the in-kernel > NFC subsystem. It is called neard and is available here: > > git://git.kernel.org/pub/scm/network/nfc/neard.git > > There are a few test script in it that will let you read and write NFC > tags, and do some other things. We can add some more tests to that set > as we go. > Yeah, I packaged that for Alpine Linux / postmarketOS. "nfctool" also comes from "neard" as far as I can tell :) I think I also played with the Neard test scripts a bit at some point, and managed to read some NFC tag thing inside an old Yubikey NEO that I found, but didn't really know what else to do. > > I would be happy to do some more testing if someone has something useful > > that can be tested. However, I guess ideally we would have someone who > > actually uses Linux NFC actively for some real application. :) > > Ideally, you should have some NFC tags of various types. Types 2, 3, > 4A, 4B, and 5 tags are supported. Peer-to-peer mode is supported too > so you should be able to transfer data from one of your phones to the > other over NFC (and do a BT hand-over, if you're interested). > I guess this is where I kind of lack hardware as well at the moment, I don't have any programmable NFC tags at the moment (although I guess those should be quite cheap). I might play with the peer-to-peer mode a bit when I find time. > Note that the specified range for NFC is only 4 cm and poor antenna > design, etc. means that the actual range is usually much less (e.g., > they amost have to touch). Also note that there are timing constraints > so you may need to make the scheduling priority of the interrupt thread > of your NFC driver real-time. > Yeah I noticed, always need to search for a while to find the right spot on the phone. :) Stephan
On Thu, May 13, 2021 at 05:37:19PM +0200, Stephan Gerhold wrote: > On Thu, May 13, 2021 at 07:48:55AM -0700, Mark Greer wrote: > > On Thu, May 13, 2021 at 01:49:53PM +0200, Stephan Gerhold wrote: > > > I have a couple of "recycled" smartphones running mainline Linux > > > and some of them do have NFC chips. I have two with NXP PN547 > > > (supported by nxp,nxp-nci-i2c), one with Samsung S3FWRN5 > > > (samsung,s3fwrn5-i2c) and even one with Broadcom BCM2079x I think > > > (this one does not have a driver for the Linux NFC subsystem sadly). > > > > > > +Cc phone-devel@vger.kernel.org, in case other people there are > > > interested in NFC :) > > > > > > The NXP/Samsung ones seems to work just fine. However, since there are > > > barely any userspace tools making use of Linux NFC all my testing so far > > > was limited to polling for devices with "nfctool" and being happy enough > > > when it realizes that I hold some NFC tag close to the device. :S > > > > There is a user-level daemon that is the counterpart for the in-kernel > > NFC subsystem. It is called neard and is available here: > > > > git://git.kernel.org/pub/scm/network/nfc/neard.git > > > > There are a few test script in it that will let you read and write NFC > > tags, and do some other things. We can add some more tests to that set > > as we go. > > > > Yeah, I packaged that for Alpine Linux / postmarketOS. > "nfctool" also comes from "neard" as far as I can tell :) > > I think I also played with the Neard test scripts a bit at some point, > and managed to read some NFC tag thing inside an old Yubikey NEO > that I found, but didn't really know what else to do. Yeah, there isn't a whole lot you can do but beyond reading/writing tags and peer-to-peer, there are things like Bluetooth and Wifi handover, Android Application Record support, and at least some support for Secure Engine. > > > I would be happy to do some more testing if someone has something useful > > > that can be tested. However, I guess ideally we would have someone who > > > actually uses Linux NFC actively for some real application. :) > > > > Ideally, you should have some NFC tags of various types. Types 2, 3, > > 4A, 4B, and 5 tags are supported. Peer-to-peer mode is supported too I should have mentioned type 1 as well but I don't have the hardware to test it. > > so you should be able to transfer data from one of your phones to the > > other over NFC (and do a BT hand-over, if you're interested). > > > > I guess this is where I kind of lack hardware as well at the moment, > I don't have any programmable NFC tags at the moment (although I guess > those should be quite cheap). I might play with the peer-to-peer mode > a bit when I find time. Please let me/us know how it goes. > > Note that the specified range for NFC is only 4 cm and poor antenna > > design, etc. means that the actual range is usually much less (e.g., > > they amost have to touch). Also note that there are timing constraints > > so you may need to make the scheduling priority of the interrupt thread > > of your NFC driver real-time. > > > > Yeah I noticed, always need to search for a while to find the right spot > on the phone. :) Yeah, it can be an Easter egg hunt on many phones. :) Mark --
Le vendredi 14 mai 2021 à 08:23 -0700, Mark Greer a écrit : > On Thu, May 13, 2021 at 05:37:19PM +0200, Stephan Gerhold wrote: > > On Thu, May 13, 2021 at 07:48:55AM -0700, Mark Greer wrote: > > > On Thu, May 13, 2021 at 01:49:53PM +0200, Stephan Gerhold wrote: > > > > I have a couple of "recycled" smartphones running mainline Linux > > > > and some of them do have NFC chips. I have two with NXP PN547 > > > > (supported by nxp,nxp-nci-i2c), one with Samsung S3FWRN5 > > > > (samsung,s3fwrn5-i2c) and even one with Broadcom BCM2079x I think > > > > (this one does not have a driver for the Linux NFC subsystem sadly). > > > > > > > > +Cc phone-devel@vger.kernel.org, in case other people there are > > > > interested in NFC :) > > > > > > > > The NXP/Samsung ones seems to work just fine. However, since there are > > > > barely any userspace tools making use of Linux NFC all my testing so far > > > > was limited to polling for devices with "nfctool" and being happy enough > > > > when it realizes that I hold some NFC tag close to the device. :S > > > > > > There is a user-level daemon that is the counterpart for the in-kernel > > > NFC subsystem. It is called neard and is available here: > > > > > > git://git.kernel.org/pub/scm/network/nfc/neard.git > > > > > > There are a few test script in it that will let you read and write NFC > > > tags, and do some other things. We can add some more tests to that set > > > as we go. > > > > > > > Yeah, I packaged that for Alpine Linux / postmarketOS. > > "nfctool" also comes from "neard" as far as I can tell :) > > > > I think I also played with the Neard test scripts a bit at some point, > > and managed to read some NFC tag thing inside an old Yubikey NEO > > that I found, but didn't really know what else to do. > > Yeah, there isn't a whole lot you can do but beyond reading/writing > tags and peer-to-peer, there are things like Bluetooth and Wifi > handover, Android Application Record support, and at least some > support for Secure Engine. Could sniffing and injection work, like for wifi ? Guess that depends on specific chip drivers, and libpcap support for sniffing ? https://wiki.wireshark.org/SampleCaptures#Radio_Frequency_Identification_.28RFID.29.2C_and_Near-Field_Communication_.28NFC.29 https://code.google.com/archive/p/wireshark-nfc/
On 12/05/2021 18:49, Mark Greer wrote: > On Wed, May 12, 2021 at 11:43:13AM -0400, Krzysztof Kozlowski wrote: >> On 12/05/2021 11:11, Daniel Lezcano wrote: >>> On 12/05/2021 16:43, Krzysztof Kozlowski wrote: >>>> The NFC subsystem is orphaned. I am happy to spend some cycles to >>>> review the patches, send pull requests and in general keep the NFC >>>> subsystem running. >>>> >>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> >>>> >>>> --- >>>> >>>> I admit I don't have big experience in NFC part but this will be nice >>>> opportunity to learn something new. >>> >>> NFC has been lost in the limbos since a while. Good to see someone >>> volunteering to take care of it. >>> >>> May I suggest to create a simple nfc reading program in the 'tools' >>> directory (could be a training exercise ;) >>> >> >> Noted, thanks. I also need to get a simple hardware dongle for this.... > > Krzysztof, the NFC portion of the kernel has a counterpart in userspace > called neard. I'm supposed to be maintaining it but I have next to no > time to do so. If you have spare cycles, any help would be appreciated. > > Anyway, in neard, there are some simple test scripts (python2 - I/we need > to update to python3). The current home of neard is: > > git://git.kernel.org/pub/scm/network/nfc/neard.git I guess none of us have problem of too much spare time :), so it took me a while before I looked at neard. With newer Gcc, neard did not even compile (which I am fixing now). I set up a fork: https://github.com/krzk/neard However I can give early disclaimer - playing with GLib userspace code is not something I am in long term interested. If this was written in Rust, would be different story. :) I also configured basic CI (or rather continuous building): https://github.com/krzk/neard/actions/runs/1014641944 However I still do not have proper testing setup. No hardware. Would be nice if Samsung. ST, NXP or Intel could spare some development board with the NFC chip supported by kernel. Till then, I will try the NFC simulator and virtual NCI drivers. My next plan for neard is to extend the CI. There is no way I (or anyone else I believe) can keep good quality of releases without automated checks. I'll add some more distros, clang and later many some linters or cppcheck. Best regards, Krzysztof
On Fri, Jul 09, 2021 at 11:24:41AM +0200, Krzysztof Kozlowski wrote: > On 12/05/2021 18:49, Mark Greer wrote: > > On Wed, May 12, 2021 at 11:43:13AM -0400, Krzysztof Kozlowski wrote: > >> On 12/05/2021 11:11, Daniel Lezcano wrote: > >>> On 12/05/2021 16:43, Krzysztof Kozlowski wrote: > >>>> The NFC subsystem is orphaned. I am happy to spend some cycles to > >>>> review the patches, send pull requests and in general keep the NFC > >>>> subsystem running. > >>>> > >>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > >>>> > >>>> --- > >>>> > >>>> I admit I don't have big experience in NFC part but this will be nice > >>>> opportunity to learn something new. > >>> > >>> NFC has been lost in the limbos since a while. Good to see someone > >>> volunteering to take care of it. > >>> > >>> May I suggest to create a simple nfc reading program in the 'tools' > >>> directory (could be a training exercise ;) > >>> > >> > >> Noted, thanks. I also need to get a simple hardware dongle for this.... > > > > Krzysztof, the NFC portion of the kernel has a counterpart in userspace > > called neard. I'm supposed to be maintaining it but I have next to no > > time to do so. If you have spare cycles, any help would be appreciated. > > > > Anyway, in neard, there are some simple test scripts (python2 - I/we need > > to update to python3). The current home of neard is: > > > > git://git.kernel.org/pub/scm/network/nfc/neard.git > > I guess none of us have problem of too much spare time :), so it took me > a while before I looked at neard. > > With newer Gcc, neard did not even compile (which I am fixing now). I > set up a fork: > https://github.com/krzk/neard > However I can give early disclaimer - playing with GLib userspace code > is not something I am in long term interested. If this was written in > Rust, would be different story. :) > > I also configured basic CI (or rather continuous building): > https://github.com/krzk/neard/actions/runs/1014641944 > > However I still do not have proper testing setup. No hardware. Would be > nice if Samsung. ST, NXP or Intel could spare some development board > with the NFC chip supported by kernel. Till then, I will try the NFC > simulator and virtual NCI drivers. > > My next plan for neard is to extend the CI. There is no way I (or anyone > else I believe) can keep good quality of releases without automated > checks. I'll add some more distros, clang and later many some linters or > cppcheck. Hi Krzysztof, I see you've been busy. Thanks for that. FYI, I made a repo on github some time back but never announced it. The only reason I mention it is because the name/link looks more official: https://github.com/linux-nfc/neard Let see what happens with permssion on kernel.org and go from there. Re: hardware - I don't have much reader hardware either. I almost exclusively use BeagleBone[Black] + RF Cape + trf7970atb. I also have a USB dongle with a pn533, FWIW. I do have a decent collection of NFC tags, though. I'll contact you privately to arrange to send some to you. For peer-to-peer testing, your smartphone probably has an NFC reader but you'll have to play around to find the sweet spot where they put the antenna (older phones were notoriously bad for NFC antenna design; newer ones are generally better). I will review your patch sets but the earliest I will get to them will be Sunday. Mark --
On 15/07/2021 20:34, Mark Greer wrote: > On Fri, Jul 09, 2021 at 11:24:41AM +0200, Krzysztof Kozlowski wrote: >> On 12/05/2021 18:49, Mark Greer wrote: >>> On Wed, May 12, 2021 at 11:43:13AM -0400, Krzysztof Kozlowski wrote: >>>> On 12/05/2021 11:11, Daniel Lezcano wrote: >>>>> On 12/05/2021 16:43, Krzysztof Kozlowski wrote: >>>>>> The NFC subsystem is orphaned. I am happy to spend some cycles to >>>>>> review the patches, send pull requests and in general keep the NFC >>>>>> subsystem running. >>>>>> >>>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> >>>>>> >>>>>> --- >>>>>> >>>>>> I admit I don't have big experience in NFC part but this will be nice >>>>>> opportunity to learn something new. >>>>> >>>>> NFC has been lost in the limbos since a while. Good to see someone >>>>> volunteering to take care of it. >>>>> >>>>> May I suggest to create a simple nfc reading program in the 'tools' >>>>> directory (could be a training exercise ;) >>>>> >>>> >>>> Noted, thanks. I also need to get a simple hardware dongle for this.... >>> >>> Krzysztof, the NFC portion of the kernel has a counterpart in userspace >>> called neard. I'm supposed to be maintaining it but I have next to no >>> time to do so. If you have spare cycles, any help would be appreciated. >>> >>> Anyway, in neard, there are some simple test scripts (python2 - I/we need >>> to update to python3). The current home of neard is: >>> >>> git://git.kernel.org/pub/scm/network/nfc/neard.git >> >> I guess none of us have problem of too much spare time :), so it took me >> a while before I looked at neard. >> >> With newer Gcc, neard did not even compile (which I am fixing now). I >> set up a fork: >> https://github.com/krzk/neard >> However I can give early disclaimer - playing with GLib userspace code >> is not something I am in long term interested. If this was written in >> Rust, would be different story. :) >> >> I also configured basic CI (or rather continuous building): >> https://github.com/krzk/neard/actions/runs/1014641944 >> >> However I still do not have proper testing setup. No hardware. Would be >> nice if Samsung. ST, NXP or Intel could spare some development board >> with the NFC chip supported by kernel. Till then, I will try the NFC >> simulator and virtual NCI drivers. >> >> My next plan for neard is to extend the CI. There is no way I (or anyone >> else I believe) can keep good quality of releases without automated >> checks. I'll add some more distros, clang and later many some linters or >> cppcheck. > > Hi Krzysztof, I see you've been busy. Thanks for that. > > FYI, I made a repo on github some time back but never announced it. The > only reason I mention it is because the name/link looks more official: > > https://github.com/linux-nfc/neard > > Let see what happens with permssion on kernel.org and go from there. For the kernel.org I think you need an account @kernel.org (which itself requires your key to be signed by someone), but I am not sure. I am happy to move entire development to github and keep kernel.org only for releases till some distro packages notice the change. If Github, then your linux-nfc looks indeed nicer. > Re: hardware - I don't have much reader hardware either. I almost > exclusively use BeagleBone[Black] + RF Cape + trf7970atb. I also have > a USB dongle with a pn533, FWIW. I do have a decent collection of NFC tags, > though. I'll contact you privately to arrange to send some to you. Thanks! I managed to do some testing with nfc-sim modules, although I am not sure how much is supported. > For peer-to-peer testing, your smartphone probably has an NFC reader but > you'll have to play around to find the sweet spot where they put the > antenna (older phones were notoriously bad for NFC antenna design; newer > ones are generally better). > > I will review your patch sets but the earliest I will get to them will > be Sunday. I just sent one more set :) Best regards, Krzysztof
On Fri, Jul 16, 2021 at 12:17:43PM +0200, Krzysztof Kozlowski wrote: > On 15/07/2021 20:34, Mark Greer wrote: > > On Fri, Jul 09, 2021 at 11:24:41AM +0200, Krzysztof Kozlowski wrote: > >> On 12/05/2021 18:49, Mark Greer wrote: > For the kernel.org I think you need an account @kernel.org (which itself > requires your key to be signed by someone), but I am not sure. Yeah, I just ran into this yesterday. You need a key signed by at least two people who already have k.o accounts. With that, and your name in the MAINTAINERS file, you can get an acct pretty quickly. I need to set that up and get some signatures. That will take a while for me. > I am happy to move entire development to github and keep kernel.org only > for releases till some distro packages notice the change. If Github, > then your linux-nfc looks indeed nicer. Okay, lets do that. I'm the owner so I can give permissions to whoever needs them (e.g., you :). > > I will review your patch sets but the earliest I will get to them will > > be Sunday. > > I just sent one more set :) Awesome, thanks. Mark --
On Fri, 16 Jul 2021 at 19:15, Mark Greer <mgreer@animalcreek.com> wrote: > > I am happy to move entire development to github and keep kernel.org only > > for releases till some distro packages notice the change. If Github, > > then your linux-nfc looks indeed nicer. > > Okay, lets do that. I'm the owner so I can give permissions to whoever > needs them (e.g., you :). Then please assign some to the account "krzk" on Github. Thanks! Best regards, Krzysztof
On Fri, Jul 16, 2021 at 08:17:31PM +0200, Krzysztof Kozlowski wrote: > On Fri, 16 Jul 2021 at 19:15, Mark Greer <mgreer@animalcreek.com> wrote: > > > I am happy to move entire development to github and keep kernel.org only > > > for releases till some distro packages notice the change. If Github, > > > then your linux-nfc looks indeed nicer. > > > > Okay, lets do that. I'm the owner so I can give permissions to whoever > > needs them (e.g., you :). > > Then please assign some to the account "krzk" on Github. Thanks! Done.
diff --git a/MAINTAINERS b/MAINTAINERS index cc81667e8bab..adc6cbe29f78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12899,8 +12899,9 @@ F: include/uapi/linux/nexthop.h F: net/ipv4/nexthop.c NFC SUBSYSTEM +M: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> L: netdev@vger.kernel.org -S: Orphan +S: Maintained F: Documentation/devicetree/bindings/net/nfc/ F: drivers/nfc/ F: include/linux/platform_data/nfcmrvl.h
The NFC subsystem is orphaned. I am happy to spend some cycles to review the patches, send pull requests and in general keep the NFC subsystem running. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- I admit I don't have big experience in NFC part but this will be nice opportunity to learn something new. I am already maintainer of few other parts: memory controller drivers, Samsung ARM/ARM64 SoC and some drviers. I have a kernel.org account and my GPG key is: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/tree/keys/1B93437D3B41629B.asc Best regards, Krzysztof --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)