Logic Pirate and sigrok-cli

The Logic Pirate is a medium speed, low-cost logic analyzer with a USB interface. It can capture up to 256K samples at 20MHz (80MHz with overclock), and is compatible with SUMP logic analyzer client. Get one for $30 at Seeed Studio. Logic Shrimp support available here.

Logic Pirate and sigrok-cli

Postby cwall » Sun Mar 08, 2015 10:10 am

I have not been able to get the Logic Pirate to work with sigrok-cli to get a capture. I think the problem might be that the Logic Pirate does not give the number of probes or maximun number of samples, when it is asked. The Bus Pirate V3.6 which does work, gives the number of channels and the maximun number of samples. This is the only difference that I can see when I use.

sigrok-cli --driver ols:conn=/dev/ttyACM0 --show for the Logic Pirate

" serialcomm
ols - Logic Pirate (40 MHz) FPGA version 2013-06-25
Supported configuration options:
samplerate (10 Hz - 200 MHz in steps of 1 Hz) "

sigrok-cli --driver ols:conn=/dev/ttyUSB0 --show for the Bus Pirate V3.6

" serialcomm
ols - BPv3 with 5 channels: 0 1 2 3 4
Supported configuration options:
Maximum number of samples: 4096
samplerate (10 Hz - 200 MHz in steps of 1 Hz) "

Other than that, the two output files are the same for the show command.

Posts: 1
Joined: Sun Mar 08, 2015 9:40 am

Re: Logic Pirate and sigrok-cli

Postby guttula » Sat Sep 05, 2015 4:36 am

The reason for this is that the Logic Pirate doesn't support the whole extended SUMP protocol. I'm trying to get in contact with somebody who is allowed to make editions to the repository since I've made the necessary changes for the Pirate to correctly support the SUMP metadata. If these changes are applied, then the Pirate should be compatible with the OLS driver in sigrok. If it's not too much effort then you could apply a patch locally in the SVN repository yourself and rebuild the firmware (easier on Windows than Linux).

The patch is currently untested, but it only contains changes to the metadata string, so it shouldn't break anything. If I'm not replying to this thread in a week or so, I probably never managed to set up a working environment on my machine for doing the testing.

If anyone knows what the process for submitting patches is, or knows who is responsible for the repository, I'd love to know :)

Code: Select all
Index: main.c
--- main.c      (revision 2177)
+++ main.c      (working copy)
@@ -525,13 +525,23 @@
static const char id_string[ 4 ] = { "1ALS" };

// http://dangerousprototypes.com/docs/The_Logic_Sniffer%27s_extended_SUMP_protocol#Metadata_command
-static const char meta_info[] = { "\x01" "Logic Pirate ("
+static const char meta_info[] = {
+    "\x01" "Logic Pirate" "\x00"
+//  "\x02" "" "\x00"            //there is no FPGA firmware
+    "\x03" "2015-09-05" "\x00"  //PIC firmware version
+    "\x20" "\x00\x00\x00\x08"   //8 probes
+    "\x21" "\x00\x03\xe8\x00"   //256k sample memory
+//  "\x22" "\x00\x00\x00\x00"   //there is no dynamic memory
#if defined( OVERCLOCK )
-                                  "60"
+    "\x23" "\x03\x93\x87\x00"   //60MHz maximum sample rate
-                                  "40"
+    "\x23" "\x02\x62\x5a\x00"   //40MHz maximum sample rate
-                                  " MHz)" "\x00" "\x02" "2013-06-25" "\x00" "\x00" };
+    "\x24" "\x00\x00\x00\x02"   //protocol version 2
+    "\x40" "\x08"               //8 probes
+    "\x41" "\x02"               //protocol version 2
+    "\x00"
static config_t config = { 0 };
static bool do_fill_ram = false;
static uint32_t delayed_fill_counter = 0;
Posts: 2
Joined: Sat Sep 05, 2015 4:27 am

Return to Logic Pirate