correction: la_write_cmd_buf is not the problem cos it would print an error message ("Failed to send command" or "Invalid send command response")
the problem should be hardware/sysclk-sla5032/protocol.c ``` ret = libusb_bulk_transfer(usb->devhdl, EP_REPLY, (uint8_t *)&reply, sizeof(reply), &xfer_len, USB_REPLY_TIMEOUT_MS); if (ret != SR_OK) return ret; ``` which should look like ``` if (ret != 0) { sr_dbg("Failed to receive reply for read register command: %s", libusb_error_name(ret)); return SR_ERR; } ``` -1 == LIBUSB_ERROR_IO == Input/output error. can be caused by a false endpoint (EP_REPLY in this case) this should be visible in the USB captures 2020-08-06 21:04 GMT+02:00, milan hauth <mil...@gmail.com>: > i am not a developer here, so i hope i dont annoy anyone ... > > > > either the vendor software sends the same commands as sigrok > but the vendor software ignores the error > > or the vendor software sends different commands > to get a positive response > > > > can you send captures of the USB traffic > for the working vendor software and for pulseview? > > USB sniffer for windows: https://desowin.org/usbpcap/ > may not work on windows XP > alternatives: > https://sourceforge.net/projects/usbsnoop/ > https://github.com/djpnewton/busdog > > capture traffic only for your sensor > eventually change your USB ports > so that your sensor is the only device on one USB bus > > capture the app start, a short measure, and app close > save the pcap file, compress, send > > > > other than that, > the call stack before the error should be > > hardware/sysclk-sla5032/api.c > ``` > int dev_open( // ... > return sla5032_apply_fpga_config(sdi); > ``` > > hardware/sysclk-sla5032/protocol.c > ``` > int sla5032_apply_fpga_config( // ... > ret = sla5032_is_configured(sdi->conn, &is_configured); > ``` > > hardware/sysclk-sla5032/protocol.c > ``` > int sla5032_is_configured( // ... > ret = la_read_reg(usb, 2, ®2); > ``` > > hardware/sysclk-sla5032/protocol.c > ``` > int la_read_reg( // ... > ret = la_write_cmd_buf(usb, CMD_READ_REG, reg * sizeof(uint32_t), > sizeof(reply), NULL); /* rd reg */ > if (ret != SR_OK) > return ret; > ``` > > ret should be -1 == SR_ERR --> "generic/unspecified error" > > > > if you can compile libsigrok, you can add > ``` > sr_dbg("la_write_cmd_buf: ret = %i", ret); > sr_dbg("libusb_bulk_transfer: ret = %i", ret); > ``` > in the `la_read_reg` function > before the two `if (ret != SR_OK)` lines > > to see what command is causing the error > > > > 2020-08-06 14:15 GMT+02:00, Mike Zomo <kweis...@gmail.com>: >> Hi Soeren, >> >> Thanks for your reply. it was very helpful. I still do not have it >> working but I know more. I purchased the unit from Ebay, the physical >> PCB has some changes from the original 3-1, it is a single PCB now no >> SDIMM carrier, all the components appear the same. The software which >> came with it, would not recognise the device hardware on windows 10. >> But their software ran fine on an old Windows XP lapto, but I still >> could not get Pulseview working. >> >> The logging showed: >> (log level 2) >> SyntaxError: Failed to load decoder signature: import by name failed: >> invalid syntax (pd.py, line 138) >> srd: Traceback (most recent call last): >> srd: File >> "J:\sigrok\PulseView\share\libsigrokdecode\decoders\signature\__init__.py", >> >> line 25, in >> srd: from .pd import Decoder >> srd: File >> "J:\sigrok\PulseView\share\libsigrokdecode\decoders\signature\pd.py", >> line 138 >> srd: incoming = (bin(shiftreg & 0b0000_0010_1001_0001).count('1') + >> data) & 1 >> srd: ^ >> SyntaxError: invalid syntax >> SyntaxError: Failed to load decoder signature: import by name failed: >> invalid syntax (pd.py, line 138) >> srd: Traceback (most recent call last): >> srd: File >> "J:\sigrok\PulseView\share\libsigrokdecode\decoders\signature\__init__.py", >> >> line 25, in >> srd: from .pd import Decoder >> srd: File >> "J:\sigrok\PulseView\share\libsigrokdecode\decoders\signature\pd.py", >> line 138 >> srd: incoming = (bin(shiftreg & 0b0000_0010_1001_0001).count('1') + >> data) & 1 >> srd: ^ >> SyntaxError: invalid syntax >> Notifying user of session error: "generic/unspecified error" >> >> (from demo mode with log level 5) >> sr: log: libsigrok loglevel set to 4. >> srd: libsigrokdecode loglevel set to 4. >> sr: log: libsigrok loglevel set to 5. >> srd: libsigrokdecode loglevel set to 5. >> sr: hwdriver: Scan found 1 devices (sysclk-sla5032). >> sr: device: demo: Closing device instance. >> sr: device: sysclk-sla5032: Opening device instance. >> sr: usb: Trying to open USB device 2.20. >> sr: usb: Opened USB device (VID:PID = 2961:66b0, bus.address = 2.20). >> Notifying user of session error: "generic/unspecified error" >> >> The search path in shown in About is good. >> >> Kind Regards >> >> MikeZ >> On 05/08/2020 23:25, Soeren Apel wrote: >> >> >>> Hello, >>> >>> You can check PV's about window to see where it searches for firmware >>> files. >>> >>> Also, if you increase the log level to 5 before trying to connect to the >>> device, you then can go back to the log window to see what it did and >>> where >>> it failed. >>> >>> If you're still stuck after checking these, please show us the log level >>> 5 >>> log of when you tried connecting to the device. >>> >>> btw, where did you buy it? They are seemingly very rare despite their >>> really nice specs. >>> >>> Regards >>> -Soeren >>> >>> >>> On Wed, 2020-08-05 at 16:26 +0100, Mike Zomo wrote: >>>> HI People, >>>> >>>> I have just purchased a SLA5032 USB logic analyzer which I understood >>>> was supported, I am having major problems getting it to be recognised >>>> by Pulseview. I have renamed the top.bit file to sysclk-sla5032.bit as >>>> instructed and placed it in the folder sigrok-firmware, no joy. >>>> >>>> Any suggestions on how I might proceed would be greatly welcomed. >>>> >>>> MikeZ >>>> >>>> >>>> >>>> _______________________________________________ >>>> sigrok-devel mailing list >>>> sigrok-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/sigrok-devel >> >> >> >> >> _______________________________________________ >> sigrok-devel mailing list >> sigrok-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/sigrok-devel >> > _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel