Raspberry Pi HQ Camera in Jetson Nano

Hi all, does this driver work with the new, Spetember build of the l4t kernel? The Arducam .deb file does not install and throws this error:
dependency problems prevent configuration of arducam-nvidia-l4t-kernel: arducam-nvidia-l4t-kernel depends on nvidia-l4t-kernel (= 4.9.140-tegra-32.4.3-20200625213407); however: Version of nvidia-l4t-kernel on system is 4.9.140-tegra-32.4.3-20200924161919.

Hi all,

I have the following issue related to this thread:

I installed the kernel for the PI HQ cam, after which I got the camera working. The issue is that now (after the kernal mod.) the other camera, which is the PI V2.1 isn’t recognized any more.

How can I make both cameras work at the same time?

Thanks a lot for your help!
David

@nvidia134 That sounds interesting… would be great if you could share a tutorial!

Thanks

Thank you @mdegans for this valuable suggestion.

-JC

Hi @amey.chaware we have not tested yet the driver with the new L4T build.
Were you able to get the driver working with that L4T version?

-JC

Hi @berger.

We added an update to get the cameras working on the Jetson Nano B01 rev on August.
Are you installing the driver via Debian packages?

Are you able to see the /dev/video0 and /dev/video1 devices?

-JC

Добрый день

I see the device /dev/video0, how do I access it on the local network?

Hi jc,

thanks for the answer. I can see the /dev/video0 (where HQ cam is connected) but I cannot see /dev/video1 (where v2.1 is connected).

I followed the installation procedure below. Hope this helps.

Downloading the debian packages

You can download the Debian packages according to your platform from the following link:

Kernel Debian Packages

Installing the debian packages

Jetson Xavier NX

  • Copy the kernel and dtb debian packages to your board filesystem:

scp debian_nx/nvidia-l4t-kernel_4.9.140-tegra-32.4.3-20200625213407_arm64.deb [jetson-username]@[jetson-ip]:/home/nvidia/ scp debian_nx/nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.4.3-20200625213407_arm64.deb [jetson-username]@[jetson-ip]:/home/nvidia/

  • Install the debian packages in your board:

sudo apt-get install --reinstall ./nvidia-l4t-kernel_4.9.140-tegra-32.4.3-20200625213407_arm64.deb sudo apt-get install --reinstall ./nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.4.3-20200625213407_arm64.deb

  • Enable the dtb changes by modifying the /boot/extlinux/extlinux.conf file:

echo “FDT /boot/dtb/tegra194-p3668-all-p3509-0000.dtb” | sudo tee -a /boot/extlinux/extlinux.conf

  • Reboot your board:

sudo reboot

Thanks for the reply Juan! No, I could not install the driver because the system throws a kernel mismatch error. I also started a issue on your github. Can you tell me how to deal with the mismatch error? It is the same kernel just a more recent build.

Thank you for the patches! They’re great. I hope Nvidia includes them with the next JetPack.

Hi @juan.cruz

do you have any idea on what the issue could be? As described above, I can’t find it still and I should (by my understanding) have the latest version as I followed the above described tutorial of installation just a couple days ago.

Would appreciate your help!

Thanks

Hi @berger.

So I assume you are working on the Xavier NX, right?
I’m asking because we have a thread for NX questions. No problem at all.

Please, notice that you need to install two debian packages: one for the device-tree and one for the kernel.
If the device-tree package is installed properly, you should be able to see both video devices (/dev/video0 and /dev/video1). Some questions:

  • Can you check if there is an error during the packages installation?
  • Have you tested if the v2.1 is recognized when connected to the other port?
  • Are you able to capture with video0?

-JC

Hi @amey.chaware.

I’m sorry you didn’t get it working as expected.

We created the patches based on this sources. If the files that we modified present changes in the new L4T version it could be an important issue.

Which method are you using to install the driver, debian packages or patching?

-JC

hi @juan.cruz,

thanks for the response!

Regarding Xavier: No, I just realized that I copied the wrong part of the instruction into this thread. However, I am pretty sure I used the right instruction (the one for the nano) for the installation.

I also installed both packages and I can’t remember that it gave me any errors.

I now tested the v2.1 on the 0 port and did not connect the other camera as well…however it still doesn’t find it.

With the hq cam connected to video0 I was able to capture images fine.

Hope this helps!

I will try to once more install the two packages…if it makes a difference or I see any errors I will update the post.

Thanks

Thanks for the reply Juan. I used the deb method because I don’t have another Linux machine. I also tried Arducam’s patch which is based on yours. I am not sure exactly what has changed between the June vs September build of the L4T 32.4.3 kernel, but will it be possible to add compatibility for the September build as well? I am guessing not a whole lot is different, but I may be totally wrong.

I now reinstalled it according to the instructions. The pictures below show the installation process.

The v2.1 still isn’t showing up on /dev/video0 if connected (also rebooted between connection change). However the hq cam works fine (and is showing up on /dev/video0).

