Copyrights, permissions, licenses

I made a combination lock with a rotary encoder and put it up on YT. Now someone is requesting the code - it's probably not the prettiest but, there it is. I certainly don't have a problem with this but I do have a few questions.

The encoder is driven by Buxton's library. Am I correct in assuming that his license is to be included in any distribution?

Also included are avr/sleep.h, avr/io.h, and EEPROM.h. Do these require license notices as well?

The code also includes a proprietary timer library of my own design. I do not wish to release this into the wild at this time - the recipient will have to adapt to the uncommon usage or come up with his/her own scheme to run the various timers.

What sort of license/permission do I include to state that it's OK for public use and simultaneously protect myself from somebody down the road - this is unlikely, but you never know - complaining I'm violating *their * rights in something *I * created?

TIA

dougp:
The encoder is driven by Buxton's library. Am I correct in assuming that his license is to be included in any distribution?

Also included are avr/sleep.h, avr/io.h, and EEPROM.h. Do these require license notices as well?

I don't know the legally correct answer. I did read the GNU/GPL a while back but I have forgotten it.

If I was in your position I think I would just post the code in this Forum (which is all Arduino stuff, by design) and with links to the Github page for external libraries.

The code also includes a proprietary timer library of my own design. I do not wish to release this into the wild at this time - the recipient will have to adapt to the uncommon usage or come up with his/her own scheme to run the various timers.

What sort of license/permission do I include to state that it's OK for public use and simultaneously protect myself from somebody down the road - this is unlikely, but you never know - complaining I'm violating *their *rights in something *I *created?

If I understand that question correctly then nothing YOU can write will protect you from someone alleging that you infringed THEIR rights.

YOU can write stuff to give you some chance (if you can afford the legal fees) of prosecuting someone for infringing YOUR rights.

...R

PS ... if you are serious about complying with other people's licences then you need to get professional legal advice. It is the only thing that will give you a better chance of a defence if ever you are challenged. Even then it will not guarantee that you will be in the clear. In every court case half of the lawyers are wrong.

PPS ... I am not a lawyer although in my working life I managed the creation of some laws.

Robin2:
I don't know the legally correct answer. I did read the GNU/GPL a while back but I have forgotten it.

Thanks. I've been reading the same. Hard to extract anything from it though - it makes my eyes glaze over.

dougp:
Am I correct in assuming that his license is to be included in any distribution?

Are you distributing his source code with yours? Or linking to his?

(GNU GPL Version 3 is an odd {poisonous} choice for a library.)

dougp:
Also included are avr/sleep.h, avr/io.h, and EEPROM.h. Do these require license notices as well?

Huh. I see the Arduino folks have stripped the license file from the AVR-GCC distribution. That was a no-no.

What I remember is that Libc is licensed separately from the compiler. Let's check...

Yes. This is the license of interest...
https://www.microchip.com/webdoc/AVRLibcReferenceManual/index_1license.html

So, the answer is "yes". You will need to include the license with any Libc files.

Huh. It looks like the license within sleep.h deviates from Microchip's overall license...

/* Copyright (c) 2002, 2004 Theodore A. Roth
Copyright (c) 2004, 2007, 2008 Eric B. Weddington
Copyright (c) 2005, 2006, 2007 Joerg Wunsch
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in
    the documentation and/or other materials provided with the
    distribution.

  • Neither the name of the copyright holders nor the names of
    contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */

dougp:
What sort of license/permission do I include...

Other than no liability, what do you want? Attribution? No commercial use? Share-a-like?

Not distributing source. At this point I have just an #include of the library (installed on my PC). I presume this is what 'linking to his' means. Whoever wants to try this will have to install and #include on their own - or substitute some preferred encoder code.

Poisonous for whom?

Thank you much. I'd have gotten really wrapped around the axle getting to that point! This stuff makes my brain hurt. :-\

Does that mean sleep.h needs its own notice?

Attribution, meh. I do think no commercial use is fair since everything is open source. IMO it's not right to find something in the open then restrict its use for personal gain. I'm indifferent to sharing since I have no plans to commercialize this thing anyway. It was just an exercise to try out a few Arduino/C++ techniques. To prove the theory, as it were. Plus, there are already a thousand combination locks using keypads.

Your thoughtful and informative post is greatly appreciated.

Karma incoming.

dougp:
IMO it's not right to find something in the open then restrict its use for personal gain.

Many of the Open Source licences are quite comfortable with personal or commercial gain and are primarily there to prevent any attempt to restrict the Open Source nature of the code. And also. perhaps, to avoid any warranty obligations.

IMHO it would not make sense to refer to or rely on any licences without understanding the content of the licence - and legal jargon is not the easiest to understand, especially the nuanced differences between licences.

For example, one particular thing to be aware of is what country's legal system governs the interpretation of a licence.

...R

dougp:
At this point I have just an #include of the library (installed on my PC). I presume this is what 'linking to his' means.

