lsongdev / lsongdev/node-bluetooth

How can I know if the connection is always open ?

オープン
#30 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C++
スター
205
フォーク
56
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ファイルやテストは指定されていません。まず node-bluetooth における connection.isOpen()、接続切断の処理、書き込み経路を追跡し、指定された Node v8.12.0 と node-bluetooth v1.2.5 のバージョンで障害を再現してください。書き込み前に切断された接続を確実に検出でき、キャッチされないエラーが発生しなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
electron, node.js
領域
embedded-iot, networking
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。