Hope you have ideas how I come out of this

Jetson Nano

  • Copy the kernel and dtb debian packages to your board filesystem:

scp debian_nano/nvidia-l4t-kernel_4.9.140-tegra-32.4.3-20200625213809_arm64.deb [jetson-username]@[jetson-ip]:/home/nvidia/ scp debian_nano/nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.4.3-20200625213809_arm64.deb [jetson-username]@[jetson-ip]:/home/nvidia/

  • Install the debian packages in your board:

sudo apt-get install --reinstall ./nvidia-l4t-kernel_4.9.140-tegra-32.4.3-20200625213809_arm64.deb sudo apt-get install --reinstall ./nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.4.3-20200625213809_arm64.deb

  • Enable the dtb changes by modifying the /boot/extlinux/extlinux.conf file:

echo “FDT /boot/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb” | sudo tee -a /boot/extlinux/extlinux.conf

  • Reboot your board:

sudo reboot

Hi @berger (and anyone else who’s interested, of course) ,

Here’s a brief tutorial showing how I made up the active cable that allows my unmodified Raspberry Pi HQ camera to work with the Jetson Nano.

Overview

Here’s a diagram of what we’re trying to make. The cable passes through all the signals from the Jetson Nano to the camera unmodified, apart from the ENABLE signal on pin 11. This is passed through the SN74LV1T34 buffer to shift the logic levels from the 1.8V that the Nano uses to the 3.3V that the camera needs.

Power for the buffer IC is taken from the 3.3V and GND lines, and is decoupled using a 100nF multilayer ceramic capacitor (as the IC is a long way from any other decoupling capacitors and you can get weird oscillations and other unwanted effects if you don’t decouple your power supplies properly).

Parts List

Here’s the list of parts I used (not including the camera and cable it was supplied with). I’ve included the order codes for Farnell, which is where I got the parts from, though there’s nothing exotic here so you should be able to source the parts from your favourite supplier.

You’ll need one of each of the following:

  • FFC/FPC Cable, 15 core, 1mm, SAME SIDED CONTACTS 200mm (3385342)

  • SN74LV1T34DBVR BUFFER GATE, LEVEL SHIFTER, SOT-23-5 (3119564)

  • IC Adapter, SMD Connector, SC/SOT/TSOT/TSOP to 6-SIP (1654365)

  • 100nF Multilayer Ceramic Decoupling Capacitor (2309020)

(I grabbed the last one out of my bits box, so the Farnell order code is probably different. However, this is not a critical part, so any similar decoupling capacitor would do and you might be able to get away with omitting it completely).

Here’s what they look like…

About the Cable

It is important to note that the second cable has the connectors on the SAME side, which is different to the cable originally supplied with the camera. This is because the second cable will be soldered on to the end of the first and therefore act as an extension. Using another cable with contacts on the opposite side would reverse the connections between the camera and the Jetson, likely shorting 3.3V to GND and doing other bad things. Don’t do that.

Step 1
Carefully remove pins 1, 2 and 5 from the IC adapter board (as we don’t need them and they’ll get in the way). Make sure not to lift the pad off the board for pin 2 as we’ll need to solder a wire on to that later. Solder the IC onto the board, making sure it is oriented correctly (pin 1 in the top left when viewed like this).

Buffer

Step 2
Solder on the decoupling capacitor.

Buffer with cap

Step 3
Carefully cut either side of 11th core at the end of the new (same side contacts) cable and bend it upwards. This’ll let us connect a wire to that core later on.

Cable mod

Step 4

The pin spacing on the IC adapter is close to what’s needed to solder it directly to the cable, but a bit of adjustment is needed first. You need to space the three pins out so that there is 4mm between each adjacent pair (i.e. 4mm between pins 3 & 4, and 4mm between pins 4 & 6).

When you lay the IC adapter on top of the exposed cable contacts, ping 3, 4 and 6 on the adapter should line up with cores 7, 11 and 15 in the cable.

Step 5

Solder the adapter to the original cable that came with the camera, then solder the new cable on to the end. You should have something that looks like this (though hopefully a bit neater!).

Step 6
Solder a short piece of wire between the bent core 11 on the left hand cable to pin 2 on the IC adapter board.

Step 7
Mark the cable so you know which way round it goes (e.g. J for Jetson and C for Camera).

Step 8
Test for shorts between adjacent lines and open circuits using a multimeter. Rework as required before testing with the real Jetson Nano and camera.

And Finally…
If you’re happy that it works, then some sort of mechanical protection around the area you operated on is probably a good idea.

Since the SN74LV1T34 buffer can operate with 3.3V inputs when powered from a 3.3V supply, you can use the cable with a Raspberry Pi as well as with the Jetson Nano, so if you move the camera between devices (as I do), you don’t have to keep swapping the cable.

Good luck!

Simon

1 Like

thank you for that detailed instruction!