Author Topic: What license to use for project involving Arduino / ESP8266 libraries?  (Read 3687 times)

0 Members and 1 Guest are viewing this topic.

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Hello all,

currently I am working on a small project involving ESP8266 based hardware using the Arduino core, 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
He’s like a trained ape. Without the training.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: us
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
« Last Edit: May 25, 2017, 03:09:28 AM by Muxr »
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: de
  • Having fun with Arduino and Raspberry Pi
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...
He’s like a trained ape. Without the training.
 

Offline amszmidt

  • Contributor
  • Posts: 6
  • Country: se
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
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: de
  • Having fun with Arduino and Raspberry Pi
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.
He’s like a trained ape. Without the training.
 

Offline amszmidt

  • Contributor
  • Posts: 6
  • Country: se
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. 
 

Offline brucehoult

  • Frequent Contributor
  • **
  • Posts: 500
  • Country: ru
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.
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: de
  • Having fun with Arduino and Raspberry Pi
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).
He’s like a trained ape. Without the training.
 

Online blueskull

  • Supporter
  • ****
  • Posts: 7810
  • Country: cn
  • Power Electronics PhD Candidate
Why bother? Ask yourself, do you want to prevent people from close source their derived works? Is not, then just publish your code as GPL.
If you want to allow close source derived works, then LGPL for you.
But really, if I want to clone your project I won't give a shit to license. 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.
SIGSEGV is inevitable if you try to talk more than you know. If I say gibberish, keep in mind that my license plate is SIGSEGV.
 
The following users thanked this post: Richard Crowley

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: de
  • Having fun with Arduino and Raspberry Pi
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 :)
He’s like a trained ape. Without the training.
 

Offline evb149

  • Super Contributor
  • ***
  • Posts: 1575
  • Country: us
In part it also depends on if / how you want to distrubute your work.
If you are just "open sourcing" something then you can just put your code up online e.g. github and then either:

* A: just state that there is a dependency on some other codes X, Y, Z and that someone has to download those and copy them to the build root directory in order to build your thing.

* B: Support the integration / use of the dependencies in an automated or semi-automated way, e.g.
...making GIT submodule dependencies pointing to the distrubution site of the other codes,
...using make / cmake / whatever to pull the other codes and build / link them
etc.

Then you are not distributing others code at all, whoever builds your code is acquiring and building the work and they don't have to do anything special with respect to the various licences unless they decide to distrubute the code / binaries / widget themselves.  But for their own use they just don't worry and you don't worry since you didn't distribute a binary anyway.

And even if you do want to distribute a binary you can still just include the other dependency sources and your makefile along with the firmware image in the archive file.  You do have to consider what license to use for your own work and the compisite work though in such a case.  Distribute source if you want or .o files for your own code if you prefer.

 

Online blueskull

  • Supporter
  • ****
  • Posts: 7810
  • Country: cn
  • Power Electronics PhD Candidate
In part it also depends on if / how you want to distrubute your work.
If you are just "open sourcing" something then you can just put your code up online e.g. github and then either:

* A: just state that there is a dependency on some other codes X, Y, Z and that someone has to download those and copy them to the build root directory in order to build your thing.

* B: Support the integration / use of the dependencies in an automated or semi-automated way, e.g.
...making GIT submodule dependencies pointing to the distrubution site of the other codes,
...using make / cmake / whatever to pull the other codes and build / link them
etc.

Then you are not distributing others code at all, whoever builds your code is acquiring and building the work and they don't have to do anything special with respect to the various licences unless they decide to distrubute the code / binaries / widget themselves.  But for their own use they just don't worry and you don't worry since you didn't distribute a binary anyway.

And even if you do want to distribute a binary you can still just include the other dependency sources and your makefile along with the firmware image in the archive file.  You do have to consider what license to use for your own work and the compisite work though in such a case.  Distribute source if you want or .o files for your own code if you prefer.

Yes, that's how Linux distributions distribute patent (codecs) or copyright (MS fonts) covered materials.
This is also used by open source audio tools to integrate OSS unfriendly ASIO library.
And I believe some math libraries (BLAS, FFTW, etc.) are also distributed this way to circumvent licensing issues.
SIGSEGV is inevitable if you try to talk more than you know. If I say gibberish, keep in mind that my license plate is SIGSEGV.
 

Offline amszmidt

  • Contributor
  • Posts: 6
  • Country: se
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.  :)


« Last Edit: June 03, 2017, 07:12:33 PM by amszmidt »
 

Offline amszmidt

  • Contributor
  • Posts: 6
  • Country: se
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.
 

Offline brucehoult

  • Frequent Contributor
  • **
  • Posts: 500
  • Country: ru
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)
 

Offline amszmidt

  • Contributor
  • Posts: 6
  • Country: se
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.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 2583
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
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.
 

Offline amszmidt

  • Contributor
  • Posts: 6
  • Country: se
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), 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf