guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.48k stars 367 forks source link

wpa_supplicant missing from /boot #737

Closed mathpunk closed 3 years ago

mathpunk commented 3 years ago

What were you doing?

Trying to set up WiFi after having flashed an SD card with Etcher.

  1. download OctoPi stable
  2. install Etcher
  3. flash 32gb SD card with the unzipped img
  4. mount the Linux partition
  5. cd to the mount point
  6. examine boot and etc/wpa_supplicant directories

What did you expect to happen?

I expected to find a file that looked similar to [cp2004/octopi-wpa-supplicant.txt] (https://gist.github.com/cp2004/5cb0361fb872fc779fb8272ad7f4887f).

What happened instead?

$ ls boot

yielded no output.

$ ls -l etc/wpa_supplicant/
total 40
-rwxr-xr-x 1 root root   937 Mar 24  2020 action_wpa.sh
-rw-r--r-- 1 root root 25569 Mar 24  2020 functions.sh
-rwxr-xr-x 1 root root  4696 Mar 24  2020 ifupdown.sh
lrwxrwxrwx 1 root root    31 Jan 10 18:02 wpa_supplicant.conf -> /boot/octopi-wpa-supplicant.txt

My console highlights that link in angry colors. Should it be pointing at boot/... rather than /boot/...?

Did the same happen when running OctoPrint in safe mode?

n/a

Version of OctoPi

OctoPi 0.18.0

Printer model & used firmware incl. version

n/a

Screenshot(s)/video(s) showing the problem:

n/a

I have read the FAQ, in particular https://community.octoprint.org/t/wifi-setup-and-troubleshooting/184

guysoft commented 3 years ago

You go to either /boot or boot/ depending on where you are accessing it from. /boot assumes you have booted the Pi with OctoPrint and that you have /boot mounted.

boot/ assumes you have the sd card mounted to a system and you are editing it. Which is the common issue because people set up wifi before your boot the device.

Closing because this is documented on countless guides, videos and the Readme.

mathpunk commented 3 years ago

I'm looking at the readme, and what I can see is,

  1. Configure your WiFi by editing octopi-wpa-supplicant.txt on the root of the flashed card when using it like a thumb drive

I'd like to zoom in on my steps here just so we're sure we're speaking the same language. I'll be happy to submit a pull request with more documentation for people who got stuck here.

After flashing the drive:

$ cd ext
$ ls boot
$ ls etc/wpa_supplicant
action_wpa.sh  functions.sh  ifupdown.sh  wpa_supplicant.conf
$ cat etc/wpa_supplicant/wpa_supplicant.conf
cat: etc/wpa_supplicant/wpa_supplicant.conf: No such file or directory

Is my confusion, there isn't supposed to be anything and I'm meant to add it? If so, can there be a link to an example wpa_supplicant.conf?

mathpunk commented 3 years ago

I'm going to try pasting in https://gist.githubusercontent.com/cp2004/5cb0361fb872fc779fb8272ad7f4887f/raw/5407a8121e6d5724a8bb9568930c7df0b08aa8b3/octopi-wpa-supplicant.txt to boot and see how that goes. I do see that it is labeled as being for 0.17.0 though.

mathpunk commented 3 years ago

That didn't go so well and I'm trying to install 0.18.0, rather than the 0.15.0 that I arrived on via the https://octoprint.org/download/ page

guysoft commented 3 years ago

I'm looking at the readme, and what I can see is,

  1. Configure your WiFi by editing octopi-wpa-supplicant.txt on the root of the flashed card when using it like a thumb drive

I'd like to zoom in on my steps here just so we're sure we're speaking the same language. I'll be happy to submit a pull request with more documentation for people who got stuck here.

After flashing the drive:

$ cd ext
$ ls boot
$ ls etc/wpa_supplicant
action_wpa.sh  functions.sh  ifupdown.sh  wpa_supplicant.conf
$ cat etc/wpa_supplicant/wpa_supplicant.conf
cat: etc/wpa_supplicant/wpa_supplicant.conf: No such file or directory

Is my confusion, there isn't supposed to be anything and I'm meant to add it? If so, can there be a link to an example wpa_supplicant.conf?

I gave an explanation about paths when on the Pi and not on it, you are just pasting paths without understanding how they work. I really don't think a PR is required because I have seen already hundred of thousands people managing to Install this. If you think you have a way to improve it I am willing to review. But I can't really understand what you are missing at this point.

mathpunk commented 3 years ago

Are you telling me to edit this file only when it is already on the Pi, and NOT when the card is mounted on my laptop?

mathpunk commented 3 years ago

There's no file to edit, when it's mounted on my laptop, is what I'm trying to tell you, while the directions I read seemed to indicate that I'm supposed to set up WiFi before the card goes into the Pi.

mathpunk commented 3 years ago

For others who got stuck here: I had mounted and searched the Linux partition -- hey, Raspbian is Linux right? Instead, mount the W95 partition.