Author Topic: Need your opinion - DMCP - useful or just fun to play with?  (Read 1666 times)

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
I've been thinking/coding/experimenting with what I call DMCP (Dynamic Moteino Configuration Protocol.  It is based on DHCP and is designed to  provide dynamic node configuration to Moteino's over wireless.  I'm trying to decide if this is just something fun to code or could it have any useful applications in the "real" world.  Right now I have a client and server where the clients are loaded with a small sketch which sends out a request for configuration data.  Right now this only includes a node ID and network, but could easily include one or more encryption keys, application-specific parameters, etc.  I reserve a pool of node ID's so each node picks a random number inside the reserved pool to make the initial request.  There are obvious differences between DHCP in a TCP/IP world and Moteino's in a wireless world so I'm balancing features with code size, execution speeds, etc.

In my mind I see folks buying lots of Moteino's from Felix with this stub code auto-loaded on each device.  Once you program the gateway (much like configuring DHCP scopes) you simply turn on the clients and they get their configuration information over the wireless network.  Since you can provide the network and encryption keys you could create lots of smaller networks at around 250 nodes per network.

My ideal solution would take this one step further and allow the client to actually download new code over the wireless network.  I'm not that far along to see if this is viable but it sounds cool in my head.  Each client could either get a generic program or it could request a specific code download (ie, I'm a temperature sensor node with a DHT-11).

So, since I respect the opinions of all of the members out there who have lots more experience than I do with MCU's and Moteino's in specifics, what do you think?  Cool idea but useless for real-world applications?  Neat, but not practical?  Thoughts and opinions are greatly appreciated.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Need your opinion - DMCP - useful or just fun to play with?
« Reply #1 on: August 13, 2018, 07:45:29 AM »
Update:  8/13/18

I'm about halfway through the coding process for my DMCP client/server.  As I thought originally, it's based on DHCP.  The server is an ESP32 and the clients will be Moteino's that are going to be placed into fridge/freezers to monitor temp, humidity and voltage.  I'm using a TPL5110 on the Moteino side to wake it every 15 mins and report.  Using a combination of EEPROM on the ESP32 to keep track of the node database and EEPROM on the Moteino to retain configuration across reboots, it's going pretty well so far.  I have a lot of small routines to write to finish out the initial build.  Stay tuned for the next round of updates which will hopefully contain some load testing.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Need your opinion - DMCP - useful or just fun to play with?
« Reply #2 on: August 13, 2018, 09:57:38 AM »
Using a combination of EEPROM on the ESP32 to keep track of the node database
Depending on how large your network will grown, SPIFFS is another option for the ESP32. 

Tom

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Need your opinion - DMCP - useful or just fun to play with?
« Reply #3 on: August 13, 2018, 10:43:27 AM »
It's amazing how many different places you can stuff data into the ESP32 for non-volatile storage.  They also have RTC memory (8KB) that you can use...I think they call it NVS.

Right now I've only reserved 4KB for use.  I'm still playing with exactly what I need to store for each node but so far this is more than enough for my 50 node max.