Just plain getting started with new camera stack

What is the problem?

Can't even login for first time to console. Credentials are rejected.

What did you already try to solve it?

Added octopi-password.txt to /boot.
login as user. "Wrong password"

Examining userconf.txt shows a user with the name pi - which I did not do. When I burned the image I created a user with a name not equal to pi. There is a nice long encrypted password following pi. So I have tried logging in as pi, and as user, with both raspberry and the password in octoprint-user.txt (I have the right file name, just don't remember it off the top of my head.)

Have you tried running in safe mode?

No. This is impossible without completing initial start up.

Did running in safe mode solve the problem?

No. Not applicable.

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

Sorry, Octoprint is not running yet. Can't get a bundle on an INOP system.

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Burned latest new camera stack image today. Jan 24, 2024. Setting up Octopi in the past was so easy. Now it is an adventure in frustration. Some of this is caused by RPI. I have yet to find a complete "beginner's guide" to set up which includes nuances like port numbers, passwords and complete camera configs in one place. I realize this is a work in progress, but it gets real exasperating when stuff you read is obsolete and doesn't work.

Anyways, need some hand holding just to get through the initial setup. Can't even login to setup my admin account.

During the image burn, it asked me to create a user. Why then is there a pi? It also asked for a hostname, which I changed. On the login text console, it shows the hostname I entered. (octorpi4) So why is half the stuff done, and not the other half. More importantly, what is the workaround? I usually find my way out of these things, but this has me stumped. Help please. Since I haven't logged in the first time, nothing is properly set up. Octorpi4 is not on the network yet, it's currently a boat anchor until I can login.

The more I read about this, the more disappointed I get. Can't even get off the ground using an RPI anymore. I have 3 other (older) RPI4's and they have been all easy. Ever since this kludge password thing, nothing works easily, especially without a GUI. It's quite painful. Especially password timeouts in 60 seconds. Not good for us older folks with slower reflexes, feels discriminatory. Hard to have a good password and get it typed correctly - especially if there is no typing feedback.

Would be helpful to have complete instructions for people to follow, step by step.

Perhaps I don't understand this, but it seems one has to edit several files in the /boot directory.

  1. octopi.txt change destination_host to valid IP for your network
  2. octopi-wpa-supplicant.txt enter wifi credentials - none present, even though I put them in using the imager. Enter country code, which did not get written either, although it was entered.
  3. octopi-password.txt. enter the password. For pi, or my newuser that I created?
  4. userconf.txt, this is an RPI file with the user pi, and some encrypted password. There's a bunch of writing at An update to Raspberry Pi OS Bullseye - Raspberry Pi explaining stuff, but I can't make it work. By working, I mean getting to the first login on the local console. Can't login, can't set up the admin user.

So that's what I know so far - but I can't even log in on the local console yet, because I am missing some key bit of information. If someone could drop some clues, I'd be grateful.

Haven't been able to remotely login. For that matter locally. But I did fix an error in 2. It was the wrong country code. So octorpi4 is on the network and I was able to configure octopi via it's web interface.

Unfortunately, I can't seem to login as a user, as there is some mess up with passwords. So I can't do raspi-config and set i2c on, or any other sudo tasks. But I could get a system log!
octoprint-systeminfo-20240124174038.zip (38.2 KB). Can't ssh into octorpi4 at the moment. Nor login to the local console, which temporarily has a monitor.

I think the new camera stack stuff is working. I get an image coming out on octorpi4.local/#control. The camera is pointed at the ceiling so not very exciting.

So I need to have some user account with sudo privileges available to me. Any advice is welcome.

Console login is username pi, password is raspberry
The Octopi password is for the logging from the web browser when you pull up octoprint.

Download the pi imager program from the raspberry pi site. Use that to burn the Octopi image to the SD card. After you pick the device, operating system and destination it pops up a box you need to click "edit" on. There you enter the password for the pi user that you want to use, enter the wifi SSID and password, set the wifi country code, and on the tab that says services, make sure to check ssh so you can remote into the pi. Click save (or done, can't remember which) then click yes to write to the SD card. When you are.done, everything is set, no messing with config files in /boot etc.

And the pi account has sudo priveleges

I did this. The only thing that edit did was change the hostname. It did not set wifi country, nor my wifi password, nor ssh, even though I did all of the steps you indicated. What I am saying is the method did not work for me.

Can't login as pi and raspberry. Doesn't work. That is the whole problem. Nothing works. Neither pi nor the user I created, nor any combination of passwords.

I use pi imager all the time. Did you check the boxes to enable all of the settings? Also, is it the latest version of the imager or an older one? The older ones don't seem to work properly with the newer images. Newest is like 1.8.4 or something like that

Latest one on a Mac 1.8.4

I thought I checked all the boxes - that's why it is so confusing. I'm going to do a dry run to check again.

For a correctly burned SD card, where would the changes be seen, ie wifi credentials, or at least wireless network? Where are they written to? On a Mac, all I can see is the /boot directory, a Mac cannot read the ext4 format - that disk is invisible to me. From what I can tell, these configs are not on the /boot drive - which is why I edited them.

There are hidden files in /boot, ._config.txt, ._octopi.txt, ._octopi-wpa-supplicant.txt, and ._userconf.txt. I can't read them, even on an RPI. Maybe they are binary? Do they overwrite what is in the same files without the underscore? All I know is the files without the underscore have not been updated to the info that was captured in the rpi-imager. I don't really think I have to know but honestly, when stuff doesn't work - and you don't know the proper sequence what should happen, it is hard to diagnose.

For what it is worth, I have experienced the MK4 printer having a fatal timeout, ie watchdog failure during Octopi boot, 3 times now. Think Octopi might be doing something bad during its power up. Octopi on RPI3 never did that.

It sounds like you are conflating several things that are not related due to frustration.

I suggest you redo the card with the imager and type in "pi" as the username and "raspberry" as the password to start from a known state.

Set up WiFi as indicated in the imager.

Do not try to edit any files on the card once the imager finishes.

Boot the PI from the new image and SSH into the PI.

If you cannot get to the login prompt via SSH try hooking up an Ethernet cord to your router and looking up the IP of the Pi, to get to it via Ethernet.

Once you get that far see if Octoprint is running by accessing it from your computer browser.

Once you can log in via SSH do so and navigate to /boot/camera-streamer.

If you are not running a raspiCam delete the libcamera.conf file found there (or better yet move it elsewhere just in case) and any other files you may see.

Then use the command

sudo add-usb-camera

to add your USB webcam.

It will create a new file called something like "usb-NAME.conf" in the same directory.

Edit that file and change the last "OPTIONS=" line to read:

OPTIONS='--http-listen="0.0.0.0"'

(Note the ending double quote followed by a single quote)

Save the file and reboot the Pi.

Once you reboot you should be able to see the stream from your computer by navigating to

http://IP_OF_PI/webcam/?action=stream

If so you know what to enter in the plugin fields to let Octoprint deal with passing the camera stream to the client's browser.

The "fatal timeout" could be just the printer resetting once the initial serial connection is attempted. A lot of printers effectively reboot once the PI connects to them at startup or when the PI re-initializes the serial port. This is normal.

To perhaps solve some of the confusion around the text files not updating when you burn the SD card, the way that the Raspberry Pi Imager works is that it creates a script that is run to try and set the various parameters on the first boot. So if you flash the SD card and then look at the image before it's booted, everything will still be at defaults but with a firstrun.sh script that will sort it out.

The very first boot will involve the Pi first booting, configuring some things, and then rebooting itself. So it could take longer than normal.

Try to set up everything in the Raspberry Pi Imager, then boot the Pi. Try and login with the credentials you have configured in the imager without having to worry about touching any other files.

No, this is for the optional feature that checks network connectivity to work around some issues the Pi had with wifi crashing. Leaving it as default should be fine, and if you don't enable it it makes no difference anyway.

If you set them in the RPi Imager, you don't need to also configure it here.

octopi-password.txt is designed to be used to reset the Pi user's password, should one forget what they set it to. Don't touch it if you're just trying to set it up. It's not permanent configuration, it's a reset option.

This file is used for headless setup, as the base OS image comes with no default user. OctoPi still uses the user pi with password raspberry unless you set it otherwise in the RPi imager. As I said above, you might not see the changes here straight after flashing.

If, after configuring everything in the Pi imager and touching nothing else, it still does not work, this is a very unusual issue. Keyboard locale issues could be one thing, where the password is ending up with either a special character or something is switched. But hard to say.

@opjose - It seems that the camera works out of the box for this setup, which is great. As such, I would not recommend messing with this configuration. With one camera, no changes to http-listen are required.

Yes, I see you have caught that I was frustrated. Now is the image buster based or bullseye? If bullseye, hasn't the pi user been locked out? I am getting pretty good at reflashing and can follow your directions. I am using a raspicam, in the beginning, so I don't need to do the usb cam stuff, right?

I have seen the printer restart due to octopi coming up. But a fatal timeout, ie. watchdog error, is non-recoverable without user intervention. I have to physically power down the printer to restart it. This is not a friendly aspect to octopi in my opinion. It shouldn't cause a printer to have a WD timeout - ever. There literally was a blue screen of death type display - with no way to exit, save for a power cycle.

Thanks for your thoughtful response. Yes, the original power up involves many apparent reboots, at least if a monitor is attached. I will attempt to redo this using the default pi, raspberry setup, enable ssh and the wifi stuff. What special characters should be avoided in passwords? I did set the locale in the imager, as well as the keyboard.

Just to mention this, I am running off a small USB3 attached SSD, rather than a SD card. RPI4's are so much more responsive running this way. I have done this for 4 RPI4's now. Flashing a disk takes a really short time at 350MB/s. Faster boots are nice too.

Very curious. Doing the procedure with an SD card allows me to get going. I can login via ssh using default setup. However, burning an image onto a SSD (with the same settings) and booting from SSD gives totally different results. I was not expecting this at all. Booting from SSD with an image prepared identically gives me no wifi connection at all. If I plug into ethernet, then I can ping octorpi4. But ssh is NOT enabled! Can't login. RPI is processing the two media differently. This is bizarre. Was hoping to run off SSD, but it seems it is not initialized the same - or someone has a bug... Or I did it differently (I don't think so...)