DIYish. Linux question.

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.

Reply to
dennis
Loading thread data ...

"Doctor, Doctor! My finger hurts when I do this!!"

"Well, don't do that then..."

:-|

Reply to
Adrian Caspersz

RPi running windows, or other device running windows?

Reply to
Richard

I use a remote switch so the RPi has to boot first then it powers up the printer.

Reply to
dennis

Octoprint is an application it runs on either.

Reply to
dennis

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.

Reply to
mm0fmf

No even if you leave it for days.

Restarting octoprint doesn't help. Restarting the RPi does.

Its visible after a reboot and octoprint works.

Its a wifi switch not USB. Octoprint can see it and turn the printer on and off.

I may have to bodge it so the printer electronics stays powered up but the 24V doesn't switch on using a relay.

Reply to
dennis

Well from that it's clear that that's the problem.

Reply to
mm0fmf

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.