FirmwareUpdater and SKR 1.3 (LPC1768)

Hi, I've seen a number of posts relating to issues both here and on https://github.com/guysoft/OctoPi...

Did this ever get resolved?

I'm using OctoPrint version: 1.4.0rc4 and OctoPi version: 0.17.0

lsusb is showing both a plugged in memory stick (testing usb detection) and the connection to my SKR 1.3 - viz

Bus 001 Device 006: ID 1d50:6029 OpenMoko, Inc.
Bus 001 Device 004: ID 18a5:0304 Verbatim, Ltd Store 'n' Go
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But I can't see the content of either device on the pi. (/media/usb... contains no files, and before you ask, yes I have installed usbmount.

Weird thing is the pi can see the eeprom data and the like, so some form of communication it there...

I'm guessing that this is actually an issue with OctoPi, but can someone please confirm before I loose my sanity!

Many thanks,
Andy B.

Maybe...?

Sorry, I don't think that's the issue. The board is actually running, M503 from octoprints terminal tab returns the expected data and the EEPROM Marlin Editor Plugin works quite happily, reading and writing data.

The problem seems to be that whilst lsusb shows the printer (Bus 001 Device 006: ID 1d50:6029 OpenMoko, Inc) or a stick (Bus 001 Device 004: ID 18a5:0304 Verbatim, Ltd Store 'n' Go) are connected their content is not accessible.

Initially I thought this was due to usbmount not being installed on the pi so I added it to no avail.

It seems like the usb ports can provide serial comms (like talking to the printer) but they wont mount storage devices, hence I'm not seeing anything under /media/usb which might allow a firmware upgrade?

I've just double checked stuff, the problem is illustrated below:2020-02-04_202007
I've followed the instructions for LPC1768 boards found at : https://github.com/OctoPrint/OctoPrint-FirmwareUpdater/blob/master/README.md#usbmount-installation, installed usbmount and configured as recommended

It's been a while since I used the Firmware Updater Plugin but I'm positive this used to work under OctoPi 16.

Hence my initial post querying if this was an OctoPi problem (or maybe the functionality of usbmount or its configuration has changed whilst moving from 16 to 17)

If you've loaded usbmount then the path won't be /media/usb. It will be something under the /media folder though. Do an ls -l /media to look at what it's mounted. Here's mine, noting that I have a thumbdrive, a Smoothieboard and a PyBoard attached. Also note that you need root elevation to read/write from these.

total 156
lrwxrwxrwx 1 root root     4 Dec  6 10:52 usb -> usb0
drwxr-xr-x 5 root root 65536 Dec 31  1969 usb0
drwxr-xr-x 4 root root  8192 Dec 31  1969 usb1
drwxr-xr-x 5 root root 65536 Dec 31  1969 usb2
drwxr-xr-x 3 root root  4096 Dec 31  1969 usb3
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb4
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb5
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb6
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb7

Repeating, adding an R to the arguments for that list command:

/media:
total 156
lrwxrwxrwx 1 root root     4 Dec  6 10:52 usb -> usb0
drwxr-xr-x 5 root root 65536 Dec 31  1969 usb0
drwxr-xr-x 4 root root  8192 Dec 31  1969 usb1
drwxr-xr-x 5 root root 65536 Dec 31  1969 usb2
drwxr-xr-x 3 root root  4096 Dec 31  1969 usb3
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb4
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb5
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb6
drwxr-xr-x 2 root root  4096 Dec  6 10:52 usb7

/media/usb0:
total 768
# Various files on the microSD that's in the PyBoard

/media/usb1:
total 13280
# Various files on the thumbdrive

/media/usb2:
total 768
# Identical files from usb0 above (the PyBoard has a flash drive and a microSD connector)

/media/usb3:
total 440
# Various files that are on the Smoothieboard's SD card

/media/usb4:
total 0

/media/usb5:
total 0

/media/usb6:
total 0

/media/usb7:
total 0

Been there, done that but for the sake of completeness...

pi@octopi:~ $ sudo lsusb
Bus 001 Device 006: ID 1d50:6029 OpenMoko, Inc.
Bus 001 Device 007: ID 18a5:0304 Verbatim, Ltd Store 'n' Go
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@octopi:~ $

