-
Notifications
You must be signed in to change notification settings - Fork 7
Settings Implementation #3
Settings Implementation #3
Conversation
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
This reverts commit 0162656.
#include <StandardCplusplus.h> | ||
#include <serstream> | ||
#include <EEPROM.h> | ||
#include <Entropy.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
+#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 GitHubhttps://github.com//pull/3/files#r14342554.
Use strict default MAC without random assignment Adjust EEPROM storage and allow full edit of MAC address
Removed reference to Entropy library
This looks great and will be a very useful addition to the tool. |
</div> | ||
|
||
<div class="form-group"> | ||
<button type="submit" class="btn btn-default">Apply</button> | ||
<button type="submit" class="btn btn-default" ng-click="setNetworkConfig()">Apply</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a note in the GUI that the new network settings will not take effect until the next reset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I cannot know when I can commit time to update the documentation, I have added a note to the web page to indicate the changes will take effect after a re-boot.
Add text below the "Apply" button to clarify when changes to network configuration will take effect
Thanks for these additions, Steven. I have done some basic testing on it and it seems to work fine, except for some few issues with parts of the settings functionality in the web application. I also had to make some code changes to make it compile for me. I need to do a bit more investigation on these issues before merging. |
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