chipKIT® Development Platform

Inspired by Arduino™

DNETcK IP address set by software

Created Wed, 08 Jun 2016 22:41:44 +0000 by Laci04


Laci04

Wed, 08 Jun 2016 22:41:44 +0000

Hello!

I used the Ethernet server with DNETcK library. The server remotely set some parameters by GET requests. It would be necessary to change the IP address.

  1. Receiving IP modification GET request. For example: GET /setip=192.168.1.6
  2. The program parsing and saving received data in EEPROM
  3. Automatically restart program
  4. Read stored IP address from EEPROM and begin IP server new configure.

DNETcK::begin(ipServer); This is OK! but... IPv4 ipServer = {192,168,1,5}; is static parameter. How is it possible to set the IP address in void setup() function?

Something like that would be a good solution: DNETcK::begin(EEPROM.read(0x00), EEPROM.read(0x01), EEPROM.read(0x02), EEPROM.read(0x03));

Idea?

Many thanks!