Logic 2.2.6 - High Level Analyzers!

Thanks. We’ll definitely look into that!

Looks like I may need to learn Python :smiley:

It will be interesting to compare trying these versus current V1 analyzers which for example may have started from existing analyzers like Serial. Example I have the one that I helped develop and use at different times to understand the Robotis Dynamixel Servo protocol. Which is Half duplex serial, with a few different protocols (V1 and V2)… My current version is up at: https://github.com/KurtE/SaleaeDynamixelAnalyzer

Likewise there was one for WS2811 LEDS, which I have not looked at in awhile.

But the one I would really like to see is one that helps reduce the output from the USB protocol analyzer.

I already mentioned it in another posting and likewise up on Teensy forum: https://forum.pjrc.com/threads/55457-How-to-do-multiple-REGEX-search-and-replace-operations-in-large-file

But I will often try to capture the USB data when a new device is plugged in. As I mentioned in the thread, sometimes when I capture the data, when I save the data out to csv file it might be over 3 million lines long.

I am manly interested in lines which have data associated with them. Actually I want that line and the line above it, so I often use a unix grep to reduce it:

grep -B1 ",DATA" USB_Capture_WIndows_XBoxOne_Pair_packets2.txt > u2

In the case I mentioned it reduced the lines down to about 000 lines like:

--
5.905691968000000,IN,0x04,0x00,,,0x05
5.905695042000000,DATA1,,,,,0x0000
--
5.906197022000000,SETUP,0x04,0x00,,,0x05
5.906200270000000,DATA0,,,,0x20 0x00 0x00 0x00 0x00 0x00 0x04 0x00,0x2CBF
--
5.906445216000000,OUT,0x04,0x00,,,0x05
5.906448466000000,DATA1,,,,0x59 0x0C 0x01 0x00,0xD42C
--

I then used a regular expression search and replace in Sublimetext

Do Search and replace: ".*\b(IN|OUT|SETUP),0x[0-9]*,(.*)\n.*DATA[0-1],,,(.*\n)" to "$1,$2,$3"

Note: I threw away the timings, although I can imagine others may want that information,
But resulting input to excel ( < 700 lines) sort of looked like, which is a whole lot easier than looking through the original 3 million lines.

SETUP	0x00	0x05		0x00 0x01 0x01 0x00 0x00 0x00 0x00 0x00
IN	0x00	0x05	0x0000	
SETUP	0x00	0x05		0x20 0x00 0x00 0x00 0x00 0x00 0x04 0x00
OUT	0x00	0x05		0x59 0x0C 0x01 0x00
IN	0x00	0x05	0x0000	
IN	0x01	0x13		0x0E 0x04 0x01 0x59 0x0C 0x00
SETUP	0x00	0x05		0x20 0x00 0x00 0x00 0x00 0x00 0x08 0x00
OUT	0x00	0x05		0x01 0x04 0x05 0x33 0x8B 0x9E 0x05 0x00
IN	0x00	0x05	0x0000	
IN	0x01	0x13		0x0F 0x04 0x00 0x01 0x01 0x04
SETUP	0x00	0x05		0x20 0x00 0x00 0x00 0x00 0x00 0x0A 0x00

Do you think something like this is doable with the python high level analyzer?

Analyzer strings are truncated too much at some zooms:

The amount of text shown should be as much as possible in the space available. This is not a new issue.

1 Like

Just wanted to pop in and commend the font scaling changes! My eye’s thank you :slight_smile:

1 Like

We’re working on fixing and upgrading the analyzers to support high-level analyzers. As part of that we’ll also improve their output

If I understand you correctly, you can do that easily with high-level analyzers (HLA)!
In the decode function of the HLA, you can check for the type of the results and return the result only if it’s a DATA result (and None otherwise). This will filter the results and leave only the ones you’re interested in.
We’ll soon add an option to export these results, to allow further analysis in Excel, Python, etc.

Again sounds promising. Currently I get the impression that only Serial, I2C and SPI work with the HLAs?

Also, it is not the “DATA” objects that I want, but more specifically those transactions that either send or receive data (not sure if I explained this correctly). It is sort of a cross between your V1 control transfers output and packets output. I have had the best luck starting from “Packets” mode.

So for example if I have a Teensy 4 with a host USB setup, in this case the mouse example of the USBhost_t3 library. and I capture the usb data for plugging in a USB mouse (This case belkin). I receive a bunch of stuff, which I then export a file, looks like I can not upload text files or zip files here… But this simple example output about 2340 lines. The majority of the lines I don’t care about, for example here are the first 50 lines:

Time [s],PID,Address,Endpoint,Frame #,Data,CRC
2.492700044000000,SETUP,0x00,0x00,,,0x02
2.492724536000000,DATA0,,,,0x80 0x06 0x00 0x01 0x00 0x00 0x08 0x00,0x94EB
2.492792732000000,ACK,,,,,
2.492808040000000,IN,0x00,0x00,,,0x02
2.492834018000000,NAK,,,,,
2.492848440000000,IN,0x00,0x00,,,0x02
2.492874314000000,NAK,,,,,
2.492889108000000,IN,0x00,0x00,,,0x02
2.492915280000000,NAK,,,,,
2.492929840000000,IN,0x00,0x00,,,0x02
2.492955574000000,NAK,,,,,
2.492969906000000,IN,0x00,0x00,,,0x02
2.492995872000000,NAK,,,,,
2.493010642000000,IN,0x00,0x00,,,0x02
2.493036838000000,NAK,,,,,
2.493051408000000,IN,0x00,0x00,,,0x02
2.493077134000000,NAK,,,,,
2.493091474000000,IN,0x00,0x00,,,0x02
2.493117430000000,NAK,,,,,
2.493132208000000,IN,0x00,0x00,,,0x02
2.493158400000000,NAK,,,,,
2.493172942000000,IN,0x00,0x00,,,0x02
2.493198692000000,NAK,,,,,
2.493213040000000,IN,0x00,0x00,,,0x02
2.493238988000000,NAK,,,,,
2.493253776000000,IN,0x00,0x00,,,0x02
2.493279956000000,NAK,,,,,
2.493294506000000,IN,0x00,0x00,,,0x02
2.493320252000000,NAK,,,,,
2.493334574000000,IN,0x00,0x00,,,0x02
2.493360546000000,NAK,,,,,
2.493375342000000,IN,0x00,0x00,,,0x02
2.493401514000000,NAK,,,,,
2.493496916000000,IN,0x00,0x00,,,0x02
2.493523074000000,NAK,,,,,
2.493537474000000,IN,0x00,0x00,,,0x02
2.493563370000000,NAK,,,,,
2.493700044000000,IN,0x00,0x00,,,0x02
2.493725898000000,DATA1,,,,0x12 0x01 0x10 0x01 0x00 0x00 0x00 0x08,0x7711
2.493793538000000,ACK,,,,,
2.493807368000000,OUT,0x00,0x00,,,0x02
2.493831870000000,DATA1,,,,,0x0000
2.493857528000000,ACK,,,,,
2.494777690000000,SETUP,0x00,0x00,,,0x02
2.494802172000000,DATA0,,,,0x00 0x05 0x01 0x00 0x00 0x00 0x00 0x00,0x25EB
2.494870984000000,ACK,,,,,
2.494885942000000,IN,0x00,0x00,,,0x02
2.494911952000000,NAK,,,,,

I don’t need or want all of those IN/NAK combinations. Note the higher speed Bluetooth communications have a lot of other things I don’t need, like start of frames…

In the above lines there is about 4 things of interest.

The grep I mentioned strips this down to a file of about 314 line that look like:

2.492700044000000,SETUP,0x00,0x00,,,0x02
2.492724536000000,DATA0,,,,0x80 0x06 0x00 0x01 0x00 0x00 0x08 0x00,0x94EB
--
2.493700044000000,IN,0x00,0x00,,,0x02
2.493725898000000,DATA1,,,,0x12 0x01 0x10 0x01 0x00 0x00 0x00 0x08,0x7711
--
2.493807368000000,OUT,0x00,0x00,,,0x02
2.493831870000000,DATA1,,,,,0x0000
--
2.494777690000000,SETUP,0x00,0x00,,,0x02
2.494802172000000,DATA0,,,,0x00 0x05 0x01 0x00 0x00 0x00 0x00 0x00,0x25EB
--

This again can be mostly good enough especially if you get rid of the – lines.
But I then usually edit such as to remove the – lines plus convert the two lines into one… I currently strip out time stamp but if I were programmatically doing it, I would probably leave one.

So my edit knocks this down to 105 lines, which the first one look like:

SETUP,0x00,,,0x02,,0x80 0x06 0x00 0x01 0x00 0x00 0x08 0x00,0x94EB
IN,0x00,,,0x02,,0x12 0x01 0x10 0x01 0x00 0x00 0x00 0x08,0x7711
OUT,0x00,,,0x02,,,0x0000
SETUP,0x00,,,0x02,,0x00 0x05 0x01 0x00 0x00 0x00 0x00 0x00,0x25EB
IN,0x00,,,0x02,,,0x0000
SETUP,0x00,,,0x1D,,0x80 0x06 0x00 0x01 0x00 0x00 0x12 0x00,0xF4E0

Again it will be fun to see what initial ones you setup for USB. Again I am assuming that the USB analyzer is not yet setup to work with HLA? If it is, is there some more documents/examples/

Thanks

As @halbert has mentioned I am also getting crashes of Logic 2.2.6. I am running a mostly up-to-date manjaro install with a Pro Logic 8. Config in the attached image


I have a full terminal log of a crashed session but am unable to upload here (only accepts images apparently).

Last few lines of terminal output:
State Handler [13427]
State Handler [37047]
State Handler [13431]
State Handler [37088]
State Handler [13435]
State Handler [37126]
State Handler [13439]
State Handler [37158]
State Handler [13443]
State Handler [37197]
State Handler [13446]
State Handler [37237]
terminate called after throwing an instance of ‘Saleae::SaleaeException’
what(): Invalid data sequence or position

Let me know if you want me to collect any other information.

Thanks for letting us know! We’ll look into this on Monday

Currently I get the impression that only Serial, I2C and SPI work with the HLAs?

Yes, but not for long…

If you’d like, you can send us a capture (an .sal file) and we’ll build an example HLA for you :slight_smile:

Thanks sounds great. I captured one with current beta. Does not have same data as V1 as can not setup capture type, but does startup the mouse.

Let me know if this one works.

And again great stuff

Kurt

mouse_usb_capture.sal (67.1 KB)

1 Like

Thanks, we’ll work on that next week

Thanks, will be interesting to see it.

Hi, I’ve watched your new youtube video and decided to pull out my old Logic Pro 8 and try out the new version.
So I’ve uninstalled the 1.x logic version, downloaded the new 2.2.6 one and installed it. One reboot later, I start the Logic software, let it load it’s stuff, connect the logic pro 8 and the software crashes.

What I’ve found in the Event Viewer is this warning:

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{2593F8B9-4EAF-457C-B68A-50F6B8EA6B54}
and APPID
{15C20B67-12E7-4BB6-92BB-7AFF07997402}
to the user DESKTOP-PAKBN3C\onipe SID (S-1-5-21-42174576-286379690-756045600-1001) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

I believe I’ve identified the issue. I was connecting the device to a usb 2 port; When connected tot a usb 3 port, the device connected successfully and I was able to use it

1 Like

We’re glad to hear that it’s working now!
We need to a warning when connecting the device via USB 2.0.

What do you think about it so far?

1 Like

The looks are modern, reminds me of VS Code, and I love that.

I’ve been having some issues with importing some old captures ( V1.2.something on linux ) into the new 2.2.6 windows x64.
The capture has the .logicdata extension , and after changing it to .sal , it still doesn’t recognize it.
Should I install a non Alpha version and try to load in that and re-save it?
I would like to write an analyzer for it in python, since it seems to be easier than the old cpp way, but I can’t do that atm.

1 Like

First of all, thanks! :slight_smile:
Unfortunately, we don’t support loading Logic 1.2.X captures at the moment. You can vote for this feature if you’d like here.

I would like to write an analyzer for it in python, since it seems to be easier than the old cpp way, but I can’t do that atm.

Let us know if we can help with anything…

Can I try importing it in a more recent V1 and save it then, and try again in V2.2.6, or does the new version doesn’t work with any V1 ?

It doesn’t work at all, sorry…
Logic 2 is a completely new software and we store the data differently (more efficiently). We might be able to add converters later.

Ok. Thanks. I will ask for this feature as you have suggested.
Have a great day!

1 Like