Photon UDP buffer/boundaries

Hello all,

I am working on porting E1.31 interpreting code to my new Photon. Specifically to control Christmas lights using the Photon over WiFi. I have a basic implementation working with my Core. But I had to modify the UDP buffer size to 640 due to the size of E1.31 packets. Unfortunately, and as far as I know, this means that I have to upload firmware over USB (I could be wrong. I’m no expert). Which is what I’ve been doing.

OTA firmware updates are very valuable to me and I would really like to retain the ability. Since it seems I always have last minute problems in the dead of winter when everything is deployed. And it’s not fun to open everything up/plug in, in the freezing cold to update firmware!

I was really hoping the Photon would have a larger UDP buffer by default so I could use the online IDE and everything would ‘just work.’ But it seems the Photon still has a UDP buffer of size 512 which cuts my packets short.

Does anyone have any ideas on how I might receive 640 byte UDP packets on the Photon? And still be able to due OTA firmware updates? And preferably still be able to use the online IDE? Ha, that’s a lot to ask, but that’s the reason I bought the Photon!

Any ideas are welcomed!
Thanks!
James

Hi, there will be a new method for the UDP class “setBuffer” which allows for a dynamic buffer size. It currently is in the 0.4.5 release candidate, brought to us by @mdma (thanks!). So I am guessing it will be available in the cloud soon. I have successfully enlarged it to 1536 (0x600). So far I did not notice any problems, at size 2048 some strange thing happened where the USB serial connection would disconnect/connect erratically. Have not done proper research as to why this was happening. It would probably be good if there was some sort of limit embedded in the code and documentation. Anyway, you should be fine with 640 in size.

Wow, that would be perfect! Thank you for the info!