Closed OwenBrotherwood closed 7 years ago
I guess it's possible that the output buffer got full in Puck.js. Basically all you're doing is entering one long line of code saying HelloHelloHello...
I don't see how this is a winnus problem though as I guess it would happen with any connection method?
yes: any connection method. The example, with no \r could conceivably put other devices connected to by winnus at risk (by showing a possible bug) so better to have in example with \r
I believe the buffer flow is an issue in Espruino code and I was going to create a issuethere when I was sure of the results that I have seen: I leave the creating of a issue to you if you feel there is an issue
Example changed in my PR to adding \r to avoid winnus causing problems for non Espruino if someone just tries it and crashes the device they are connecting to.
contained in docExample PR tracked by https://github.com/espruino/winnus/issues/3
using hellowsinnus.js but WITHOUT the \r for Hello and sending over 10 times, the puck.js does advertises but does not respond to a connect.
{\"VERSION\":\"1v91.60\",\"BUILD_DATE\":\"Feb 9 2017\",\"BUILD_TIME\":\"16:51:25\",\"GIT_COMMIT\":\"f7d49465787e574d56f7aec98949002ed099c9d2\",\"BOARD\":\"PUCKJS\",\"CHIP\":\"NRF52832\",\"CHIP_FAMILY\":\"NRF52\",\"FLASH\":524288,\"RAM\":65536,\"SERIAL\":\"aabca59d-3fd340e6\",\"CONSOLE\":\"Bluetooth\"}
Example, about 7 times after another produced the following and a puck.js that did not respond to connect and the running program, RGB led blink on button, did not respond
Same result on release firmware
{\"VERSION\":\"1v91\",\"BUILD_DATE\":\"Jan 12 2017\",\"BUILD_TIME\":\"10:56:11\",\"GIT_COMMIT\":\"a6300790b771b7afffdb2bb2d8c5d0607f7977ef\",\"BOARD\":\"PUCKJS\",\"CHIP\":\"NRF52832\",\"CHIP_FAMILY\":\"NRF52\",\"FLASH\":524288,\"RAM\":65536,\"SERIAL\":\"aabca59d-3fd340e6\",\"CONSOLE\":\"Bluetooth\"}
Note: http://forum.espruino.com/conversations/300527/#13480709 was with the puck.js with insert old battery, and observe advertisement and immediate connection error with first attempt ie no repetition of sending "Hello".