USB connection Problem 4th printer / RPI2

So i was setting up RepetierServer server with a  pi 2B+
And when i connected a 4th printer, repetier server was unable to connect to  it : 

I have tried  to: 
- reboot the server
- reboot the printer(s)
- unconnect / connect / change usb cables
- Change usb port
- verify USB port settings in Reptier server

The things that tells me that it is unrelated to usb port  or usb cable is that i can connect  3 differents printers simultaneously no matter the usb port but if i plug a 4th one it will  not connect to it

And i can do that with every usb port , the problem occurs only when i plug the 4th printer, again no matter the usb port or printer. 

ps: when i plug the 4th printer,

Any idea how to fix that ? 


Comments

  • What is if you only have this 4th printer connected, does it work? I mean is the problem the printer it self or that it is the 4th printer?
    Check the devices in /dev if you get a 4th serial when it is connected. If it is identical to another printer, you can not use serial by id as both will have same id. In that case use serial by path to bind it to the usb port.
  • No it does not work, and that is weird ! and yes of course i have verified and i see the 4th one when  i connect it to the RPI

    To explain more precisely Let's say i have:
    - printer 1
    - printer 2
    - printer 3
    - printer 4

    If i  connect printer 1, 2 and 3 i will not be able to connect  printer 4 no matter usb ports
    Then if it try to connect printer 2,3 and 4 i will not be able to connect printer 1. again no matter usb ports they are connected on. 
    And  so on, i can keep trying all the possibilities : the 4th printer connected no matter which one  it is and no matter the usb port it is connected to - it will not connect !

    it's weird , isn't  it ? 

  • Yes it is. Therefor you should start low level and check which serial connections are in /dev, /dev/serial/by-id and /dev/serial/by-path if you have 3 or 4 printers connected. Do not think the server is the problem here. I think linux is not showing all in one of the directories. But at least under by-path I would expect all 4 printers to appear. Once you see how linux maps the connections to device files you know what to enter in the server config.
  • for now the printers are connected by-id. 
    And i have already verified that i always see the 4th printer with a different id in this type of connection. 

    So  You advise  me to try connect  all  of them by-path ? 
  • Only if you see 4 of them so that it helps. After all server needs 4 different ports to connect 4 ports. You could also use /dev/tty but these names are given by order of appeareance in linux so it is impossible to map them always to same printer.

    If by-path also only shows 3 you should google why linux might do that.
  • Ok i will give a try as i see the 4 printers with different ids and path. 

    But still i think linux is not the problem here as  i was setting up a  second servers this morning for other printers and i have the same problem but now beginning at the 3rd usb connection attempt to a 3rd printer (in the config wizard)

    So different pi , it is now a RPI3 B+ / different printers , same problem

    And this morning i was using path instead of  ids.. 


  • So are there 4 devices in by-path directory pointing to different files or not? Only when I know this it makes sense to progress.
  • Yes they are - that's what i try to explain from the beginning . 

    Apologies if  my english is far from perfect
  • 1. Make sure all 4 configs use a different port. If it is a simple config error with same port it would be the natural reason.

    Ok, so we have 4 ports with 4 printers. First test would be to deactivate all printers in server but all printers actively connected and activate only one. If it works deactivate and continue until all have been active.

    Now we will know if all are configured correctly and should work in parallel.

    Now activate 2 then 3 then 4. Now the problem should appear if I understand you correctly. Now go to 4th printer config and try selecting a virtual port and see if it connects to virtual printer. 

    Please describe more detailed how it looks like when a problem appears. Doe sit try to reconnect all the time? Any messages in /var/lib/Repetier-Server/log/server.log that give a hint.
  • So i am 100% sure that the 4 configs uses different ports. 

    I can active each printer one by one (and only one at a time) without any problem. 

    Then if i activate 2 or 3 printers - no matter which ones - it works.

    But as soon as i try to connect a 4th one (no matter which one it is) it will not connect. (i have a the red chain on the printer) 


    Then if i select a virtual port for the 4th printer all of them are connected. 

    Here is a sample of the server.log when i try to connect a the 4th printer : 

    2018-10-28 15:48:02: Unkown job id 26 for rendered image

    2018-10-28 15:48:27: Closing websocket for missing ping

    2018-10-28 15:48:48: Closing websocket for missing ping

    2018-10-28 15:49:20: Port closed for TOby_Mk3

    2018-10-28 15:49:20: Connection closed: TOBY Mk3

    2018-10-28 15:50:30: Connection started: BOBBY MK2

    2018-10-28 15:50:30: Reset printer BOBBY MK2

    2018-10-28 15:51:18: Port closed for BOBBY__PRUSA_MK2

    2018-10-28 15:51:18: Connection closed: BOBBY MK2

    2018-10-28 15:51:23: Connection started: TOBY Mk3

    2018-10-28 15:51:23: Reset printer TOBY Mk3

    2018-10-28 15:51:52: Client closed connection unexpectedly

    2018-10-28 15:55:48: error: Reading serial conection failed: End of file. Closing connect$

    2018-10-28 15:55:48: Port closed for TOby_Mk3

    2018-10-28 15:55:48: Connection closed: TOBY Mk3

    2018-10-28 15:55:49: Connection started: BOBBY MK2

    2018-10-28 15:55:49: Reset printer BOBBY MK2

    2018-10-28 15:56:23: error: Reading serial conection failed: End of file. Closing connect$

    2018-10-28 15:56:23: Port closed for BOBBY__PRUSA_MK2

    2018-10-28 15:56:23: Connection closed: BOBBY MK2

    2018-10-28 15:56:23: Connection started: TOBY Mk3

    2018-10-28 15:56:23: Reset printer TOBY Mk3





  • Here are  some logs from another server where i cannot connect more than 2 printers  at the same time. 
    The issue here is the same - it's like the 3rd printer  i try to connect is not plugged in . so it never connect.

    I am wondering if the problem comes from printers Naming (in the RepetierServer server database) and the fact that i had to delete printers configs and recreate them with the same name? 

    2018-10-29 09:17:14: Connection started: UM2 - 2

    2018-10-29 09:17:14: Reset printer UM2 - 2

    2018-10-29 09:17:17: New SSID Not Connected

    2018-10-29 16:42:57: No valid response seen within 10 seconds from printer, restarting c$

    2018-10-29 16:42:57: Port closed for UM23

    2018-10-29 16:42:57: Connection closed: UM2-3

    2018-10-29 16:42:57: Connection started: UM2 - 1

    2018-10-29 16:42:57: Reset printer UM2 - 1

    2018-10-29 16:43:09: Port closed for UM2__1

    2018-10-29 16:43:09: Connection closed: UM2 - 1

    2018-10-29 16:43:09: Connection started: UM2-3

    2018-10-29 16:43:09: Reset printer UM2-3

    2018-10-29 16:43:38: Port closed for UM2__4

    2018-10-29 16:43:38: Connection closed: UM2 - 2

    2018-10-29 16:43:41: Port closed for UM23

    2018-10-29 16:43:41: Connection closed: UM2-3

    2018-10-29 16:43:59: Connection started: UM2-3

    2018-10-29 16:43:59: Reset printer UM2-3

    2018-10-29 16:45:23: Port closed for UM23

    2018-10-29 16:45:23: Connection closed: UM2-3

    2018-10-29 16:45:26: Connection started: UM2-3

    2018-10-29 16:45:26: Reset printer UM2-3

    2018-10-29 16:45:36: No valid response seen within 10 seconds from printer, restarting c$

    2018-10-29 16:45:36: Port closed for UM23

    2018-10-29 16:45:36: Connection closed: UM2-3

    2018-10-29 16:45:37: Connection started: UM2-3

    2018-10-29 16:45:37: Reset printer UM2-3

    2018-10-29 16:45:47: No valid response seen within 10 seconds from printer, restarting c$

    2018-10-29 16:45:47: Port closed for UM23

    2018-10-29 16:45:47: Connection closed: UM2-3

    2018-10-29 16:45:48: Activating access point

    2018-10-29 16:45:48: Connection started: UM2-3

    2018-10-29 16:45:48: Reset printer UM2-3

    2018-10-29 16:45:58: No valid response seen within 10 seconds from printer, restarting c$

    2018-10-29 16:45:58: Port closed for UM23

    2018-10-29 16:45:58: Connection closed: UM2-3

    2018-10-29 16:45:59: Connection started: UM2-3

    2018-10-29 16:45:59: Reset printer UM2-3

    2018-10-29 16:46:24: Port closed for UM23

    2018-10-29 16:46:24: Connection closed: UM2-3

    2018-10-29 16:46:24: Printer thread for UM23 stopped

    2018-10-29 16:46:32: Starting printjob manager thread for UM2__3

    2018-10-29 16:46:32: Starting printer thread for UM2__3

    2018-10-29 16:47:14: Printer thread for UM2__3 stopped

    2018-10-29 16:47:21: Starting printjob manager thread for UM2__3

    2018-10-29 16:47:21: Starting printer thread for UM2__3

    2018-10-29 16:47:31: Connection started: UM2 - 3

    2018-10-29 16:47:31: Reset printer UM2 - 3

    2018-10-29 16:47:39: Port closed for UM2__3

    2018-10-29 16:47:39: Connection closed: UM2 - 3

    2018-10-29 16:47:40: Connection started: UM2 - 3

    2018-10-29 16:47:40: Reset printer UM2 - 3

    2018-10-29 16:48:51: error: Reading serial conection failed: End of file. Closing connec$

    2018-10-29 16:48:51: Port closed for UM2__3

    2018-10-29 16:48:51: Connection closed: UM2 - 3

    2018-10-29 16:50:01: Starting printjob manager thread for UM2__5

    2018-10-29 16:50:01: Starting printer thread for UM2__5

    2018-10-29 16:50:11: Connection started: UM2 - 4

    2018-10-29 16:50:11: Reset printer UM2 - 4

    2018-10-29 16:51:03: Port closed for UM2__5

    2018-10-29 16:51:03: Connection closed: UM2 - 4

    2018-10-29 16:51:19: Connection started: UM2 - 3

    2018-10-29 16:51:19: Reset printer UM2 - 3

    2018-10-29 16:51:45: Port closed for UM2__3



    Also  i don't know if it helps but the first server is connected to 3 prusa MK3 and 1 mk2

    The second server is connected to 4 ultimakers 2+ 

  • Run dmesg when 4 printer try to connect and also check /var/log/syslog to see if there are interesting messages like closed usb port or undervoltage.
    2018-10-28 15:55:48: error: Reading serial conection failed: End of file. Closing connect$

    is an indication that linux closed the port. The raspberry is known to do this in undervoltage case. But normally it will disconnect all usb ports not just one. So this case is still strange. I had an other user having same problem with 2 printers. When he switched to ubuntu image the problem was gone. Not sure what I shall think about this. Will try to do some tests this week. But the virtual printer shows that it is no problem in general for the server to have 4 printers. It seems linux does something but lets check log first to see what is going on exactly.

    You could also to connect the printers to a powered usb hub.
  • hmmm.. weird thing. 

    I have already ran dmseg and i get an old error message "No host channel available for periodic transfer" , i have searched a lot why i have this, and the only thing i have found is that it should  had been fixed for a long time ago in the rpi linux kernel. 
    I have even tried to repair the kernel and the usual apt-update / upgrade. 

    Here is a sample of the  error  message  i get  when i run a dmseg: 

     1618.538361] dwc2 3f980000.usb: dwc2_do_reserve: No host channel available for periodic transfer

    [ 1618.538377] dwc2 3f980000.usb: DWC OTG HCD URB Enqueue failed adding QTD. Error status -28

    [ 1618.538411] cdc_acm 1-1.1.3:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed


    i have also tried  to "clean install" the rpi image provided on your  website several times even the v11 , still i got the exact same issue.


    Concerning the underpower issue  i have also investigated in that direction, but i have tried several power supply (only raspberry pi official ones) and i get the same result with every power supply.  

    Last but not least you speak about Ubuntu image - are the images (but are they images? or installers?) provided on your website suitable for raspberry pi ?

    If yes  which one to pick ?   armhf 64 bit? 

    Or do i have to install first ubuntu on the pis and then download the installers from you website ?  


    Thank you for your time and help, hope all of this will help to resolve this issue



  • sudo rpi-update

    will update the pi kernel to latest version.

    We have no ubuntu image with preinstalled and configured setup like the pi image we offer. You can use it especially as a test and install the armhf debian package which is no problem. But you will not have the shutdown, webcam, wifi and usb stick automount features preinstalled.

    So I would try the rpi-update first. After all the installations mainly differ in the kernel if one works and the other not.

  • Some news after a bit of search. 

    Sudo rpi-update do not solves this problem with the rpi-image provided .

    So i ended up installing Ubuntu Mate 16.04.2 on my RPI3B+ then  i have installed the armhf.deb and now no more USB connection problem!

     Just wondering, you mentioned above that shutdown webcam, wifi and usb auto mount features are not preinstalled. 
    But i have the shutdown and webcam features (buttons) showing in this installation. Do i have to do something else ? 

    Even if i don't use those features and that wifi is not working great with ubuntu on a rpi, i might use the webcam and might make a rpi image for other peoples interested to control more than 2 or 3 printers with RepetierServer server on a PI. 

    Finally hdmi boots on ubuntu gui, but if i make this image it could be interesting to boot on rep-server touchscreen interface. 


  • Shutdown/reboot are defined in extcommands.xml in server database directory. If you did copy that it will also appear. If it works depends on your sudo configuration.

    Webcam will always appear but the list of connected webcams requires the special scripts installed on our image at /usr/local/Repetier-Setup and the mjpg streamer installation.

    I wonder what the difference in the kernels is that the original does not work.
Sign In or Register to comment.