EEVblog Electronics Community Forum

Electronics => Open Source Hardware => Topic started by: frozenfrogz on May 24, 2017, 05:04:31 pm

Title: What license to use for project involving Arduino / ESP8266 libraries?
Post by: frozenfrogz on May 24, 2017, 05:04:31 pm
Hello all,

currently I am working on a small project involving ESP8266 based hardware using the Arduino core (https://github.com/esp8266/Arduino), Arduino IDE libraries and various sensors.
After prototyping I would like to merge everything together on a single PCB and upload to Github together with the firmware I have written to share as open-source hardware.
Since this is my first "public" project, I was looking into the licensing issue and after reading a whole lot of discussions, licenses and articles on licenses I must admit: I don’t get it. Now I am even more confused then before.

Can someone break it all down for me, so that I understand what I would have to consider? What licenses can I use? What are the options / differences? Does it even matter that much?
Arduino libraries are published under CC-BY-SA
ESP8266 Arduino libraries are published under GNU LGPL v2.1

The hardware will be my own design and I am considering CERN OHL, so I am mainly interested in licensing issues on the software side.

Thank you and best regards,
Frederik
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: Muxr on May 24, 2017, 05:07:14 pm
I always liked the MIT License.. just because it's fairly non restrictive and pretty straight forward.

You can't use GPL libs in MIT License software but you can use LGPL (Arduino libs) no problem:

https://softwareengineering.stackexchange.com/questions/141847/how-does-using-a-lgpl-gem-affect-my-mit-licensed-application
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: frozenfrogz on May 26, 2017, 01:22:01 pm
Hello Muxr,

thank you for the quick response :)
I also like the MIT license, but was not sure about compatibility to the other licenses - I just started to look into these kind of things, as I had not published any projects before. There was no need to really care about licensing issues with my home tinkering...
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: amszmidt on May 30, 2017, 09:53:37 am
You definitely can use GPL libraries with MIT licensed software.  The MIT license is compatible with the GNU GPL.  The whole work will be subject to the GPL.

https://www.gnu.org/licenses/license-list.en.html#X11License (https://www.gnu.org/licenses/license-list.en.html#X11License)
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: frozenfrogz on May 31, 2017, 02:24:05 pm
From my understanding GPL and MIT (X11) are only one-way compatible. So if I want to use MIT licensed content in a GPL licensed project: No problem. But if I want to use GPL licensed content in an MIT licensed project: That does not work, because I would be forced to release under GPL.
However, LGPL is compatible with MIT both ways as Muxr stated if the LGPL library is used unaltered. If I was to modify, or include parts of the LGPL library in my own code, LGPL would be imposed to my work as well.
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: amszmidt on June 02, 2017, 01:45:04 pm
There is no such thing as "one-way compatible", either they are compatible or they've are not.  If you use GPL licensed code in an existing project, or have a GPL project and add X11 licensed code, then in _both_ cases the whole work has to be available under the GPL (which is not the same as a relicense, the original code is always available under its original conditions).  The GPL always applies to the _whole_ work. 

The LGPL is different in that if you use a library or similar, then you aren't required to license the whole work under the same license.  But you are still required to release any modifications to the LGPL work, and such.  The GNU project has quite a lot on the GPL and the LGPL.

The notion that one is forced to anything is misconception, nobody is forcing you to use existing code. 
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: brucehoult on June 02, 2017, 02:12:49 pm
There is no such thing as "one-way compatible", either they are compatible or they've are not.  If you use GPL licensed code in an existing project, or have a GPL project and add X11 licensed code, then in _both_ cases the whole work has to be available under the GPL (which is not the same as a relicense, the original code is always available under its original conditions).  The GPL always applies to the _whole_ work. 

The LGPL is different in that if you use a library or similar, then you aren't required to license the whole work under the same license.  But you are still required to release any modifications to the LGPL work, and such.  The GNU project has quite a lot on the GPL and the LGPL.

The notion that one is forced to anything is misconception, nobody is forcing you to use existing code.

Maybe I'm wrong, but my reading of LGPL is that you can only incorporate LGPL code in a non-GPL project if you use it as a library, not linked into your code. I believe the concept is that it should be possible for the end user to replace the LGPL library with something else if they want to.

Statically linked, burned into ROM, will not meet that requirement. Loaded into flash, with all the source code available and ability for the end user to re-flash it, might.

IANAL.
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: frozenfrogz on June 02, 2017, 09:43:45 pm
There is no such thing as "one-way compatible", either they are compatible or they've are not.

That is not correct. As stated above, you can incorporate MIT X11 licensed code into your GPL licensed software, but you can not incorporate GPL licensed code into MIT licensed software. So basically that is what one-way compatible means.

That is exactly what you described here yourself:

Quote from: amszmidt
If you use GPL licensed code in an existing project, or have a GPL project and add X11 licensed code, then in _both_ cases the whole work has to be available under the GPL (which is not the same as a relicense, the original code is always available under its original conditions).  The GPL always applies to the _whole_ work.

