OpenSprinkler Forums OpenSprinkler Mobile and Web App Web app / mobile app issue with log display Reply To: Web app / mobile app issue with log display

#43382

Ray
Keymaster

@Shawn: that’s an interesting discovery. I am not sure why smaller buffer size actually solves the problem. I am trying to reason about it. One thing that’s possibly related is that the firmware tries to pack as much data as possible in one packet (one buffer size). For example:
https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/server.cpp#L1355
it’s trying to fill as much data as possible until the available buffer size is less than 80. In theory this should be a conservative bound that avoids any buffer overflow. But I suspect there might be a bug in the code here that causes the buffer to overflow. I need to do some more tests to find out. In the meantime, your work-around is probably the easiest fix (I am not quite sure about the 4 connections vs. 2 connections you described: could you point out the relevant code so that I can check? Thanks).