Strooom / PN7150

Library/Driver for NXP PN7150 NFC device
Other
24 stars 24 forks source link

License - dual or relicense? #18

Closed oddstr13 closed 1 week ago

oddstr13 commented 3 weeks ago

Hi,

Would you consider re-licensing this project to a license compatible with the GPLv3(+), or dual-licensing your project with one of the compatible licenses?

I am evaluating available NFC libraries for the Challenger RP2040 NFC board (PN7150), and stumbled over your library in the process.

The license I've chosen for my project is the GPLv3, which unfortunately is incompatible with CC-by-nc-sa, specifically the NonCommercial part.

GNU license comparison and comments on the CC-nc license

image

The other libraries I am currently evaluating are:

Strooom commented 3 weeks ago

Hi, thanks for reaching out to me.

First I need to inform you that the PN7150 is not recommended for new designs, it will be replaced bij the PN7160. My library is not (yet) supporting the PN7160 but I already got requests to see if it could be extended/modified to also support the latest HW.

Then about your license question: the reason I chose the CC license is because it really matches my philosophy:

This license does not allow to take the code for free, build it into a product and make lots of money with it. I think that 's not fair.

There is demo code from NXP, you can also use that in your project. But it will take lots of time to understand how it works.

Kind regards, P

oddstr13 commented 3 weeks ago

Yes, I saw #17

