On Fri, 28 Jul 2023 at 06:57, Kent Gibson <warthog618@xxxxxxxxx> wrote: > Your problem is that finding lines this way produces gpiod_lines with > different chip pointers, and gpiod_line_request_bulk_input() is taking > that to mean different chips, so the request itself is failing - but you > didn't check. That was on my list of things to check next, but it was getting late and I wanted to send the failing case as requested. I had guessed that the same line_bulk_same_chip() routine would be the cause of the bulk request failing too. I think that test might be flawed.... > line0 = gpiod_chip_find_line(chip, "GPIO17"); > line1 = gpiod_chip_find_line(chip, "GPIO18"); > line2 = gpiod_chip_find_line(chip, "GPIO19"); This is working for me now, thanks. > Not saying the gpiod_line_request_bulk_input() behaviour is correct, but > given v1 is obsoleted by v2, and there is a reasonable workaround for > v1 (assuming you know the chip the line is on), I'm not sure Bart will > want to fix that quirk. Unfortunately I won't know what chip the line is on, but I have already considered that and plan to have an array of structs containing the "bulk" and the "chip" for each chip that is needed according to the IO line list submitted by the (pesky!) users. > For the same reason, I would suggest that you try libgpiod v2 and use > that instead if you possibly can - assuming libgpiod is fast enough for > your application. libgpiod2 (and any further bugfix to 1.6 for that matter) have the problem of not being currently available as packages in the distributions we use. It is possible that we could serve the package from our _own_ package server which we have been running for a couple of decades, but as we have _just_ been accepted as a mainline Debian package that would seem a little peculiar (and involves trying to explain to machinists how to add extra repositories and set up the associated keys) I think I see the way forwards now. Thanks for your help. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912