Settings Implementation

Allows full configuration of Network, PIN and Door without editing or
even creating CFG files.
-Network will generate random MAC and use DHCP by default setting and
store into EEPROM if no NETWORK.CFG file is present
-Default pins.cfg file generated if not present
-RSV pins can not be assigned via Settings
-Free configuration of doors.cfg via web page, device updates only with
properly formed JSON
Thanks,
Reading an unconnected pin didnt produce random numbers for me at startup but I will take a look at that and other alternatives when I get back from vacation.


-Steven
Sent from my Samsung Galaxy Note II

-------- Original message --------
From: Baldvin Gislason Bern
Date:06/30/2014 5:50 AM (GMT-05:00)
To: AxisCommunications/door-controller-test-tool
Cc: "Dillingham, Steve"
Subject: Re: [door-controller-test-tool] Settings Implementation (#3)


In Network.cpp:

> +
> +You should have received a copy of the GNU General Public License
> +along with this program; if not, write to the Free Software
> +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
> +*/
> +
> +// Uses Entropy library to generate random number for MAC address
> +// if there is no network.cfg file and the settings have not been
> +// stored in EEPROM.
> +
> +#include "Network.h"
> +#include "aJSON.h"
> +#include <StandardCplusplus.h>
> +#include <serstream>
> +#include <EEPROM.h>
> +#include <Entropy.h>


Entropy is licensed under GPLv3 which is incompatible with GPLv2 used for this project. If we link to Entropy then we probably need to upgrade the license for this project to GPLv3, which is not an exercise I want to undertake.
Either Entropy needs to be replaced with a different solution or we can skip the "random MAC address" feature for now.
Suggestion: a) Use another true random library with a license compatible with GPLv2. Or b) Use randomSeed() to initialize the random number generator with a fairly random input, such as analogRead() on an unconnected pin.

—
Reply to this email directly or view it on GitHub<https://github.com/AxisCommunications/door-controller-test-tool/pull/3/files#r14342554>.