Connection issues on Windows 10

Posted on
  • Its been fun playing with puck but I ve noticed some weird behavior on Windows 10. The puck initially connects fine with the WEB IDE standalone but after a while it refuses to re-connect giving an error, "connection failure". Unpairing and pairing the puck again seems to always fix the problem and that is the only fix I ve found so far but is there a reason why this is happening or a way to prevent it? Anyone having these issues? Any advice?
    Many thanks!

  • I'd be interested to hear if anyone else is having this too - I'm afraid I don't have any advice for you though :(

    Roughly how many connects are needed before it stops working?

    Had you been using things like BLE HID, or NRF.setServices or NRF.setAdvertising? Those change the way the device appears to the PC, and so might potentially confuse windows.

  • Thanks Gordon, I am trying to replicate the problem and define any patterns. It may also be related to pairing with windows then Android and back to windows. Interesting you mention the NRF services. It seems that we are having some issues there as well that may be linked somehow. On previous firmware (1.92) we are able to call service 0x0003 for RX UART communication via BLE in order to send data out but on (1.93) that throws an error. "Uncaught Error: Unable to find service with UUID 0x0003"

  • Also, this is the error I get from console when connection breaks for a sensor:
    Set Slow Write = true
    ERROR: Unable to open device (connectionInfo=undefined)
    ERROR: [notify_error] Connection Failed.

    Connection Failed.
    ERROR: [notify_error] Connection Failed.
    Connection Failed.

  • Thr 2017.08.03

    The puck initially connects fine with the WEB IDE standalone but after a while it refuses to re-connect giving an error, "connection failure". Unpairing and pairing the puck again seems to always fix the problem

    I too am having the same issue intermittently thrice a day over a ten hour period with the Native WebIDE. Not running anything other than LEDn.write() and setInterval()

    This is with 1v88 and I haven't poked my nose into the console yet. A minor difference is that I don't always get the 'connection failure' error, just a locked app.

    Windows 10.0.15063 on HP laptop with a Insignia BLE dongle. I'll update here should there be any earth shattering msgs.

    Note: Also having left pane not updating issue as explained in http://forum.espruino.com/conversations/­308441/
    Also, I've only ever had to pair the Puck one time. Disconnect-Connect is needed, but never get the pairing dialog on subsequent tries.

  • @Robin please can you try and find a way to update your firmware before looking too much into this? I did post some advice in one of your other threads. 1v88 has known connection issues on some devices caused by it having too low an advertising interval, but literally hundreds of things have been changed/fixed since 1v88.

    @LVangelis how are you actually accessing the 0x0003 service? From the Puck itself? If so, 0x0003 should never have worked (you needed the full 128 bit UUID) - it was a bug that got fixed in 1v93. Is there a reason you couldn't just use Bluetooth.write? It should do the same thing, but in a way that won't conflict with Espruino's built-in code.

    Is there any chance the Android device you're using might be attempting to connect to the Puck as well? The Puck can only have one connection at a time, so if Android were trying to connect then that could really mess up the PC's connection as well.

  • Thanks Gordon, that's interesting. I will check it out and report back. Regarding losing connection I suspect that happens when Espruino crashes and gets stuck in a mode that makes it impossible to connect. I noticed that when that happens it then advertises itself as "N08R7" at the add bluetooth devices instead of its Puck id. Removing the battery solves the advertising issue but then it continues to refuse to connect.

  • Hey Gordon,

    I'm a developer working with @LVangelis and I was wondering if you could expand on Bluetooth.write. I can see the IntelliSense supporting the method call when I write it in the Espruino Web IDE, but I'm having trouble finding any documentation on it. For our purposes, we're just trying to send information through a notify characteristic. Right now, I'm creating a service/characteristic using setServices first, and then using updateServices to modify the value of our characteristic. Would Bluetooth.write() be something we should look into? And if so, would you be able to point to some useful documentation on the method?
    Thanks in advance!

    Edit: After quick test, I see that Bluetooth.write() writes to the NUS RX characteristic data buffer... This works really well. Thanks!

  • Ahh, yes - so Bluetooth is basically just a Serial class, and has all of its methods, like write: http://www.espruino.com/Reference#l_Seri­al_write

    And yes it just outputs over Bluetooth NUS.

    If you were using setServices/updateServices that should be fine - but it sounded like you might have been using updateServices to write to the NUS RX characteristic? If so, that could have caused some problems.

    About the "N08R7" in advertising - do you have any idea how that might have got there? Do you use setAdvertising in your code? It seems very odd that the advertising itself would change all by itself.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Connection issues on Windows 10

Posted by Avatar for LVangelis @LVangelis

Actions