OpenSprinkler Forums Hardware Questions OpenSprinkler Controller lockups / crashes with wired Ethernet module Reply To: Controller lockups / crashes with wired Ethernet module



I have been having similar crashing problems with my hardware version 2.3 Open Sprinkler after upgrading from firmware 2.1.7 to both 2.1.9 and 2.2.0. After reading through this topic I decided to recompile the firmware with every variation of 2.1.9 / 2.2.0 / EthernetENC / UIPEthernet / Debug ON / Debug OFF. There were 8 variations in all and I tested them each until they failed. All of them failed for me after 3 to 4 days of use. I have uploaded them all to my fork of the firmware on GitHub with each variation tagged separately so you can see the differences and try them for yourself.

My only resort left was to fallback to firmware 2.1.7 with the EtherCard library. This however left me with a different problem where the weather service call failed. My experience was similar to those also reported on the forum.

To determine why it was failing I set up WireShark to inspect the traffic and discovered that the weather server was returning a “400 Bad Request”. On closer inspection I realised that the format of the Request sets the Host Header to “*”. Due to virtual hosting behind Cloudflare I believe it would use the Host Header to determine which backend host to pass traffic onto, so without it being set correctly, it would fail. Firmware 2.1.9 onwards and RPI builds appear to set the Host Header correctly. So I have modified the 2.1.7 code for the ATmega1284P hardware and rebuilt the firmware with a hard coded Host Header string set to “” instead of “*”. This fixes the weather problem for me. I have uploaded the firmware to my fork on GitHub along with the tag so you can see the code change.

In order to build it I had to locate the instructions on the Way Back Machine.

Hopefully this will help others with similar problems to myself.