Right now I am intending on using a pre-built module, as I mentioned (product page here https://ilabs.se/product/challenger-rp2040-nfc-nfc-antenna/ ). My current plans involve less than 10 devices (~5 + probably a few prototypes), so any existing stock available in the supply chain is enough for my project, thanks for the heads up anyways :slightly_smiling_face:

My understanding of the NCI interface is that it exist to make code more portable across devices (unless you use the chip-specific bits), so I don't expect that to become a big issue in the future either.


The general philosophy behind my choice of GPLv3 is something along the lines of «pay it forward». I generally don't care too much about others earning money using my code (altho donations are appreciated).

The strong copyleft nature of the GPLv3 enforces that even if others end up using my code for a successful commercial product, they are forced to also share any improvements to the source code (primarily with their customers, but with no ability to limit its distribution). This would be similar to the ShareAlike part of your chosen CC license.

One problem you may face with the NonComercial part of the license is that if I made changes, it would go both ways, you would NOT be able to use my changes in a commercial product of your own, without my explicit permission (I'm not saying that would be a likely scenario, but it is a possibility).

If you're not interested regardless, I won't push the issue :slightly_smiling_face:


Been doing some more digging since opening this issue, and it looks like the ElectronicCats library (MIT license with CLA) has its origins from this project.

I'm not sure of how strong the link is, as I haven't compared the structure and code of pre- and post reorganization/rewrite, but some code was used for certain :confused:

The bulk of these changes seem to have happened in this PR: ElectronicCats/ElectronicCats-PN7150#9

The Electronic Cats library is the only one compatible with PN7* chips that is listed in the Arduino library index as far as I can tell.

Strooom commented 3 weeks ago

Ok, if it's a kind of pay it forward, then I can agree on this PN7150 library, also because it will be obsolete as soon as I have a PN7160 driver.

Some of my other projects have been sponsored by governments, and they explicitely require 'NC' use, in order to keep a level playing field for commercial products. But the PN7150 is not part of those, I wrote it to help a friend.

Initially I was also not worrying about others making money from my code, but then lately I saw a number of projects and companies getting into business trouble after other companies (mostly China) using their code, making a competing product very cheap but with bad quality and then destroying the business/market for everyone. So I am now a bit more of an evangelist of fairness in open-source.

So if you confirm that your GPLv3 license has that fairness, then I'm willing to add it to the PN7150 library.

oddstr13 commented 3 weeks ago

The GNU GPLv3 is (in-)famous for it's viral nature, forcing other projects that interact with it at a code level to adapt the same license. This means that with a GPLv3 library, any project that uses the library must also be distributed under the terms of the GPLv3. It is, by design, completely incompatible with proprietary projects. This means, that while the GPLv3 does not prohibit commercial usage, people who would prefer to keep their code proprietary and hidden avoid GPL licensed code.

I think this aligns very well with publicly funded software, where the money used is expected to benefit the taxpayers who ultimately funded it.

I find the bullet-points on choosealicense.com to be helpful for explaining the overview of the license in simple terms, hover over them for a longer description.

https://choosealicense.com/licenses/gpl-3.0/

If you would prefer allowing proprietary (closed) code to also use the library, I could suggest one of the following;

Both are compatible with the GPLv3, in that it is not a problem combining code using either – the resulting distributed project/product falls under the GPLv3.

@DavidTruyens also has some contributions to this repository, so a relicense would have to be agreed on by them (or their changes potentially be removed from the codebase).

If you land on the GPLv3, one question that would need answering is whether you want GPL-3.0-or-later or GPL-3.0-only, that is, do you wish to permit users to upgrade to a later version of the license when the Free Software Foundation publish an updated revision of the license, or to stay with GPL-3.0 until all contributors agree on a new re-license. I would recommend GPL-3.0-or-later, mainly because re-licensing a project with many contributors for a potential future 3.1 or 4.0 is a big hassle (An example of a project that is stuck with GPLv2, due to the sheer number of contributors over the years, is the Linux kernel.)

I can submit a pull-request with the practical changes required for relicensing (or dual-license, if you would prefer to let users choose between the current license and the new one).

oddstr13 commented 3 weeks ago

As for Chinese companies making cheap clones and violating license terms / copyright, I don't think there is much we as individuals can do about that. It is from my understanding (in part) a deeper cultural issue in China - cheating to get ahead is apparently considered acceptable, be it video games, education, or other areas of life. (I couldn't find the video which had a good presentation on this, that I watched a while back.)

A NonComercial clause on the code, or even the GPL license won't stop that, unfortunately. I think the best thing we can do, is to make good products, and clearly differentiate on quality. Make sure we produce products that solve problems well, and keep the end users best interests in mind.

I personally think this includes high repairability, right-to-repair compatible practices and modular, upgradable design where appropriate. This includes using free and open standards, open source software & firmware, and, preferably also open source hardware.

If you base your business around the community using, modifying and sharing, Chinese clones may not be that big of an impact – that likely depends a bit on your target demographic tho. One notable successful example that I'm aware of, is Prusa Research, the 3D printer manufacturer. Another, up-and-coming project that I am aware of is Opulo with it's pick-and-place machine. The list of successful open source software packages is far longer, and you're likely already aware of quite a few of those.

oddstr13 commented 1 week ago

Have you come to a conclusion of whether you want to move forward with a dual- or re-license?

I realize my previous answers where a little long-winded, so, trying to keep it short;

Yes, I think the GPLv3 would provide the fairness you seek, with the caveat that those who ignore licenses and other rules still can and will.

Strooom commented 1 week ago

Yes, I agreed to a dual license. If you provide me the license file, I will add it to the repository.

oddstr13 commented 1 week ago

I have created a pull-request with what I think are the appropriate changes, and I think GitHub should properly recognize both licenses after it has been merged.

There is one additional contributor which needs to approve the change in addition to you.

I would also remove the pdf file describing the creative commons license, but I haven't yet. What is your opinion on this? I don't think it provides additional value, but it doesn't matter much either way for me.

DavidTruyens commented 1 week ago

Fine for me! But I don't know where I can approve..

oddstr13 commented 1 week ago

Fine for me! But I don't know where I can approve..

This comment in and of itself is sufficient, but it would be easier to find it again in the future if it was made here; https://github.com/Strooom/PN7150/pull/19

Edit: I added a link back to your comment here, so it is fine :smiley: