Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Pi 4 and SKR 1.3 #109

Closed
Key0nee opened this issue Aug 30, 2019 · 18 comments
Closed

Problems with Pi 4 and SKR 1.3 #109

Key0nee opened this issue Aug 30, 2019 · 18 comments

Comments

@Key0nee
Copy link

Key0nee commented Aug 30, 2019

Hello I am trying to get this plugin working on the following hardware.... any help is appreciated...

OctoPrint on Raspberry Pi 4 (Buster) followed these instructions
After 3 days of printing, tweaking, etc... this is the only issue I've found...

After following the instructions to get the FirmwareUpdater working with LPC1768 based boards, Im having problems making SKR 1.3 onboard SDCard accessible for the pi to Mount to then use OctoPrint-FirmwareUpdater to make changes.

while the SDCard is healthy and I have no problems with the card this is what dmesg (last few lines ) reports:

[ 3122.935683] sd 0:0:0:0: [sda] Asking for cache data failed
[ 3122.935697] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 3130.045984] sda: sda1 sda2
[ 3130.050583] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 3133.623637] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 3200.528869] sd 0:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)
[ 3210.208142] sd 0:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)

I think it has something to do with permissions as this line appears in my OctoPrint.log file

IOError: [Errno 13] Permission denied: u'/media/usb0/.testballoon.txt'

I thought permissions are controlled by this line in my USBMount.conf file

FS_MOUNTOPTIONS="-fstype=vfat,gid=pi,uid=pi,dmask=0022,fmask=0111"

I feel that maybe its permissions at a lower lever than set here but im not sure where to look or how to set. I am also not sure that marlin bugfix2.0.x is configured correctly to support this.

any help is greatly appreciated ....

all question, comments, an plain wise crack remarks are welcomed.

thank you
K

@benlye
Copy link
Collaborator

benlye commented Aug 30, 2019

Most likely the printer's SD Card is not actually mounted. Can you confirm that the board's SD card is properly mounted? You should see files in /media/usb/.

@Key0nee
Copy link
Author

Key0nee commented Aug 30, 2019

Thanks for the reply....
Sorry I am in a bit over my head....

Im not sure what you mean here... If I plug in the SKR directly to my Mac, I do see the card and it appears to be properly mounted.

but when trying to reach from a terminal window via the pi/OctoPrint, it is not. I've tried using this line as both pi and root...

mount /dev/sda1 ~/SDCard/
or
sudo mount /dev/sda1 ~/1SDCard/

again Im in a a bit over my head but wouldn't the line below from dmesg. confirm that the sd card is in fact not mounted?

[ 3133.623637] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck

from octoprint.log
IOError: [Errno 13] Permission denied: u'/media/usb0/.testballoon.txt'

not sure where to go from here.

Thanks again
K

@benlye
Copy link
Collaborator

benlye commented Aug 30, 2019

When you configure the Firmware Updater plugin you must specify a path to the Firmware update folder - what did you put there?

On your Pi, can you run these commands and post the output (with the board plugged in):
ls -al /media/
ls -al /media/usb/

It doesn't really matter what it does on your Mac, we're only worried about the Pi. If you followed all the instructions exactly it should have worked, so we just need to figure out where something is not right...

@Key0nee
Copy link
Author

Key0nee commented Aug 30, 2019

pi@raspberrypi:~ $ ls -al /media/
total 40
drwxr-xr-x 10 root root 4096 Aug 29 20:32 .
drwxr-xr-x 21 root root 4096 Aug 30 09:31 ..
lrwxrwxrwx 1 root root 4 Aug 29 20:32 usb -> usb0
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb0
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb1
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb2
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb3
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb4
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb5
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb6
drwxr-xr-x 2 root root 4096 Aug 29 20:32 usb7
pi@raspberrypi:~ $ ls -al /media/usb
lrwxrwxrwx 1 root root 4 Aug 29 20:32 /media/usb -> usb0
pi@raspberrypi:~ $

sorry I missed a /

pi@raspberrypi:~ $ ls -al /media/usb/
total 8
drwxr-xr-x 2 root root 4096 Aug 29 20:32 .
drwxr-xr-x 10 root root 4096 Aug 29 20:32 ..
pi@raspberrypi:~ $

@benlye
Copy link
Collaborator

benlye commented Aug 30, 2019

Right, the board is not mounted - when there's nothing mounted the mount points are read-only, which is why OctoPrint tells you that it could not write to /media/usb0.

Is there anything else in /var/log/messages indicating why usbmount failed?

Can you go through the usbmount installation again and make sure you followed all the steps?

@Key0nee
Copy link
Author

Key0nee commented Aug 30, 2019

Ok... Ill recheck my USBMount installation...

/var/log/syslog list this:

Aug 30 12:50:43 raspberrypi usbmount[3773]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime,gid=pi,dmask=0022,fmask=0111 /dev/sda1 /media/usb0
Aug 30 12:50:43 raspberrypi kernel: [16062.016298] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

@benlye
Copy link
Collaborator

benlye commented Aug 30, 2019

Well we can see that at least it's trying, which is good. You could always try running the mount command manually:

sudo mount -tvfat -osync,noexec,nodev,noatime,nodiratime,gid=pi,dmask=0022,fmask=0111 /dev/sda1 /media/usb0

That will only mount the board once, it won't be re-mounted after a disconnect or reboot. If it errors it might help track down the issue.

@Key0nee
Copy link
Author

Key0nee commented Aug 30, 2019

redid my USBMount install following all the instructions... still no luck

tried to mount manually as suggested above with:

pi@raspberrypi:~ $ sudo mount -tvfat -osync,noexec,nodev,noatime,nodiratime,gid=pi,dmask=0022,fmask=0111 /dev/sda1 /media/usb0

this is what was retuned:
mount: /media/usb0: special device /dev/sda1 does not exist.

I am confident that my USBMount install is correct... however I am not confident that Marlin.bugfix2.0 downloaded 8-19-19 is properly configured to support this plugin.

from the instructions for this plugin... could you elaborate on:

The Marlin board configuration must have SDCARD_CONNECTION ONBOARD (previously USB_SD_ONBOARD) enabled so that the on-board SD card is presented to the host via the USB connection. This seems to be the default configuration for Marlin's LPC1768 boards. It is configured in the board's pins file.

Im a bit confused as it looks like in marlin bugfix2.0.x this setting seems to be done in the Configuration_adv.h file and by default is set to:

SD_CARD_CONNECTION LCD

@Key0nee
Copy link
Author

Key0nee commented Aug 30, 2019

I guess I was too quick to state the USBMount was install correctly.... well, I still believe it is installed correctly but it appears that there are problems with Buster.... as stated here

after reading the referenced thread I managed to get the plugin working with Udevil

while I lack the skill to make permanent via a startup script, I managed to get it working by mounting manually with

udevil --mount /dev/ssd1

the sdcard shows up right away in /media/pi/.... and the path is validated by the plugin and able to upload newly compiled firmware files...

Thank You

@benlye
Copy link
Collaborator

benlye commented Aug 31, 2019

Ahh, OK. I'll add a note to the docs. Glad you got it working :)

@talldonkey
Copy link

talldonkey commented Oct 5, 2019

I ran into exactly this - usbmount doesn't seem to work on Raspberry Pi4 Buster, despite attempting to add PrivateMounts=no in systemd-udevd

[Service] MountFlags=shared PrivateMounts=no

@talldonkey
Copy link

talldonkey commented Oct 5, 2019

Got it working.

What I had to do is follow this exactly: rbrito/usbmount#25 (comment)

So,

  1. Install Usbmount via the deb package using wget (see link)
  2. I didn't have to mess with systemd-udevd.

Hopefully someone else can verify this from scratch, and then we can update docs

@NovaViper
Copy link

Im having the same issue with the Raspberry Pi 3B+ running Octopi 0.17

@NickClark
Copy link

Following the existing directions except, instead of

[Service]
MountFlags=shared

use

[Service]
PrivateMounts=no

Works now for me

@benlye
Copy link
Collaborator

benlye commented Mar 12, 2020

Documentation has been updated.

@benlye benlye closed this as completed Mar 12, 2020
@ybjlus
Copy link

ybjlus commented May 21, 2020

I also have the same problem running a pi2B. Tried also reinstalling usbmount via the deb package using wget. But no luck.. When I run: sudo mount -tvfat -osync,noexec,nodev,noatime,nodiratime,gid=pi,dmask=0022,fmask=0111 /dev/sda1 /media/usb0
I get "does not exist" I also tried changing to: [Service] PrivateMounts=no
Any more ideas? Or how can I figure out whats causing the pi from mounting?

@HaernCalistinson
Copy link

HaernCalistinson commented Jun 6, 2020

I was able to get this working with the most recent version of OctoPi (buster) and an SKR 1.4 Turbo by setting #define SDCARD_CONNECTION LCD instead of ONBOARD in Configuration_adv.h

When it was set to ONBOARD I could never get it to mount.

This is on an Ender 3 Pro with the stock display. I do NOT have a BTT display attached. This allowed the SD card slot on the board to be mounted.

@github-actions
Copy link

github-actions bot commented Dec 3, 2020

This issue has been automatically locked because there was no further activity after it was closed. Please open a new issue for any related problems.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants