You are not logged in.

#1 2017-04-09 22:53:57

t3kk3n
Member
Registered: 2014-04-18
Posts: 24

Libusb access and overflow errors

I have a weird issue going on, and I'm posting here since I'm pretty much stumped at this point. I have two devices, a USB based logic analyzer, and a EEPROM programmer; both used to work just fine on any of my computers, but as of recently (about a month), the following has been occurring:

The first program, minipro (https://github.com/vdudouyt/minipro), returns:

IO error: bulk_transfer: LIBUSB_ERROR_OVERFLOW

whenever I try to read any EEPROM chip with the programmer. The second program in question, sigrok (https://sigrok.org/), gives me the following whenever I try to use my logic analyzer:

<$ sigrok-cli --scan>
sr: ezusb: failed to open device: LIBUSB_ERROR_ACCESS.
sr: saleae-logic16: Firmware upload failed.
The following devices were found:
demo - Demo device with 12 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3
saleae-logic16 - Saleae Logic16 with 16 channels: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

When run as root:

sr: la8/la16: Failed to get product string descriptor: LIBUSB_ERROR_TIMEOUT.
sr: resource: Failed to locate 'saleae-logic16-fx2.fw'.
sr: resource: Failed to open resource 'saleae-logic16-fx2.fw'.
sr: saleae-logic16: Firmware upload failed.
The following devices were found:
demo - Demo device with 12 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3
saleae-logic16 - Saleae Logic16 with 16 channels: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

I have searched on google for some time, and I'm not finding all too much that steers me in the proper direction. Has anyone ever experienced anything like this before? It could be a version mismatch for all I know. I'm able to mount my galaxy S5 no problem using jmtpfs, my USB mouse works, and no real errors are being seen in dmesg or journalctl logs. The only part that seems different is the following, found in dmesg:

[    4.404728] usb 1-1.7: config 1 interface 0 altsetting 0 has 2 endpoint descriptors, different from the interface descriptor's value: 1

Before I start throwing nuts and bolts at this, along with my sanity, any advise? Thanks!

(Edited title for better clarity, and removed the part about python, as it seems python has nothing to do with this? I'm just confused at this point more than anything)

Last edited by t3kk3n (2017-04-10 06:22:52)

Offline

#2 2017-04-09 23:05:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: Libusb access and overflow errors

Do `pacman -Q linux` and `uname -a` give the same kernel version numbers?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-04-09 23:08:20

t3kk3n
Member
Registered: 2014-04-18
Posts: 24

Re: Libusb access and overflow errors

casper@ltp01[/home/casper] - pacman -Q linux                                                                                                                                            
linux 4.10.6-1

casper@ltp01[/home/casper] - uname -a                                                                                                                                                   
Linux ltp01 4.10.6-1-ARCH #1 SMP PREEMPT Mon Mar 27 08:28:22 CEST 2017 x86_64 GNU/Linux

They sure do!

Offline

#4 2017-04-10 06:08:51

t3kk3n
Member
Registered: 2014-04-18
Posts: 24

Re: Libusb access and overflow errors

Bumping for good luck; I really need to use my programmer, and I'm clearly getting no where. It's 0200 in the morning here, and I've been searching for an hour so far. Could this be related to udev? Spotted a few references to it, but still no dice.

Edit: I fired up VirtualBox and ran Windows, to test my devices. All seems good, so it's confirmed not to be a hardware issue.

Last edited by t3kk3n (2017-04-23 18:27:47)

Offline

#5 2017-04-23 18:28:16

t3kk3n
Member
Registered: 2014-04-18
Posts: 24

Re: Libusb access and overflow errors

Bumping for hope?

Offline

#6 2017-04-23 19:18:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: Libusb access and overflow errors


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2017-04-23 19:21:00

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 386

Re: Libusb access and overflow errors

I was waiting for

Bumping for desperation

...but a Google search on your "demo" line yielded this suspect starting here: "Not surprisingly, in the absence of the actual firmware binary, sigrok-cli is not able to program the device for its intended use." Link: https://grenville.wordpress.com/2015/01 … -analyser/

I really hope it helps your effort--you've pleaded so nicely. Buena Suerte! big_smile


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#8 2017-04-24 19:38:42

t3kk3n
Member
Registered: 2014-04-18
Posts: 24

Re: Libusb access and overflow errors

c00ter, thanks for the kind words... However, just because the output mentions Saleae Logic16, doesn't mean it's the actual device; I already have a 16 channel knock off brand, that works wonderfully with sigrok. The issue at hand is the libusb issues on this laptop. To the moderator - sorry, I forgot to read your fine rules from the start. Sue me.

To further on the issue - I guess it's not a big deal now, I'll go somewhere else for help.

Offline

#9 2017-04-24 19:59:55

olegabrielz
Member
From: Norway
Registered: 2015-12-23
Posts: 255

Re: Libusb access and overflow errors

t3kk3n wrote:

... To the moderator - sorry, I forgot to read your fine rules from the start. Sue me.

This is absolutely unnecessary. The moderators here are doing a fantastic job in supporting people and at the same time keeping these forums healthy. There is nothing wrong with the rules. Please respect them, and the moderators.

https://wiki.archlinux.org/index.php/Co … _the_staff

Last edited by olegabrielz (2017-04-25 09:53:12)


Be aware of my Newbie Powers

Offline

#10 2017-04-24 23:22:44

t3kk3n
Member
Registered: 2014-04-18
Posts: 24

Re: Libusb access and overflow errors

I never said anything about the rules being wrong.

How weird this sounds, I'm ... admitting I was in the wrong. Sue me.

To make this thread a bit healthier, I've switched all programming tasks I perform, onto my camera lab/station in my back room, and no more weird libusb issues are popping up. I should also note that this laptop I'm having the main issues on, has an arch installation dated back some time; maybe there is some sort of libusb version voodoo happening? I may toss a spare hard drive into this laptop and do a quick install and run up of said software, maybe to use as a test case. I *do* need this solved eventually, as I don't feel like severely changing my current setup! (Running an electronics repair shop)

Offline

#11 2017-04-24 23:54:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: Libusb access and overflow errors

No worries t3kk3n.  Tone is easily lost in text-only communication.  I think olegabrielz may have interpreted your post as a sarcastic reply when perhaps you meant it at face value.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2017-04-25 10:09:10

olegabrielz
Member
From: Norway
Registered: 2015-12-23
Posts: 255

Re: Libusb access and overflow errors

@Trilby: Spot on.
@t3kk3n: Sorry.


Be aware of my Newbie Powers

Offline

#13 2017-04-25 12:25:18

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Libusb access and overflow errors

The error means that the device is sending more data than is expected by libusb at this point what is either a bug in the client code, libusb or the driver OR the driver actively unsupporting knock offs ...
Does it work with the lts kernel?

Offline

#14 2017-04-26 14:00:59

t3kk3n
Member
Registered: 2014-04-18
Posts: 24

Re: Libusb access and overflow errors

Just tried the LTS kernel, no go.

So to clarify right quick...The firmware messages are NOT part of my issue. The errors I have posted are for two separate programs, they are in different code blocks. The following two errors I get for sigrok (the usb issues) when I attempt to use my logic analyzer:

sr: ezusb: failed to open device: LIBUSB_ERROR_ACCESS   <-- when not using sudo

<and>

sr: la8/la16: Failed to get product string descriptor: LIBUSB_ERROR_TIMEOUT    <-- when using sudo

The following error, I get for minipro with my TL866A programmer:

IO error: bulk_transfer: LIBUSB_ERROR_OVERFLOW

The firmware issues that are listed above are NOT part of the active issue, please disregard those! I just didn't have the firmware installed on the host machine at the time, that error was expected at that point in time. Sorry for not clarifying this earlier, I thought that was obvious, whoops!

I can safely rule out 'a bug in the client code' for either of these programs - both devices and programs are confirmed working on my lab computer, which is a raspberry pi I'm using to drive my microscope camera. (raspberry pi 3, uname output - Linux wrkb02 4.9.20-1-ARCH #1 SMP Sun Apr 2 19:55:41 MDT 2017 armv7l GNU/Linux)

The only other thing I have to say is, that both the laptop and desktop I can replicate these issues on, I have installed arch linux on these computers some time ago. I want to say oh, around two years old, give or take some. Almost seems like a stupid permissions glitch somewhere? I think I'm close.

Last edited by t3kk3n (2017-04-26 14:01:37)

Offline

#15 2017-10-24 03:25:11

JD72
Member
Registered: 2017-10-24
Posts: 2

Re: Libusb access and overflow errors

t3kk3n wrote:

When run as root:

<$ sigrok-cli --scan>
sr: la8/la16: Failed to get product string descriptor: LIBUSB_ERROR_TIMEOUT.
sr: resource: Failed to locate 'saleae-logic16-fx2.fw'.
sr: resource: Failed to open resource 'saleae-logic16-fx2.fw'.
sr: saleae-logic16: Firmware upload failed.
The following devices were found:
demo - Demo device with 12 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3
saleae-logic16 - Saleae Logic16 with 16 channels: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

I've just solved the problem. If you still interested in it, I will explain what I've done.

Offline

#16 2017-10-24 07:43:00

seth
Member
Registered: 2012-09-03
Posts: 49,992

Offline

#17 2017-10-24 12:35:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: Libusb access and overflow errors

*confused*

The OP is supposed to say what worked when they find a solution.  But a random person stopping by to say they solved a problem that someone else is looking for the solution to but withholding that said solution is really just a dick thing to do.

However, I gather these may actually be two accounts belonging to the same person and they just responded from their second account.  This, however, is also against the rules.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#18 2017-10-24 12:51:49

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Libusb access and overflow errors

To unconfuse you: I did't look at the account since I didn't anticipate a random person stopping by claiming to have solved the OPs (very) particular issue and not simply posting the solution but advertising it.
Let's see if one can colorize the thread starter ... smile

Offline

#19 2017-10-24 15:22:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: Libusb access and overflow errors

I made casual check using my moderator powers and it appears (on the surface) that those two accounts are not the same person.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#20 2017-10-25 03:22:29

JD72
Member
Registered: 2017-10-24
Posts: 2

Re: Libusb access and overflow errors

My oppologies
I'm really sorry for that I recently alarmed the community by my misbehavior. But it was early morning and I've been tired after sleepless night in front of the screen of my PC. By the way, it isn't my native language and it'n not easy for me to express my thoughts in English.

But to the point
I get this output while I run Pulseview as root with my Saleae Logic16 clone logic analyzer:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
sr: resource: Failed to open resource 'saleae-logic16-fx2.fw' (use loglevel 5/spew for details).
sr: saleae-logic16: Firmware upload failed.
sr: saleae-logic16: Failed to init device.
sr: saleae-logic16: Unable to open device.

Then I've found solution there:

...Update: September 3, 2015 blight has an alternative open source fpga bitstream. It also works. See [2] for both source and binaries.

downloaded ZIP archive from link [2], unpacked it and read README. Then I've (all as root) made folder "/usr/local/share/sigrok-firmware/" copied with rename files from "bin" folder of the archive to  "/usr/local/share/sigrok-firmware/":

cp bin/la16fw-fx2.fw /usr/local/share/sigrok-firmware/saleae-logic16-fx2.fw
cp bin/la16fw-fpga-18.bitstream /usr/local/share/sigrok-firmware/saleae-logic16-fpga-18.bitstream
cp bin/la16fw-fpga-33.bitstream /usr/local/share/sigrok-firmware/saleae-logic16-fpga-33.bitstream

Then I run Pulseview as root again:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

Everything work at once.
-------------------------------------------------------------------------
But could anyone answer me how to run it as user?

sr: ezusb: failed to open device: LIBUSB_ERROR_ACCESS.
sr: saleae-logic16: Firmware upload failed.
sr: saleae-logic16: Failed to open device: LIBUSB_ERROR_ACCESS.
sr: saleae-logic16: Unable to open device.

Offline

Board footer

Powered by FluxBB