#Pi Camera v2.1 - i need help

82 messages · Page 1 of 1 (latest)

manic cedar
#

Well, this is new to me. Could please provide a Link to the device please? Also, I need your /boot/config.txt and the output of vcgencmd get_camera

#

It seems ustreamer cant read the data from the cam. Also it has some settings that arent supported by v4l2.

#

(The section in log with 0x..... entries)

#
[01/01/23 20:27:16] crowsnest:         1: -3667 (0xfffffffffffff1ad)
[01/01/23 20:27:16] crowsnest:         2: -3333 (0xfffffffffffff2fb)
[01/01/23 20:27:16] crowsnest:         3: -3000 (0xfffffffffffff448)
[01/01/23 20:27:16] crowsnest:         4: -2667 (0xfffffffffffff595)
[01/01/23 20:27:16] crowsnest:         5: -2333 (0xfffffffffffff6e3)
[01/01/23 20:27:16] crowsnest:         6: -2000 (0xfffffffffffff830)
[01/01/23 20:27:16] crowsnest:         7: -1667 (0xfffffffffffff97d)
[01/01/23 20:27:16] crowsnest:         8: -1333 (0xfffffffffffffacb)
[01/01/23 20:27:16] crowsnest:         9: -1000 (0xfffffffffffffc18)
[01/01/23 20:27:16] crowsnest:         10: -667 (0xfffffffffffffd65)
[01/01/23 20:27:16] crowsnest:         11: -333 (0xfffffffffffffeb3)
[01/01/23 20:27:16] crowsnest:         12: 0 (0x0)
[01/01/23 20:27:16] crowsnest:         13: 333 (0x14d)
[01/01/23 20:27:16] crowsnest:         14: 667 (0x29b)
[01/01/23 20:27:16] crowsnest:         15: 1000 (0x3e8)
[01/01/23 20:27:16] crowsnest:         16: 1333 (0x535)
[01/01/23 20:27:16] crowsnest:         17: 1667 (0x683)
[01/01/23 20:27:16] crowsnest:         18: 2000 (0x7d0)
[01/01/23 20:27:16] crowsnest:         19: 2333 (0x91d)
[01/01/23 20:27:16] crowsnest:         20: 2667 (0xa6b)
[01/01/23 20:27:16] crowsnest:         21: 3000 (0xbb8)
[01/01/23 20:27:16] crowsnest:         22: 3333 (0xd05)
[01/01/23 20:27:16] crowsnest:         23: 3667 (0xe53)
[01/01/23 20:27:16] crowsnest:         24: 4000 (0xfa0)```
queen geyser
#

Well, i tried it in every possible way:

#

Sry, somehow i sent this incomplete..

I tried:
camera_auto_detect=1

camera_auto_detect=0
dt-overlay=imx219

camera_auto_detect=0
dt-overlay=imx219,media-controller=0

vcgen.. reports
supported=1 detected=1, libcamera interfaces=0

queen geyser
#

Somehow i'm actually stuck with this while:

-having the Legacy Camera Interface enabled
-boot.txt is set to camera_auto_detect=0
dt-overlay=imx219,media-controller=0

manic cedar
#

Well, do you use MainsailOS?

#

If yes, you shouldnt have made these changes. Ustreamer relies on the legacy camera stack. It simply does not work with libcamera

#

Set gpu_mem=256 ( for pi4 4G) and camera_auto_detect=0 nothing else.

#

Crowsnest does all needed modifications on install.

queen geyser
#

Yes, i'm on mainsail.

manic cedar
queen geyser
#

I'll give it a try, yet i'm a little suspicious that upping the gpu memory will make any differences.
I'm allready runing on legacy camera, with auto detect disabled. Thats how i've achieved the stuff posted above (latest log from )

And yes, i'm runing mainsail on mainsail os x64 1.0.1

manic cedar
queen geyser
#

Well, i dont know if it does. I just went on and enabled that manually to be safe.

manic cedar
queen geyser
manic cedar
#

Sometimes enabling it using raspi-config it deletes thos entry for what ever reason

#

Remove the overlay entrys

queen geyser
#

gpu mem was allready set to 256.

manic cedar
#

The overlay entrys are only needed for libcamera stack

queen geyser
#

So like this?

manic cedar
#

Yes

queen geyser
#

Okay. I'll give it a try and send you a logfile.

#

I'm waiting for a print to finish before i can rebot tho.. will take 30 min.

manic cedar
#

I am only concerned about the entrys without correct translated v4l2 values

queen geyser
manic cedar
#

May be possible they changed the firmware to match libcamera stack, but thats out of my scope I only own a v2

queen geyser
queen geyser
#

Well, it's an 8 years old camera - i have high doubts that it supports libcamera.

#

^^

#

Pardon me. 6 years.

queen geyser
#

Guess what..

#

^^

manic cedar
#

We are a step further now at least. Ustreamer doesnt refuse to start correctly.

#

[01/01/23 22:46:16] crowsnest: DEBUG: ustreamer [cam 1]: -- ERROR [121.300 stream] -- Mainloop select() error: Inappropriate ioctl for device

#

That one shows the issue why there is no picture

#

I could imagine the ribbon is damaged or latest ustreamer changed something that I am not aware of

queen geyser
#

Well, i've actually meassured the ribbon end to end. It's fine. 😦

manic cedar
#

The last thing you could check, if the connector on the picamera pcb sits correctly, if you have thwn no luck, i will check tommorow if there where major or minor changes in ustreamer

queen geyser
#

Good morning. Unluckily the connector seems to sit tight.

#

Which leads me to assume that everything is correct, at least on the hardware.

manic cedar
#

I will look after possible changes in ustreamer. If there are non, something in your Hardware might died. But, I am at work so could take time.

queen geyser
#

Take your time. I'm in no hurry. I also have a space C920, so i'll might just use this in the meantime.

manic cedar
#

Well, I flashed a fresh copy of 1.0.1, waited for rebooting complete, added in Mainsail a webcam and it just works. There wasnt a change in ustreamer which could cause an Issue.

#

That is my Version that I use..

queen geyser
#

Looks mostly as mine does.

#

But mine says V2.1

#

Anyhow, i've tried the cam using the stock raspberry os (it worked there) and gone so far to use a spare sd to write mainsail os to it etc. - nada, doesnt work,

manic cedar
queen geyser
#

I've had enough tbh.

#

As much as i love tinkering with stuff, it's just not worth wasting another day, and even someone elses time on this.

manic cedar
#

I would like to help you, but I guess its easier to mount the Logitech to that printer then. But will see to get some more info about that

queen geyser
#

Well, thats been the firt image (0114) i've sent you.

#

I just did that, i modified the c920 mount to fit my setup, printed it and attached that one.

#

Worked OOTB.

manic cedar
#

Glad to see there is a solution, even not the one you'd like to see 🙂 But, I will keep investigating, for that Cam, I am really curious to see why it doesnt like Crowsnest 😉

queen geyser
#

While it is an solution, i'm not quite happy with it. It's slow as hell when there's a print runing. I'm getting around 10-15fps in Idle, as soon as i prind it breaks apart to 1-3fps. It's really annoying.

errant cosmos
#

Thats your wifi bandwidth, best idea would be reduce your resolution

queen geyser
#

Well, i highly doubt that. I'm on Wifi6 all the way.

#

Also it's slow on 640x480 as it is on 1920x1080p

#

This also sort of contradicting to the way it behaves, it's slow when it prints, when on idle or pause its back to around 10 fps.

errant cosmos
#

Not sure if a rPI works on wifi6 but even yes that would not be a guarantee for a high data rate

#

It should run much smoother with lower resolution as you transfer less data

#

adaptive could be also an option in low resolution is it takes snapshots as fast as possible what get you a lower latency

manic cedar
#

And no, the pis Wifi Module is limited to 72.2Mbits/s, so no gain in performance with wifi6.

queen geyser
#

Well, while i said im on wifi6 i didnt meant the pi4 is going hyperspeed, i just meant that i'm in doubt that it's a network issue (which proved to be the right assumption). Actually i could replicate the issue: idle: 20fps, in print 0-3 fps - i honetly dont know what the issue was, but i can assure that removing and reinstalling crowsnest fixed the issue.

errant cosmos
#

No one said it is a network issue! Your usage bandwidth depending on the location, how much traffic you have in your area and so one

queen geyser
#

Well, thats what i count as network issue - talked at cross purposes i guess. But like i said, i've fixed it.