Arducam ToF returns null frame and libsi4c.s error on Raspberry Pi Zero W

Hi, I’m trying to get my Arducam ToF camera working on a Raspberry Pi Zero W and I just can’t get a frame out of it. The same setup used to work, but now nothing comes through at all. Anyone else seen this?

Could you share a bit more detail about what you’re seeing? Which SDK and example programs are you running, and are there any error messages in the terminal?

Sure. Earlier I was getting an ‘illegal instruction’ error in one of the C++ example programs, even though it was code that ran fine before. After that I installed some older debs to try and fix it, and now the example programs from the official repo complain about /usr/lib/libsi4c.s. On top of that, this line just returns a null pointer every time:

frame = tof.requestFrame(300);

Thanks, that helps narrow it down. Which package versions are you currently on? On the Zero W specifically, the newer SDK builds are known to cause exactly that kind of illegal instruction issue.

I downgraded to what I remember were the last working versions on the Zero W:

  • arducam-tof-sdk-dev 0.1.3
  • arducam-config-parser-dev 0.1.2
  • arducam-usb-sdk-dev 2.0.1

That got me past the illegal instruction error, but I’m still stuck on the libsi4c.s error and the null pointer from requestFrame(300).

Right, so the root cause is that the newer Arducam ToF SDK packages are incompatible with the Raspberry Pi Zero W, and downgrading was the correct step. The libsi4c.s error you’re seeing now is coming from the example programs in the current official repository, which are built against the newer SDK. The old debs and the current repo examples don’t line up.

That makes sense. So which version of the repository should I actually be using to match those older debs?

We’ve put together an older branch of the ToF camera repository so you can use a previous version. Switch to the v1.0.3 branch here and give it another shot:

That branch matches the older package versions you’ve downgraded to.

That did it, it’s working again now. Turns out my kernel was also deprecated and didn’t have the pivariety module integrated in it, so between switching to the v1.0.3 branch and the downgraded debs, I’m finally getting frames again. Thanks for the help!