Hi!
As far back as Nov 2015 @Forged noted an issue with the seed of the random generator not being
updated by the Particle Cloud as stated in the documentation. A few months later @vwegert faced the same problem.
Today and running firmware 0.5.3 the issue persists. I discovered it after unsuccessfully try to
randomly delay the start of a controlled load in a fleet of Photons. The entry:
random(120);
always returned the same sequence in each device and each run:
53, 63, 62, 89, 60, 108…
I’m now using the workaround provided by @mdma:
uint32_t seed = HAL_RNG_GetRandomNumber();
srand(seed);
however it will great to have it fixed in the firmware and thus avoid to release undocumented
code to production.
Thank you!