Of course I am not forced to use someones code, but if I do, I have to deal with the proper licensing and that is not a trivial thing to do (my interpretation).
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: frozenfrogz on June 02, 2017, 09:59:56 pm
I don’t bother, as I think my code is not that top notch to deserve any kind of protection and I don’t care what other people do with it. I am happy if someone else may find it useful. However, I did not know how to deal with the different license models from libraries I would like to use instead of writing my own.
I just wanted to know how it all adds up, because my intention is to not violate any license granted by code provided to me. That’s all. Case closed, thanks y’all :)
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: amszmidt on June 03, 2017, 09:10:28 am
Quote
That is not correct. As stated above, you can incorporate MIT X11 licensed code into your GPL licensed software, but you can not incorporate GPL licensed code into MIT licensed software. So basically that is what one-way compatible means.

I think you are confusing what the licensees allow for, and what a project might accept.  Legally, you can incorporate code licensed under the GPL into a X11 licensed project.  The project as such might reject such changes to be incorporated into their tree, but that is the same as for a GPL licensed project rejecting changes licensed under a different license (e.g. in the GNU project this is often the case, where we require a copyright assignment and changes licensed under the GPL).

But legally, it doesn't matter - if the licenses are compatible there is no "direction" when you incorporate a work, you just have to abide the license of both works.  And for a project, you will have to accept whatever policies that project might have -- or fork it.  :)


Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: amszmidt on June 03, 2017, 09:25:05 am
Quote
So far as I know, GPL has been only legally enforced in Germany, so in any other countries, if the cloner has a decent lawyer, he can pretty much f* any open source licenses.

The GPL is a perfectly well tried copyright license, you can check the efforts from the SFLC and the FSF as an example of enforcing it (one of the earliest compliance cases was when Apple licensed their Objective C backend for GCC under the GPL in the 80s).  And as having enforced the GPL, no.  You definitely don't need a decent lawyer, often you don't need a lawyer at all.


In fact, there are very few copyright locates that by have ever been tried in a court.  And if the GPL would for whatever reason be deemed invalid, then all GPL works in the world would fall back to the default "all rights reserved" and nobody other than the copyright holder(a) woukd be able to distribute the work.
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: brucehoult on June 05, 2017, 12:09:23 pm
if the GPL would for whatever reason be deemed invalid, then all GPL works in the world would fall back to the default "all rights reserved" and nobody other than the copyright holder(a) woukd be able to distribute the work.

That of course is precisely what the GPL itself has claimed, right from the beginning, paraphrasing form memory: "you don't have to accept the terms of this license, but if you don't accept then nothing else gives you the right to use the code".

The hole in this "agreement without having signed something" is much the same as with shrink-wrap licenses on retail software. You can't use the software unless you agree with the license, but you only know that if you *read* the license. And you can reasonably claim that "of course I didn't read it -- who reads that stuff?".

At least as an end user. Incorporating it into a product is another matter.

I don't know if anyone has ever tried to get out of an agreement they have signed by saying they didn't read it, why would they, everyone signs tons of things they didn't read. (up to and including lawmakers)
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: amszmidt on June 05, 2017, 05:53:59 pm
This is nothing that the GPL claims, rather it is how copyright law actually works for any type of work.  Copyright does not work by signing anything, either you are granted a license or you are not.  If not, the default terms of copyright apply -- all rights reserved to the copyright holder which means the you cannot use the work.
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: Jeroen3 on June 07, 2017, 09:59:40 am
https://choosealicense.com/licenses/unlicense/
It's like MIT, but without any conditions. Compatible with everything.

You can't re-license GPL as MIT or vice-versa. That's why they are incompatible. Your project can be GPL and use MIT stuff. Or you project is MIT, and you use GPL stuff. You can't merge with the GPL project, you have to keep it a separate repository, or plugin. But this is fine in software design point of view anyways.
Title: Re: What license to use for project involving Arduino / ESP8266 libraries?
Post by: amszmidt on June 12, 2017, 11:11:30 am
https://choosealicense.com/licenses/unlicense/ (https://choosealicense.com/licenses/unlicense/)
It's like MIT, but without any conditions. Compatible with everything.

You can't re-license GPL as MIT or vice-versa. That's why they are incompatible. Your project can be GPL and use MIT stuff. Or you project is MIT, and you use GPL stuff. You can't merge with the GPL project, you have to keep it a separate repository, or plugin. But this is fine in software design point of view anyways.

Just because you cannot re-license (i.e. change the license) does not mean that they are incompatible (i.e. make a combined work).

The X11 (i.e. MIT) license and the GNU GPL are fully compatible (see https://www.gnu.org/licenses/license-list.html#X11License (https://www.gnu.org/licenses/license-list.html#X11License)), you do not need to keep a seperate repository or plugin to make a work that uses both X11 and GPL licensed code, you are also allowed to merge code back and forth.  But the whole work has to be available under the terms of the GPL, if you know which parts of a project are licensed under the X11 license you could in theory extract that and remove any previously GPLed code.