View Single Post
  #6   Report Post  
Posted to uk.d-i-y
mm0fmf[_2_] mm0fmf[_2_] is offline
external usenet poster
 
Posts: 267
Default DIYish. Linux question.

On 28/08/2019 13:28, dennis@home wrote:
Why does octoprint on a RPi not find the printer if you plug it in after
starting the RPi but works fine if the USB is connected first?

It doesn't do that on windows.


A possible reason is that Octoprint is/has something running that has
checked for USB attached devices before you plug in the USB device. If
this doesn't check for newly attached devices then your printer wont
appear if you plug it in after.

Does it work if you leave for some time? (Say 10mins)

You can try and see if you have shut down all of the processes/threads
etc. Octoprint starts before attaching then restart Octoprint.

Have you checked that the USB device is visible when plugged in after
booting with something like "lsusb". lsusb will show all the devices and
controllers.

~$ lsusb
Bus 002 Device 002: ID 04f2:0963 Chicony Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 010: ID 0bda:0159 Realtek Semiconductor Corp. Digital
Media Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~$

lsusb -D /dev/bus/usb/001/010

~$ lsusb -D /dev/bus/usb/001/010
Device: ID 0bda:0159 Realtek Semiconductor Corp. Digital Media Card Reader
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
[many lines snipped]


Try that with a boot with USB attached and without and see if there is a
difference.

Also if you need to boot the Pi before the USB switch works what happens
if you boot the Pi to get the switch to work and then do a sudo reboot?
If you're lucky the switch/printer will stay working across a reboot and
it may be found after the reboot.