delgoodie
Posts: 5
Joined: Wed Nov 06, 2019 12:07 am

supported = 2 detected = 0

Wed Nov 06, 2019 12:19 am

So I've seen this error in other post but before you quit reading this, I think mine is different(but I am a complete beginner at this). I got the StereoPi with a CM3+ and I plugged in the cameras and tested the special os they gave me which just displays the images through hdmi. This gave me the confidence that all the hardware must be correct if I can see the images. I then flashed a different sd card with regular rasbian and downloaded the dualcam dts file. I converted the dts to dtb. Then I did some magic (I assume this adds the dtb to the existing one in start.elf) by typing "sudo cp dt-blob-dualcam.dtb /boot/dt-blob.bin". I restarted and typed vcgencmd get_camera and got supported = 2, which shows that the dualcam dts worked, but detected = 0. I tried disabling I2C, unplugging and re-plugging the cameras, and running the default os to make sure the harware was still correct. I also checked the gpio pins and they match up with others in forums that said they got their cameras to work. Lastly, I checked the dts file and it matched with the one I thought I was getting from raspberrypi.org(sanity check). I'll try anything! Thanks

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2439
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: supported = 2 detected = 0

Wed Nov 06, 2019 10:00 am

Which GPIOs are you using for the cameras? Have you got pull-ups on the I2C lines? Please post the contents of the pins_cm3 section of your dt-blob.dts.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7416
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: supported = 2 detected = 0

Wed Nov 06, 2019 12:36 pm

If StereoPi ship with a special OS card, then copy dt-blob.bin from /boot on that card to /boot on your Raspbian install.
With the CM there are so many ways that they could potentially have wired that up which may or may not match the default setup.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

delgoodie
Posts: 5
Joined: Wed Nov 06, 2019 12:07 am

Re: supported = 2 detected = 0

Wed Nov 06, 2019 1:33 pm

Thanks so much I will try this!

delgoodie
Posts: 5
Joined: Wed Nov 06, 2019 12:07 am

Re: supported = 2 detected = 0

Thu Nov 07, 2019 1:39 am

So i plugged the stereoPi sd card into my actual computer (the sd card that shows the cameras and works), and i copied the config.txt and dt-blob-dualcam.dts file to my google drive (these were the only files I found that related to the camera). Then I downloaded a fresh rasbian on my personal sd card and put it in the pi. I went to google drive, got the files, and replaced the config.txt file. I took the dt-blob-dualcam.dts file and converted it to dtb and put it in my dt-blob.bin file using the commands I wrote in my intial post. Enabling camera and restarting the pi still gave me the same results, vcgencdm get_camera
support = 2
detected = 0

I know this is a lot so thanks so much if you actually spend the time and look through it! I am relatively new to pi but I'm coming from a solid use in programming and a beginner level arduino hobbyist. (If you don't think this qualifies me for the pi, you're probably right but I need this kind of processing power for machine vision!)

These are the gpio pins:
[email protected]:~ $ sudo raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 fsel=0 func=INPUT
GPIO 1: level=1 fsel=0 func=INPUT
GPIO 2: level=0 fsel=1 func=OUTPUT
GPIO 3: level=0 fsel=1 func=OUTPUT
GPIO 4: level=1 fsel=0 func=INPUT
GPIO 5: level=1 fsel=0 func=INPUT
GPIO 6: level=1 fsel=0 func=INPUT
GPIO 7: level=1 fsel=0 func=INPUT
GPIO 8: level=1 fsel=0 func=INPUT
GPIO 9: level=0 fsel=0 func=INPUT
GPIO 10: level=0 fsel=0 func=INPUT
GPIO 11: level=0 fsel=0 func=INPUT
GPIO 12: level=0 fsel=0 func=INPUT
GPIO 13: level=0 fsel=0 func=INPUT
GPIO 14: level=1 fsel=4 alt=0 func=TXD0
GPIO 15: level=1 fsel=4 alt=0 func=RXD0
GPIO 16: level=0 fsel=0 func=INPUT
GPIO 17: level=0 fsel=0 func=INPUT
GPIO 18: level=0 fsel=0 func=INPUT
GPIO 19: level=0 fsel=0 func=INPUT
GPIO 20: level=0 fsel=0 func=INPUT
GPIO 21: level=0 fsel=0 func=INPUT
GPIO 22: level=0 fsel=0 func=INPUT
GPIO 23: level=0 fsel=0 func=INPUT
GPIO 24: level=0 fsel=0 func=INPUT
GPIO 25: level=0 fsel=0 func=INPUT
GPIO 26: level=0 fsel=0 func=INPUT
GPIO 27: level=0 fsel=0 func=INPUT
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=4 alt=0 func=SDA0
GPIO 29: level=1 fsel=4 alt=0 func=SCL0
GPIO 30: level=0 fsel=1 func=OUTPUT
GPIO 31: level=0 fsel=1 func=OUTPUT
GPIO 32: level=0 fsel=0 func=INPUT
GPIO 33: level=0 fsel=0 func=INPUT
GPIO 34: level=0 fsel=0 func=INPUT
GPIO 35: level=1 fsel=0 func=INPUT
GPIO 36: level=1 fsel=0 func=INPUT
GPIO 37: level=0 fsel=0 func=INPUT
GPIO 38: level=0 fsel=0 func=INPUT
GPIO 39: level=0 fsel=0 func=INPUT
GPIO 40: level=0 fsel=0 func=INPUT
GPIO 41: level=0 fsel=0 func=INPUT
GPIO 42: level=0 fsel=0 func=INPUT
GPIO 43: level=0 fsel=0 func=INPUT
GPIO 44: level=0 fsel=0 func=INPUT
GPIO 45: level=0 fsel=0 func=INPUT
BANK2 (GPIO 46 to 53):
GPIO 46: level=1 fsel=0 func=INPUT
GPIO 47: level=1 fsel=1 func=OUTPUT
GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK
GPIO 49: level=1 fsel=4 alt=0 func=SD0_CMD
GPIO 50: level=1 fsel=4 alt=0 func=SD0_DAT0
GPIO 51: level=1 fsel=4 alt=0 func=SD0_DAT1
GPIO 52: level=1 fsel=4 alt=0 func=SD0_DAT2
GPIO 53: level=1 fsel=4 alt=0 func=SD0_DAT3


This is my dt-blob-dualcam.dtb file:
[email protected]:~ $ fdtdump dt-blob-dualcam.dtb

/dts-v1/;
// magic: 0xd00dfeed
// totalsize: 0x2022 (8226)
// off_dt_struct: 0x38
// off_dt_strings: 0x1fd8
// off_mem_rsvmap: 0x28
// version: 17
// last_comp_version: 16
// boot_cpuid_phys: 0x0
// size_dt_strings: 0x4a
// size_dt_struct: 0x1fa0

/ {
videocore {
pins_cm {
pin_config {
[email protected] {
polarity = "active_high";
termination = "pull_down";
startup_state = "inactive";
function = "input";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "pull_down";
};
[email protected] {
function = "input";
termination = "no_pulling";
drive_strength_mA = <0x00000008>;
polarity = "active_high";
};
[email protected] {
function = "output";
termination = "no_pulling";
drive_strength_mA = <0x00000008>;
polarity = "active_low";
startup_state = "active";
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
};
pin_defines {
[email protected]_ENABLE {
type = "internal";
number = <0x0000002f>;
};
[email protected]_CAMERAS {
type = "internal";
number = <0x00000002>;
};
[email protected]_0_LED {
type = "internal";
number = <0x00000002>;
};
[email protected]_0_SHUTDOWN {
type = "internal";
number = <0x00000003>;
};
[email protected]_0_UNICAM_PORT {
type = "internal";
number = <0x00000001>;
};
[email protected]_0_I2C_PORT {
type = "internal";
number = <0x00000000>;
};
[email protected]_0_SDA_PIN {
type = "internal";
number = <0x00000000>;
};
[email protected]_0_SCL_PIN {
type = "internal";
number = <0x00000001>;
};
[email protected]_1_LED {
type = "internal";
number = <0x0000001e>;
};
[email protected]_1_SHUTDOWN {
type = "internal";
number = <0x0000001f>;
};
[email protected]_1_UNICAM_PORT {
type = "internal";
number = <0x00000000>;
};
[email protected]_1_I2C_PORT {
type = "internal";
number = <0x00000000>;
};
[email protected]_1_SDA_PIN {
type = "internal";
number = <0x0000001c>;
};
[email protected]_1_SCL_PIN {
type = "internal";
number = <0x0000001d>;
};
};
};
pins_cm3 {
pin_config {
[email protected] {
polarity = "active_high";
termination = "pull_down";
startup_state = "inactive";
function = "input";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "uart0";
termination = "no_pulling";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "uart0";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "output";
termination = "no_pulling";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "input";
termination = "pull_up";
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "sdcard";
termination = "pull_up";
drive_strength_mA = <0x00000008>;
};
[email protected] {
function = "input";
termination = "no_pulling";
polarity = "active_low";
};
[email protected] {
function = "output";
termination = "no_pulling";
polarity = "active_low";
};
};
pin_defines {
[email protected]_CONTROL_ATTACHED {
type = "external";
number = <0x00000000>;
};
[email protected]_ENABLE {
type = "external";
number = <0x00000001>;
};
[email protected]_LOW {
type = "absent";
};
[email protected]_DISK_ACTIVITY {
type = "absent";
};
[email protected]_RUN {
type = "absent";
};
[email protected]_SDA {
type = "internal";
number = <0x0000002e>;
};
[email protected]_SCL {
type = "internal";
number = <0x0000002f>;
};
[email protected]_CLK {
type = "absent";
};
[email protected]_LPO_CLK {
type = "absent";
};
[email protected]_LIMIT_1A2 {
type = "absent";
};
[email protected]_1V8_SEL {
type = "absent";
};
[email protected] {
type = "absent";
};
[email protected] {
type = "absent";
};
[email protected]_MODE {
type = "absent";
};
[email protected]_CARD_DETECT {
type = "absent";
};
[email protected]_SDA {
type = "absent";
};
[email protected]_SCL {
type = "absent";
};
[email protected]_CAMERAS {
type = "internal";
number = <0x00000002>;
};
[email protected]_0_LED {
type = "internal";
number = <0x00000002>;
};
[email protected]_0_SHUTDOWN {
type = "internal";
number = <0x00000003>;
};
[email protected]_0_UNICAM_PORT {
type = "internal";
number = <0x00000001>;
};
[email protected]_0_I2C_PORT {
type = "internal";
number = <0x00000000>;
};
[email protected]_0_SDA_PIN {
type = "internal";
number = <0x00000000>;
};
[email protected]_0_SCL_PIN {
type = "internal";
number = <0x00000001>;
};
[email protected]_1_LED {
type = "internal";
number = <0x0000001e>;
};
[email protected]_1_SHUTDOWN {
type = "internal";
number = <0x0000001f>;
};
[email protected]_1_UNICAM_PORT {
type = "internal";
number = <0x00000000>;
};
[email protected]_1_I2C_PORT {
type = "internal";
number = <0x00000000>;
};
[email protected]_1_SDA_PIN {
type = "internal";
number = <0x0000001c>;
};
[email protected]_1_SCL_PIN {
type = "internal";
number = <0x0000001d>;
};
};
};
};
};

Also, these are the only uncommented lines in my config.txt
disable_overscan=1
start_x=1
gpu_mem=192
enable_uart=1
dtoverlay=pi3-disable-bt
disable_splash=1

delgoodie
Posts: 5
Joined: Wed Nov 06, 2019 12:07 am

Re: supported = 2 detected = 0

Thu Nov 07, 2019 1:23 pm

I also realized a way I could bypass trying to find the errors in regular rasbian. If anyone knows how I could go about working backwards and converting the working stereoPi os into desktop mode. When you boot the cm3+ with the stereoPi os, it shows some terminal text, like other os', and then it goes into a fullscreen view of both images. There is no terminal or mouse/keyboard communication. I assume that there is some file displaying the cameras that gets called in one of the boot files but I couldn't find the boot file containing it, or the actual file being run. I did find a stereoPi file which just has some config settings for the camera but it doesn't appear to cause any actions. It also came to me that if I could access the terminal I might be able to use sudo raspi-config to enable the desktop mode on boot, as I'm sure it must be disabled, this would allow me to use it like a regular pi, right?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7416
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: supported = 2 detected = 0

Thu Nov 07, 2019 3:24 pm

When in doubt look on the StereoPi website
https://wiki.stereopi.com/index.php?tit ... lob.bin.29 gives you the dt-blob.dts

https://wiki.stereopi.com/files/main_rpi_cm.pdf gives you the schematic. Cam0 uses GPIOs 44&39 for power control, and Cam1 uses GPIOs 45&37 (although 37 isn't defined as an output, and dt-blob.dts actually configures 30 instead, which is also an input).

I'd suggest you take the dt-blob.dts or .bin file from their website and give it a go.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

delgoodie
Posts: 5
Joined: Wed Nov 06, 2019 12:07 am

Re: supported = 2 detected = 0

Fri Nov 08, 2019 12:50 pm

So I finally found a way around my problem: using an image already flashed with opencv that is compatible for StereoPi.
I recommend that anyone using the stereoPi should avoid the hassle of trying to access the cameras through regular rasbian and just download https://github.com/realizator/stereopi-tutorial and put in on your os sd card.

Code: Select all

raspistill
works right off the bat, no configuration.

Return to “Compute Module”