You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I listen to the connection.on "error" and if that is triggered I manually close the connection and set me global variable for bluetoothPrinter to null.
Hi,
For beginning thank you for this node module :).
I have an electron program that open a bluetooth connection and listening the event "data".
How can I know if the connection is always open ?
Before write data I check if the connection is open with connection.isOpen() but this method return true if the connection has been open and lost.
I have try to listen the events "closed", "close", "failure" without any success.
If the connection has been open and lost, when I write data I have an uncatched exception:
Error : Error reading from connection.
The calls to the write method is in try/catch block
Node version : v8.12.0
node-bluetooth: v1.2.5
Thank you for your help.
The text was updated successfully, but these errors were encountered: