Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Settings Implementation #3

Merged
merged 9 commits into from
Jan 26, 2015

Conversation

steven93921
Copy link
Contributor

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

Steven Dillingham added 4 commits June 26, 2014 17:26
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
#include <StandardCplusplus.h>
#include <serstream>
#include <EEPROM.h>
#include <Entropy.h>
Copy link
Member

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.

Copy link
Contributor Author

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.

Steven Dillingham added 2 commits July 7, 2014 00:41
Use strict default MAC without random assignment
Adjust EEPROM storage and allow full edit of MAC address
Removed reference to Entropy library
@baldvin137
Copy link
Member

This looks great and will be a very useful addition to the tool.
I just want to run some tests before merging.
Good work!

</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>
Copy link
Member

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?

Copy link
Contributor Author

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.

Steven Dillingham added 3 commits August 20, 2014 17:03
Add text below the "Apply" button to clarify when changes to network
configuration will take effect
@daniellindros
Copy link

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.

daniellindros pushed a commit that referenced this pull request Jan 26, 2015
@daniellindros daniellindros merged commit fe47a70 into AxisCommunications:master Jan 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants