Eurolite Pro MK2 doesn't hot plug properly - LIBUSB_ERROR_BUSY when calling libusb_get_string_descriptor_ascii

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
embedded-iot

調査の方向性

Start with libs/usb/HotplugAgent.cpp and libs/usb/LibUsbAdaptor.cpp, then trace how plugins/usbdmx/EuroliteProFactory.cpp handles device metadata during hotplug. Reproduce the insertion-after-start case and compare it with startup detection; done means the Eurolite Pro MK2 is recognized after insertion without LIBUSB_ERROR_BUSY preventing manufacturer, product, or serial detection.

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

説明

bug Component-Plugin Difficulty-Medium Language-C++ OpSys-Linux Priority-Medium Type-DeviceSupport Usability

As a side note, I've discovered that the Eurolite only works when it is already present when ola starts. If I insert it later, I get this log:

libs/usb/HotplugAgent.cpp:172: USB hotplug event: 2:8 @0x7f4038002e40 [add]
libs/usb/LibUsbAdaptor.cpp:53: libusb_get_string_descriptor_ascii failed: LIBUSB_ERROR_BUSY
libs/usb/LibUsbAdaptor.cpp:129: Failed to get manufacturer name
libs/usb/LibUsbAdaptor.cpp:53: libusb_get_string_descriptor_ascii failed: LIBUSB_ERROR_BUSY
libs/usb/LibUsbAdaptor.cpp:134: Failed to get product name
libs/usb/LibUsbAdaptor.cpp:53: libusb_get_string_descriptor_ascii failed: LIBUSB_ERROR_BUSY
libs/usb/LibUsbAdaptor.cpp:139: Failed to read serial number, the device probably doesn't have one
plugins/usbdmx/EuroliteProFactory.cpp:140: Connected FTDI device with serial  could be a Eurolite USB-DMX512-PRO MK2 but was ignored, because enable_eurolite_mk2 was false and its serial number was not listed specifically in eurolite_mk2_serial
plugins/usbpro/WidgetDetectorThread.cpp:215: Found potential USB Serial device at /dev/ttyUSB0
common/io/Serial.cpp:199: Acquired /var/lock/LCK..ttyUSB0
plugins/usbpro/WidgetDetectorThread.cpp:389: trying stage 0 for 0x7f4040001780
plugins/usbpro/UsbProWidgetDetector.cpp:323: USB Widget didn't respond to messages, esta id 0, device id 0
plugins/usbpro/UsbProWidgetDetector.cpp:326: Is device in USB Controller mode if it's a Goddard?
plugins/usbpro/WidgetDetectorThread.cpp:389: trying stage 1 for 0x7f4040001780
plugins/usbpro/WidgetDetectorThread.cpp:386: no more detectors to try for  0x7f4040001780
common/io/Serial.cpp:247: Released /var/lock/LCK..ttyUSB0

So somehow the libusb_get_string_descriptor_ascii fails and the device information including serial is therefore not known to OLA, causing it to not be recognized. This is not a new issue caused by the serial id check; it also doesn't work with the old method of setting enable_eurolite_mk2=true, as that results in:

libs/usb/HotplugAgent.cpp:172: USB hotplug event: 2:12 @0x7f6580002e40 [add]
libs/usb/LibUsbAdaptor.cpp:53: libusb_get_string_descriptor_ascii failed: LIBUSB_ERROR_BUSY
libs/usb/LibUsbAdaptor.cpp:129: Failed to get manufacturer name
libs/usb/LibUsbAdaptor.cpp:53: libusb_get_string_descriptor_ascii failed: LIBUSB_ERROR_BUSY
libs/usb/LibUsbAdaptor.cpp:134: Failed to get product name
libs/usb/LibUsbAdaptor.cpp:53: libusb_get_string_descriptor_ascii failed: LIBUSB_ERROR_BUSY
libs/usb/LibUsbAdaptor.cpp:139: Failed to read serial number, the device probably doesn't have one
plugins/usbdmx/EuroliteProFactory.cpp:127: Found a probable new Eurolite USB-DMX512-PRO MK2 device with serial 
libs/usb/LibUsbAdaptor.cpp:150: Manufacturer mismatch: FTDI != 

All works fine when the usb device is connected beforehand.

Originally posted by @aroffringa in https://github.com/OpenLightingProject/ola/issues/1932#issuecomment-1925657998

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

環境構築

はじめの一歩

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

OpenLightingProject/ola のほかの issue

OpenLightingProject/ola の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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