It's really strange about your error 8 - I guess it must have been something in the saved code.
I think I need to come up with a better way of handling the 'save on send' thing - it seems a lot of people are hitting problems when turning it on, uploading, then trying to do things after it's turned off if the existing code is still saved.
It definitely looks like there's some issue with wake, sleep and setAdvertising as you say. sleep and wake should do what you want (stopping advertising) but I bet there are some checks missing in there (maybe calling sleep or wake while connected?). They tend not to be used that much so I haven't focussed on them as much as I should - I'll see if I can find a way to reproduce it here as well.
© Espruino, powered by microcosm.
Report a problem