
Save Custom Settings
#1
Posted 15 December 2010 - 10:57 AM
- Stefan likes this
#2
Posted 15 December 2010 - 11:24 AM
#3
Posted 15 December 2010 - 11:31 AM
#4
Posted 15 December 2010 - 12:39 PM
#5
Posted 15 December 2010 - 12:52 PM
http://forums.netdui...reference-work/
- Illishar likes this
#6
Posted 15 December 2010 - 12:59 PM
- Illishar likes this
#7
Posted 15 December 2010 - 03:49 PM
#8
Posted 15 December 2010 - 03:53 PM
#9
Posted 15 December 2010 - 04:32 PM
#10
Posted 18 December 2010 - 04:53 AM
Hi Illishar,Is there a way to write to the static IP settings etc. on the N+? (Without using the MFDeploy ofc.)
Instead of using MFDeploy, you can use the NetworkInterface.EnableStaticIP method to set the static IP settings on a Netduino Plus.
Here's a quick example that shows your current IP address, changes it, and then shows that the change has been made:
// add the following line to the top of your Program.cs file using Microsoft.SPOT.Net.NetworkInformation; public static void Main() { // get a reference to our main network interface NetworkInterface myNetworkInterface = NetworkInterface.GetAllNetworkInterfaces()[0]; // print out our current IP address to the Output window Debug.Print("ip address (before): " + myNetworkInterface.IPAddress.ToString()); // set our IP address to a new value; this will be saved in the config sector and will survive reboots myNetworkInterface.EnableStaticIP("192.168.5.102", "255.255.255.0", "192.168.5.1"); // print out our new IP address to the Output windows Debug.Print("ip address (after): " + myNetworkInterface.IPAddress.ToString()); // sleep forever Thread.Sleep(Timeout.Infinite); }Chris
- Illishar likes this
#11
Posted 18 December 2010 - 05:04 AM
Hi Illishar,This is interesting, if you open the N+ fw source, the DataStorage (EWR) is already included. I think I'll test it ... tomorrow.
Full disclosure: we've reserved about 40KB on the chip for expansion. We wanted to "undersell" the product by quoting 128KB of flash (instead of the 168KB+ it really has available) so that we could add more features in the future without taking up any extra space. Savvy users can recompile the firmware to free that all up for their code with the understanding that they might lose some of the extra space with future updates...
Two blocks of flash are marked for EWR storage. We haven't enabled the feature in the Netduino firmware because we may need them for something else...but if you wanted to enable the feature you certainly could.
Chris
- Illishar likes this
#12
Posted 18 December 2010 - 05:06 AM
Is there a way to save/commit/write your own custom settings on the Netduinos?
Eg. if you have a value (set by the user) and you would like to keep it after reboot. I would like to do this, without using a SD card. The deployed app is written to the permanent (internal) flash, so it *is* possible somehow. But how? Theoreticly I could just avoid initializing my variables and the last written value would still be there. Or perhaps that's not the way it works?
Three options for data storage:
1. SD/EEPROM storage. The Netduino Plus has MicroSD built in, so that's an easy choice. You can also use the v4.1.1 alpha firmware on the Netduino or Netduino Mini to enable SD storage via SPI.
2. EWR: we could enable this on the Netduino/Netduino Mini/Netduino Plus. It's an "old" .NET MF technology, there might be better options available, and it takes up 16KB of flash we've been planning on using for something else...but we could enable it (or you could enable it in your own custom firwmare build).
3. Config block: there is an 8KB "configuration" block on the Netduino. It stores your network settings, USB device name, current debug port, etc. This block of flash is usually only used by the .NET MF firmware itself, but we could create a C# object which would let you write/read a few chunks of data.
Chris
- Illishar likes this
#13
Posted 18 December 2010 - 08:37 AM
- Illishar likes this
#14
Posted 19 December 2010 - 02:01 PM
#15
Posted 20 December 2010 - 09:24 AM
#16
Posted 20 December 2010 - 06:12 PM
When you talk EE use small words, I'm just a Software Developer
My Blog/Site and Everything Else
If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.
Oh my. So many things, so little money!!
#17
Posted 28 December 2010 - 10:48 PM

#18
Posted 28 December 2010 - 11:06 PM

#19
Posted 29 December 2010 - 02:24 AM
#20
Posted 29 December 2010 - 09:18 AM
Just to save anyone else the bother, I tried flashing the Netduino Plus firmware to a standard Netduino, hoping that I could store a few bytes in the IP settings. I got an error during flashing. It was a pretty big kludge for a few bytes anyway!Instead of using MFDeploy, you can use the NetworkInterface.EnableStaticIP method to set the static IP settings on a Netduino Plus.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users