Stop acquisition from python script

Hi
would it be possible to stop the acquisition through the same python script I use to analyze the data?

Thanks in advance.

Hi @davide.ferrari, I assume you are using the following software tools?

If so, then unfortunately, Python HLAs do not have the ability to control captures.

In case you are looking to automate starting and stopping of captures, we are currently gathering feedback/user interest in the feature request below. Feel free to add your votes/comments to it if this is something you need!
https://ideas.saleae.com/b/feature-requests/application-api/

Otherwise, as an alternative, we do support automation of captures in our older (no longer supported) Logic v1.x. More information on this below in case you are interested:
https://support.saleae.com/saleae-api-and-sdk/socket-api

Hope this information helps.

Hi Tim
yes I do use Logic 2 with HLA
Ok thanks for the links, I’ll take a look.

@timreyes I’ve seen that there is the so called “Trigger view” which is now limited to trigger on the decoding of a value (hex).
Would it be possible to extend it and to trigger when a pattern (like a string) is reported by the custom analyzer?
In this way for instance I could report “error” form the script and then the capture would be stopped upon errors.

@davide.ferrari Right now, we don’t have a native way of looking for a trigger with regards to a sequence of bytes (or decoded boxes). The Trigger View can only trigger on one decoded box at a time.

As an example in the image below…
Screen Shot 2021-05-04 at 4.28.07 PM

If the Trigger View is attached to the Async Serial analyzer, it can only trigger on a single ASCII character, such as “H” or “e”, but not a combination “He.” The workaround is to use a concatenator extension (like the one shown here) to combine the decoded boxes into a single “Hello Saleae” message. Since all characters are combined in a single decoded box, I am not able to trigger on a sequence of characters, such as “Hello” or “Sal.”

I’m using the Concatenator extension here, as submitted by a community user to our extensions marketplace. More information on installing extensions are below. This extensions seems to be compatible only with our Async Serial analyzer though, but this does open up the possibility for developing extensions like this that are compatible for other analyzers for this purpose.
https://support.saleae.com/extensions/installing-extensions

Thank you I’ll try it out!
It seem a very good workaround.

Hi Tim
the concatenator works only on raw data produced by the Async serial analyzer.
I would need really something triggering on the data produced by my custom python analyzer. It would be really appreciated.

I just re-opened a previous idea we were tracking. I’d like to start gathering feedback on how we can improve triggering on a protocol frame. You brought up some good points on being able to trigger on a sequence of data, rather than just a single protocol frame.
https://ideas.saleae.com/b/feature-requests/trigger-on-protocol-results/

If the data you are triggering on is all in a single Analyzer Frame, you should be able to trigger on it. If you can give an example of the data you are producing, or the source code itself, I would be happy to help!

You had also mentioned stopping the capture - unfortunately the “Trigger View” for analyzers only works for moving the view to the latest trigger, but not stopping the capture altogether. I’m not sure if that’s sufficient for your use-case. This is something we’d like to support, but don’t currently.

Ryan