On 09/13/2012 12:25 AM, Markus Engel wrote:
> On 12.09.2012 23:35, Bert Vermeulen wrote:
>> On 09/12/2012 04:42 PM, Markus Engel wrote:

>>> 2) I always get a "sigrok-cli only supports one device for
>>> capturing." even if I specify exactly one device using the "-d"
>>> option. This is because run_session tries to find all devices (which
>>> will return the demo dummy device and the sigma in my case) and
>>> checks whether this device list is greater than one, ignoring the
>>> "-d" option. My workaround here was to recompile libsigrok without
>>> the demo driver leaving only one device in the list.
>> 
>> Sounds like a bug indeed, it should ignore demo unless specified
>> directly. However, be advised that you're using sigrok out of git, and
>> the docs may not always be up to date. In this case, you need to call
>> sigrok-cli with "--driver=asix-sigma". That's the new syntax, but
>> hasn't made it into a release yet.
> 
> I think it should ignore everything else if I specify "-d N", shouldn't
> it? I had just a quick look over the code but it seems to me that
> run_session doesn't do its work if more than one device is found. Even if
> I specify "--driver=asix-sigma", consider what happens if you have two
> Sigmas connected. So in my opinion "-d" should pick exactly one device --
> what else is the primary use of this option?

The last released version of sigrok-cli did that, but it didn't do it very
well at all. For example there was no way to specify different options for
each device found, or different probes, or any number of problems. We just
bit the bullet on this one, and declared sigrok-cli unfit for multiple
device capturing -- hence the message "sigrok-cli only supports one device
for capturing."

Multiple device support just needs a better frontend.

The --driver option is used to specifically select a driver, and pass along
any options that driver needs to find the device (e.g. the serial port it's on).

The --device (-d) option is only for options that are applied to a device
once it's been found.


-- 
Bert Vermeulen        [email protected]          email/xmpp

------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to