Arducam 64MP with ethernet extender on Pi 4: embedded data parsing errors slow capture

I’m having a weird issue with my Arducam Hawkeye 64MP (U2648 + B0399) and the ethernet extension. Without the extender the camera works perfectly. With the extender in line I get hundreds of errors like this:

[0:00:42.243768510] [2503] ERROR IPARPI cam_helper.cpp:257 Embedded data buffer parsing failed

They come in at about 10 per second. Eventually it stops and the picture seems to finish, but it’s really unstable. The errors show up even when I run libcamera-hello with no picture at all. Any ideas?

Thanks for the report. Can you share your platform details (Pi model, OS/kernel version)? Also, since the errors only appear with the extender, could you test the CSI cable from both ends of the extender directly to the camera, and try a few different ethernet cables? That’ll help narrow down whether it’s a cable issue or something on the software side.

I’m on a Raspberry Pi 4B running the latest bullseye OS. I tested the CSI cable from both ends of the extender straight to the camera and both are fine. I also tried 4 different ethernet cables of varying lengths, including a short 5 foot one, and none of them work without those parsing errors. So it doesn’t look like a plain cable problem.

We reproduced this here with a Raspberry Pi 4B, kernel 6.1.21, and the U2648 + B0399 64MP module. Interestingly, with the default LAN cable that ships with the U2648, we don’t get any ‘Embedded data buffer parsing failed’ errors. That points at outdated libcamera and the embedded data parsing failing over the ethernet extension. Please update libcamera to the latest version:

wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps

If the error still shows up after that, disable embedded data parsing as a fallback:

export LIBCAMERA_NOTPARSE_EMBEDDED_DATA=0

Since our reproduction with the default LAN cable didn’t show the error, software version or configuration is likely a factor, so try the update first.

I did a fresh install of everything and then re-ran those install commands anyway, and the problem is still there. Exporting LIBCAMERA_NOTPARSE_EMBEDDED_DATA=0 does stop the console error, but capture still takes forever to complete pictures. The same number of pictures complete with and without the variable set — only two pictures from my command. Also, what feature or capability is actually disabled when I set LIBCAMERA_NOTPARSE_EMBEDDED_DATA=0?

Since your first report only mentioned the ‘Embedded data buffer parsing failed’ error, and that error does interfere with normal libcamera operation, please disable embedded data parsing with:

export LIBCAMERA_NOTPARSE_EMBEDDED_DATA=0

One thing to keep in mind: the lens cable itself has a negative impact on data transfer, so using the extension kit will take more time to capture an image. The slower capture with the extender is expected to some degree.

Here’s more detail from my setup. uname -a: Linux pi4b 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux. OS: Raspbian GNU/Linux 11 (bullseye). Hardware: BCM2835, Revision b03111, Raspberry Pi 4 Model B Rev 1.1. Camera: Hawkeye 64MP with ethernet extension (U2648 + B0399).

My test command is:

libcamera-still --tuning-file /usr/share/libcamera/ipa/rpi/vc4/arducam_64mp.json --autofocus-on-capture -t 25000 --datetime -n --timelapse 1000

I ran it with and without the tuning file, and with and without LIBCAMERA_NOTPARSE_EMBEDDED_DATA=0, both with -v 2 for extra debug. Results were the same. I also noticed a single error in dmesg. I’ve attached the logs: libcamera-log-noparsing.txt, libcamera-log-withparsing.txt, and dmesg.txt.

Thanks, those logs match what we’re seeing. The root cause is the embedded data buffer parsing failure, combined with the lens extension cable negatively impacting data transfer, which is why capture takes longer with the extender.

For now the workaround is to close embedded data parsing:

export LIBCAMERA_NOTPARSE_EMBEDDED_DATA=0

Your environment (kernel 6.1.21-v8+ on bullseye, Pi 4B Rev 1.1) is consistent with what we tested. Since our reproduction with the default LAN cable didn’t produce the error, there’s still a software/configuration angle, but disabling embedded data parsing is the current workaround. The extra capture time over the extension is expected due to the cable’s effect on data transfer.