So Device 006 is the SKR board and Device 007 is a thumbdrive

pi@octopi:~ $ sudo ls -la /media
total 40
drwxr-xr-x 10 root root 4096 Jan  3 16:23 .
drwxr-xr-x 21 root root 4096 Dec 31 14:56 ..
lrwxrwxrwx  1 root root    4 Jan  3 16:23 usb -> usb0
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb0
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb1
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb2
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb3
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb4
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb5
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb6
drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb7
pi@octopi:~ $

and

> pi@octopi:~ $ sudo ls -laR /media
> /media:
> total 40
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 21 root root 4096 Dec 31 14:56 ..
> lrwxrwxrwx  1 root root    4 Jan  3 16:23 usb -> usb0
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb0
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb1
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb2
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb3
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb4
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb5
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb6
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 usb7
> 
> /media/usb0:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> 
> /media/usb1:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> 
> /media/usb2:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> 
> /media/usb3:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> 
> /media/usb4:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> 
> /media/usb5:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> 
> /media/usb6:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> 
> /media/usb7:
> total 8
> drwxr-xr-x  2 root root 4096 Jan  3 16:23 .
> drwxr-xr-x 10 root root 4096 Jan  3 16:23 ..
> pi@octopi:~ $

also

pi@octopi:~ $ sudo find /media -print
/media
/media/usb3
/media/usb0
/media/usb6
/media/usb2
/media/usb7
/media/usb1
/media/usb
/media/usb5
/media/usb4
pi@octopi:~ $

and just to be sure...

pi@octopi:~ $ sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  2.1G   12G  16% /
devtmpfs        433M     0  433M   0% /dev
tmpfs           438M     0  438M   0% /dev/shm
tmpfs           438M   18M  420M   5% /run
tmpfs           5.0M  8.0K  5.0M   1% /run/lock
tmpfs           438M     0  438M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   53M  200M  21% /boot
tmpfs            88M     0   88M   0% /run/user/1000
pi@octopi:~ $

And finally, before you ask... :sunglasses:

pi@octopi:/etc/usbmount $ sudo apt list usbmount
Listing... Done
usbmount/stable,now 0.0.22 all [installed]
pi@octopi:/etc/usbmount $
pi@octopi:/etc/usbmount $ cat usbmount.conf|grep FS_MOUNTOPTIONS
#FS_MOUNTOPTIONS=""
FS_MOUNTOPTIONS="-fstype=vfat,gid=pi,uid=pi,dmask=0022,fmask=0111"
pi@octopi:/etc/usbmount $

and last but not least...

pi@octopi:~ $ cat /etc/systemd/system/systemd-udevd.service.d/override.conf
[Service]
MountFlags=shared
pi@octopi:~ $

Don't think I missed anything :wink:

Sussed it!

Needed to change:
MountFlags=shared
to
PrivateMounts=no

df -h now says...

pi@octopi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  2.1G   12G  16% /
devtmpfs        433M     0  433M   0% /dev
tmpfs           438M     0  438M   0% /dev/shm
tmpfs           438M  6.9M  431M   2% /run
tmpfs           5.0M  8.0K  5.0M   1% /run/lock
tmpfs           438M     0  438M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   53M  200M  21% /boot
/dev/sda1       7.5G  4.0G  3.6G  53% /media/usb0
/dev/sdb1       121M  174K  120M   1% /media/usb1
tmpfs            88M     0   88M   0% /run/user/1000
pi@octopi:~ $
pi@octopi:~ $ ls /media/usb0
 FIRMWARE.CUR  'System Volume Information'
pi@octopi:~ $

Think someone needs to update https://github.com/OctoPrint/OctoPrint-FirmwareUpdater/blob/master/README.md#usbmount-installation to cover the change in "Buster"

1 Like

Yep, looks like someone posted an issue to the repo for that.

Damnit, I was JUST about to warn you about that. I even created an issue on their repository about the change in the documentation for that.

@foosel True that...

No longer mine, it got adopted by a bunch of people here.

My bad. I'll throw them an issue or a PR.