This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

License when reusing partial code from SDK examples

I have a little hobby project going on where I'm trying to make Nordic's old temperature broadcaster example work with the nRF52: github.com/.../

The project was originally released under the MIT license by Nordic, and I (and github.com/.../nrf51-ble-app-temp, which I also pulled some changes from) have kept the license as MIT.

Now I'd like to add support for fetching the battery value using SAADC, and was thinking to base my solution on the example in the ble_app_proximity example of nRF5 SDK 12.3.0, which has code for both nRF51 and nRF52. However, this example is released under the Nordic licence, which is a lot like MIT but not quite.

I wouldn't mind switching to the Nordic licence (after all, it's pretty close to the MIT license), but I'm not sure how well it would work when I have code from both Nordic and myself in the same file. The license requires that the disclaimer is kept, but the disclaimer seems to assume that the code in its entirety is written by Nordic. For example, the disclaimer starts with the following: "THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR". In this case, the software is also partially provided by me, so the disclaimer would both be misleading and incomplete; I also do not provide any warranties on the parts I wrote.

I considered working around this issue by keeping the ADC code in a separate file and keeping that under the Nordic license while the rest is MIT, but I'm worried future modifications will make the problem resurface later. What should I do?

I really wish the examples would just be plain MIT license, that would make it a lot easier to derive open-source projects from it. Considering how tied the code is to the way the SoftDevice and the hardware works, I doubt the extra requirements of the Nordic license are really necessary. Who would run this on a non-Nordic device?

For your reference, here is a copy of the Nordic license, taken from nRF5_SDK_12.3.0_d7731ad/examples/ble_peripheral/ble_app_proximity/main.c:

/**
 * Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
 * 
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, 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.
 * 
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 * 
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 * 
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 * 
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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.
 * 
 */
Parents
  • Hi Knut Auvor,

    you are correct that the ble_app_proximity example is still covered under the 5-Clause Nordic License. Thus, you will have to keep the Nordic disclaimer and add your disclaimer below the Nordic disclaimer where you state that code written by you is provided without any warranty, if you plan on distributing the modified example.

    That said, I agree that it is unlikely that someone will run this example on anything other thana Nordic IC and that it would be great if we could open-source the SDK under the MiT License.

    However, our lawyers tend to think that its better to be safe than sorry.

    Best regards

    Bjørn

Reply
  • Hi Knut Auvor,

    you are correct that the ble_app_proximity example is still covered under the 5-Clause Nordic License. Thus, you will have to keep the Nordic disclaimer and add your disclaimer below the Nordic disclaimer where you state that code written by you is provided without any warranty, if you plan on distributing the modified example.

    That said, I agree that it is unlikely that someone will run this example on anything other thana Nordic IC and that it would be great if we could open-source the SDK under the MiT License.

    However, our lawyers tend to think that its better to be safe than sorry.

    Best regards

    Bjørn

Children
  • That seems a little messy, and probably wouldn't allow me to add myself in the copyright line either. I should at least be able to substitute "Nordic Semiconductor" with "Nordic Semiconductor and " in the relevant places for this to make any sense.

    I'm starting to lean towards just not adding support for reading the battery, since my personal use-cases don't require battery power anyway. I considered writing the code myself from scratch, but I don't know any other place to get the numeric conversions apart from the code in question.

    PS: I just noticed that Nordic uses BSD 3-clause and not MIT (my mistake), but that doesn't really change much.

  • I really think Nordic is making a mistake with this license. This is effectively preventing the community from improving upon the examples and sharing them, which would only benefit Nordic. It would make a lot more sense to me if the examples were released with BSD 3-clause and the contents of the components folder were the ones restricted to run on Nordic devices.

    If someone is going to make a pirated nRF5 chip they'd presumably want to steal the drivers, so the license of the components folder would be the thing which makes sense to restrict. Are you really expecting someone to make a novel chip, with novel drivers, which happen to have exact API compatibility so they can reuse the nRF examples?

    Nordic seems to be planning to open-source the low level drivers but not the examples, which makes no sense to me. Please talk to your lawyers about this.

  • I do not think that this is a mistake, but rather a compromise that are beneficial for the community, our customers and Nordic Semiconductor. We do allow the code to be redistributed and as far as I know it is common practice to add your name to the copyright notice if you change files that are covered by a BSD license, see this.

  • OK, fair enough, the phrasing of clause 1 is actually identical between vanilla BSD 3-clause and the Nordic 5-clause (clause 1 is actually the only clause Nordic didn't modify), so adding my name to the copyright line should be OK. However, I'm pretty sure adding my own disclaimer below it is not OK, because that implies changing the license, so I'm still stuck.

    Had Nordic kept the original phrasing of "COPYRIGHT HOLDERS AND CONTRIBUTORS" from BSD 3-clause this wouldn't be an issue, but for some reason they chose to substitute it with an explicit "Nordic Semiconductor ASA" everywhere. I don't know why this choice was made, but I still think it was a mistake.

    As it stands, I don't feel comfortable making open-source contributions to any of the example code in the SDK, or even reuse parts of them. This kind of defies the point of having examples.

  • I agree that NORDIC SEMICONDUCTOR ASA AND CONTRIBUTORS would be a better phrasing. I do not know why only NORDIC SEMICONDUCTOR ASA was chosen by our lawyers, but I have reported this internally and then we'll see if we should modify the disclaimer or not.

Related