Avatar for user118764

user118764

Member since Oct 2020 • Last active Oct 2020
  • 0 conversations
  • 2 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user118764

    Hi Gordon,

    Thanks for getting back to me.

    So I've narrowed the problem to different behaviour between using the Web BT library on MacOS verses on iOS with the WebBLE app.

    Turns out that this code works on MacOS but does nothing on iOS:

    connection.device.ongattserverdisconnect­ed = event => {
    	console.log(`${connection.device.name} disconnected. Reconnecting...`)
    	connection.reconnect(c => console.log('Reconnected'))
    }
    
    

    So now I've changed over to this instead which does work the same on both platforms:

    connection.on('close', event => {
    ...
    

    Reconnection works as expected on MacOS but never works on iOS. The error that is returned immediately upon calling connection.reconnect is this:

    <BLE> ERROR: Premature cancellation.
    

    This causes the close event to trigger again so the reconnect method is called a second time, for which the following error is returned:

    <BLE> ERROR: No known device for device transaction Transaction(id: 287, key: device:connectGATT)
    

    Do you have any idea how I can successfully reconnect the device from iOS?
    Thanks

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user118764

    This seems to be happening to us too. After some time of being connected one or more of the Pucks just stop responding. The Web BT interface doesn’t say anything about a lost connection which it does if the device is brought out of range.

    We’re using Bluetooth.println to send data from the device to the computer for processing.

    This seemed like the perfect solution for what we needed but unless we can get this fixed we may have to look for other solutions.

    Please help me solve this.

Actions