UK diy (uk.d-i-y) For the discussion of all topics related to diy (do-it-yourself) in the UK. All levels of experience and proficency are welcome to join in to ask questions or offer solutions.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 2,554
Default 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.
  #2   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 1,375
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.


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

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

:-|

--
Adrian C
  #3   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 3,625
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.


RPi running windows, or other device running windows?
  #4   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 2,554
Default DIYish. Linux question.

On 28/08/2019 17:46, Adrian Caspersz wrote:
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.


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

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

:-|


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

  #5   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 2,554
Default DIYish. Linux question.

On 28/08/2019 19:51, Richard wrote:
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.


RPi running windows, or other device running windows?


Octoprint is an application it runs on either.



  #6   Report Post  
Posted to uk.d-i-y
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.


  #7   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 2,554
Default DIYish. Linux question.

On 28/08/2019 23:33, mm0fmf wrote:
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)



No even if you leave it for days.


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


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


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.


Its visible after a reboot and octoprint works.


~$ 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.



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.

  #8   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 267
Default DIYish. Linux question.

On 29/08/2019 14:08, dennis@home wrote:
On 28/08/2019 23:33, mm0fmf wrote:
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)



No even if you leave it for days.


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


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


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.


Its visible after a reboot and octoprint works.


~$ 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.



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.


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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone got any good xmas diyish gift / gadget ideas? John Rumm UK diy 142 December 17th 18 03:30 PM
Question for linux-based users Terry Coombs[_2_] Home Repair 23 September 19th 16 12:37 AM
Linux Zealots Exposed. The truth behind the Linux Religion. The Linux Destroyer Home Repair 22 June 17th 10 12:51 PM
Are Linux Lusers Really Displaced Locksmiths? (Foley Belsaw School of Linux Advocacy) Lisa Cottmann Home Repair 0 September 22nd 05 12:11 AM
Please stop this Linux crap!! You are doing NOTHING to advocate Linux David Sizemore Woodworking 3 March 29th 05 03:30 AM


All times are GMT +1. The time now is 05:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"