It is not. The GNU GPL license has strict rules regarding distribution. Those rules apply if you include source code that was licensed under GNU GPL. One option is "linking" where you do not include the other person's source code but provide a link where it can be obtained. Basically, if you use it you are required to make the source code available.

dougp:
Not distributing source.

Then a link to his Github repository is enough.

dougp:
Whoever wants to try this will have to install and #include on their own - or substitute some preferred encoder code.

Perfect.

dougp:
Poisonous for whom?

Everyone who uses something licensed under it. GNU GPL is very restrictive and attaches to whatever incorporates GPL'd material.

dougp:
Does that mean sleep.h needs its own notice?

The notice is embedded in the file. Just publish it as-is. Any discrepancies belong to Microchip.

As long as you include this license with Libc source code you are good...
https://www.microchip.com/webdoc/AVRLibcReferenceManual/index_1license.html

dougp:
I do think no commercial use is fair since everything is open source. IMO it's not right to find something in the open then restrict its use for personal gain.

In which case a share-alike license is the right choice for you...

https://creativecommons.org/licenses/by-nc-sa/4.0/

dougp:
Your thoughtful and informative post is greatly appreciated.

You are welcome.

I’ve had a second request to provide source code for the combination lock and am now revisiting. Update on the libraries used:

• EEPROM.h,
• Buxton’s encoder library dropped in favor of Paul Stoffregen’s Encoder.h after @CodingBadly’s ‘poison’ comment.,
• avr/sleep.h, and
• Multi_timer.h, one of my own.

avr/io.h is also dropped since I found I didn’t need it.

I’m thinking it should look something like this:

/*  ENCODER OPERATED COMBINATION LOCK V 3.0

    This work is licensed under the Creative Commons Attribution 4.0 International License.
    To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

    Description of sketch...

  // Refer to the link for the EEPROM license

  // https://www.arduino.cc/en/Reference/EEPROM/

  // https://creativecommons.org/licenses/by-sa/3.0/
*/

#include <EEPROM.h>  // for storage/retrieval of lock code

// Refer to the link for the rotary encoder license

// Or, encoder license unnecessary since it's included in IDE?

#include <Encoder.h>
Encoder ComboDial(2, 3);

#include "Multi_Timer.h" // proprietary timer library

/* Refer to the link for the Microchip sleep license

  https://www.nongnu.org/avr-libc/user-manual/sleep_8h_source.html.
*/
#include <avr/sleep.h>

/*
    Body of code: declarations/setup()/loop()/functions
*/

===============================

The plan is to post the code in the thread linked in the first post.

Is this correct? Is it overkill? Even close? Why not?

Any pitfalls or oversights spotted?

dougp:
I’m thinking it should look something like this:

.....

Is this correct? Is it overkill? Even close? Why not?

Any opinions you get that do not come from a suitably qualified lawyer are not worth the paper they are written on - sorry, but that's the reality.

I think it's time to ask yourself what you are trying to achieve.

If you are seriously concerned about being sued and want to protect yourself against a legal challenge then professional legal advice is essential. Even with that, and even if your are 100% in the right you may not have the finances to defend yourself against a rich challenger.

If you just want to give recognition to the other folk whose work you have used then the exact format is unlikely to matter. I think I would be content to say something like "This program relies on the following libraries created by others. Different libraries will have different licensing terms. Here is a list of links to the sources for those libraries. The code that I have created for this project is covered by the XXXX licence".

But I AM NOT A LAWYER

...R

Robin2:
Any opinions you get that do not come from a suitably qualified lawyer are not worth the paper they are written on - sorry, but that's the reality.

I accept that.

Robin2:
If you are seriously concerned about being sued and want to protect yourself against a legal challenge then professional legal advice is essential.

That's not the concern. I don't see in any of the common licenses excessive legalese. They're not made for corporations protecting thousands of hours of effort so they don't read as such. Additionally, it seems the licensing outfits like Creative Commons encourage any violations to be resolved cooperatively as opposed to getting courts involved. I don't anticipate lawyers I would just rather avoid any hassles/outrage caused by an oversight on my part.

Robin2:
If you just want to give recognition to the other folk whose work you have used then the exact format is unlikely to matter.

This is what I'm after. I just can't locate a suitable example of what that looks like. I see a lot of code with #includes of this and that library and no reference at all to the authors. I suspect @CodingBadly's replies hold the answer, I'm just having trouble seeing it.

Thanks for the reply.

dougp:
What sort of license/permission do I include to state that it's OK for public use and simultaneously protect myself from somebody down the road - this is unlikely, but you never know - complaining I'm violating *their * rights in something *I * created?

TIA

Well, maybe it will be a bit stupid suggestion, but please remember there are more countries than USA and in some of them... there are literally no copyrights :slight_smile: In others rules are messed.

It was to make You down, but in general i have to agree: Creative Commons Attribution 4.0 look like the ebst way to protect private project :wink:
Good luck!