sensorNET - configure network parameters on the main console
After some thought I decided the following regarding the code for the main sensorNET console:
1. Main console system, comes out of the box with DHCP support (I have this currently running rock-solid). This will work for 90% of the users.
2. If the user requires static IP addresses he/ she can do so by plugin in an USB cable and configure the console that way. I still have to decide if I will make a program to interface with the console (although only for windows as that's the only platform I can really program stuff for) or through some kind of serial interface.
Here's the header of the latest .ino file:
/*
console13012012.ino
This version features:
1. DHCP client coded in (implemented).
2. Possibility of changing network configuration through serial connection (development).
Serial comms protocol:
a) console receives a 1 (SEND OUT COMMAND network info command):
serial send out current network configuration as:
[STATIC or DHCP] IP: XXX.XXX.XXX.XXX SN: XXX.XXX.XXX.XXX GW: XXX.XXX.XXX.XXX
info. This is fetched from EEPROM if static or SRAM if DHCP.
b) console receives a 2 (STANDBY for option DHCP or STATIC)
if receive "DHCP" run DHCP code
if receive "STATIC":
request IP address, format XXX.XXX.XXX.XXX (must be valid),
request and standby for subnet, format XXX.XXX.XXX.XXX (must be valid)
request and standby for gateway, format XXX.XXX.XXX.XXX (can be empty)
Save data to EEPROM
Perform hard reset to activate changes
**proceed only when above code is rock solid**
4. user logs in to assigned/ chosen IP address with a browser and gets
diags + sensor list on browser window.
*/
First version of the .ino file to be published within a week with at least the above implemented.
1. Main console system, comes out of the box with DHCP support (I have this currently running rock-solid). This will work for 90% of the users.
2. If the user requires static IP addresses he/ she can do so by plugin in an USB cable and configure the console that way. I still have to decide if I will make a program to interface with the console (although only for windows as that's the only platform I can really program stuff for) or through some kind of serial interface.
Here's the header of the latest .ino file:
/*
console13012012.ino
This version features:
1. DHCP client coded in (implemented).
2. Possibility of changing network configuration through serial connection (development).
Serial comms protocol:
a) console receives a 1 (SEND OUT COMMAND network info command):
serial send out current network configuration as:
[STATIC or DHCP] IP: XXX.XXX.XXX.XXX SN: XXX.XXX.XXX.XXX GW: XXX.XXX.XXX.XXX
info. This is fetched from EEPROM if static or SRAM if DHCP.
b) console receives a 2 (STANDBY for option DHCP or STATIC)
if receive "DHCP" run DHCP code
if receive "STATIC":
request IP address, format XXX.XXX.XXX.XXX (must be valid),
request and standby for subnet, format XXX.XXX.XXX.XXX (must be valid)
request and standby for gateway, format XXX.XXX.XXX.XXX (can be empty)
Save data to EEPROM
Perform hard reset to activate changes
**proceed only when above code is rock solid**
4. user logs in to assigned/ chosen IP address with a browser and gets
diags + sensor list on browser window.
*/
First version of the .ino file to be published within a week with at least the above implemented.
Comments