• Ok so BLE task 3 is already in progress should be interpreted as disconnect, right ;-)

    And the guess that the 1st disconnect is fired, but takes some time to process, so that the 2nd disconnect result in "BLE task 3 ......progress" seems plausible.

    But I'm not out of the woods yet.

    When I start the code I get this, as before, disconnects after some "overshoot".
    The UART server recognises the disconnect after the last outputline, stops sending notification, start advertising again for a new connection.

      _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06 (c) 2019 G.Williams
    >
    Done!
    RX: SASML,299.45,-4.5%
    RX: Hottentottententente
    RX: Quit
    Quit received, disconnecting now
    RX: D07-06-2020 12.23
    RX: SAAPL,311.01,+11.5%
    RX: SASML,299.45,-4.5%
    >
    

    When I re-upload the code for a 2nd time, the UART server recognises the reconnect and starts sending data, but the BangJS does not process the notifications and displays no output, and after 10 secs or so I get an "Uncaught error". My server never gets a disconnect, so keeps sending data, forever.....

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06 (c) 2019 G.Williams
    >
    Uncaught Error: Unhandled promise rejection: Disconnected
    > 
    

    My intention was to process the code with a setInterval every minute or so, but with the current behaviour that seems problematic.

    Hmmmmm, problems, problems.

    Thanks for your help though, if you have any other suggestions, yes please.

About

Avatar for gerardwr @gerardwr started