Ok, so yeah - if it disconnects something's gone wrong.
Advertising doesn't have a timeout parameter? It has interval, which is the time between advertising packets being sent. Most devices only listen for 1 second by default, and it alternates advertising over 3 different frequencies - so if you have a particularly dumb central then it'll only listen on one frequency for 1 second - hence you need <300ms interval to be connectable reliably.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ok, so yeah - if it disconnects something's gone wrong.
Advertising doesn't have a
timeout
parameter? It hasinterval
, which is the time between advertising packets being sent. Most devices only listen for 1 second by default, and it alternates advertising over 3 different frequencies - so if you have a particularly dumb central then it'll only listen on one frequency for 1 second - hence you need <300ms interval to be connectable reliably.