Bug 1253 - Scan doesn't seem to wait for FX2 renumeration
Summary: Scan doesn't seem to wait for FX2 renumeration
Status: CONFIRMED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Driver: fx2lafw (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-24 20:34 CEST by Uwe Hermann
Modified: 2018-07-24 20:34 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2018-07-24 20:34:39 CEST
Running a --scan in sigrok-cli for fx2lafw devices returns pretty much immediately. It *does* upload a firmware to all scanned potential fx2lafw devices, but doesn't wait for a successful renumeration. The dev_open() does wait for it (or errors out if it didn't work after a certain time).

We should probably have the scan do the same. Otherwise sigrok-cli results (among other things) are pretty confusing:

$ sigrok-cli --scan
The following devices were found:
fx2lafw - CWAV USBee SX with 8 channels: D0 D1 D2 D3 D4 D5 D6 D7
fx2lafw - CWAV USBee SX with 8 channels: D0 D1 D2 D3 D4 D5 D6 D7

Re-run immediately:

$ sigrok-cli --scan
The following devices were found:
[None]

Re-run after a few seconds:

$ sigrok-cli --scan
The following devices were found:
fx2lafw:conn=2.30 - CWAV USBee SX with 8 channels: D0 D1 D2 D3 D4 D5 D6 D7
fx2lafw:conn=2.31 - CWAV USBee SX with 8 channels: D0 D1 D2 D3 D4 D5 D6 D7

The conn will only be shown after successful renumeration, and having to re-run to see this info is not intuitive for users. During renumeration the --scan will return empty, which is also confusing.