ENTTECProUSB, Linux serial read needs improvement
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- cpp, linux
調査の方向性
Start in common/io/Descriptor.cpp at the Linux-specific Receiver function and inspect how nonblocking serial reads and partial data are handled. Reproduce the ENTTEC Pro USB behavior on Linux if possible, then verify that read readiness and EAGAIN handling prevent checksum errors during discovery and RDM SET/GET operations.
索引モデルが issue の本文から書いたものです。
説明
Hi,
I have a project making a ENTTECproUSB compatible device running on a Linux Box to play with LEDDimmer controls via RDM.
With my workstation an Intel XEON I had little trouble getting the Discovery work reliable but with my Lenovo have the device connected to USB it failed very badly. All kind of Checksum errors happens. I dug deep and found the problem in the common/io/Descriptor.cpp exactly in the Receiver function.
There are two improvements I have done.
- Populate a EAGAIN error to inform the upper stack about a "do it again kernel wasn't ready"
- Add an ipctl() to read if they're the amount of data available we want to read and if not wait and check again (exhaust wait time 110ms)
Below the snippet with some other improvements not show here fix the checksum errors and problems with discovery and all RDM SET/GET entirely.
I have sometime in the coming days and will file a pull request.
Regards
Chris
uint32_t available;
uint8_t loop=10;
int fd = ReadDescriptor();
wait_loop:
ret = ioctl(fd, FIONREAD, &available);
if (available < size) {
usleep(100);
loop--;
if (loop>0)
goto wait_loop;
}
ret = read(ReadDescriptor(), data, size - data_read);
if (ret<0) {
if (errno == EAGAIN || errno == EWOULDBLOCK)
return -EAGAIN;
if (errno != EINTR) {
OLA_WARN << "read failed, " << strerror(errno);
return -1;
}
return ret;
}
else if (ret == 0) {
return 0;
}
data_read += ret;
data += data_read;
}
#endif // _WIN32
return 0;
- 主要言語
- C++
- スター
- 773
- フォーク
- 233
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenLightingProject/ola のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OpenLightingProject/ola#2075 ·
-
Digital Enlightenment / FX5 not recognized対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンquestion Type-DeviceSupport
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
OpenLightingProject/ola#2056 · コメント 2 件 ·
-
Difficulty-Medium Language-C++ Maintainability OpSys-All
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
OpenLightingProject/ola#2053 · コメント 1 件 ·
-
v0.11.0再び着手できるかも @peternewman が 227 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
OpenLightingProject/ola#2038 · コメント 18 件 · 担当者 2 名 ·
-
Ensure we only list an interface once in LIST_INTERFACES対応中かも @iibaranov-IG が 69 日前に担当しました。 オープンbug Component-RDM Difficulty-Medium Language-C++ Priority-Low
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
OpenLightingProject/ola#2037 ·
OpenLightingProject/ola の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#335 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
deepseek-ai/DeepEP#830 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
google-ai-edge/LiteRT-LM#4701 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
HarperFast/rocksdb-js#1131 ·
メンテナーはふだん 1 日以内に返信
-
Swapped cache lookups in ScanModelAndDecideAllDiffExpansion対応中かも @Lian292213 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信