RS in Laptop o RPi? GPIO in laptop?

Hello! I am an RS Pro user, I currently have 7 printers. 4 connected to a RaspberryPi3b and another 3 connected to another similar Raspberry. This week I will have to buy 2 more printers and I have a problem.
Previously when I went from 4 printers to 5 I connected the printers to a single RPi with a HUBusb and had a lot of problems with random disconnections so add another RPi.
Currently I will have to buy ANOTHER Raspberry to connect the 9th and I want to analyze what other options I have.
I have an old laptop, with an AMD Phenom X4, 4gb, ssd and ATI5770 that I don't use, if I install RepetierServer there could I run a single instance and run all 9 printers there? I would have to use USB HUB as well but I think the laptop will be less sensitive to EMF.
If I do this I would lose the GPIO ports, where I have the filament sensors connected.
Is it a good idea to run RepetierServer on Windows or Ubuntu? I would use that PC just for that. Is there any way with additional hardware to have something like GPIO ports but on a PC? If you had to choose between Windows and Ubuntu, which would you choose to run RepetierServer? (I still have to install an OS because the laptop currently has an AndroidTV, so I ask what would be the ideal)
I am open to any advice. Thank you very much!

Comments

  • I would use ubuntu over windows, just because windows likes to reboot every now and then to install updates.

    Notebooks have no GPIOs you can use, so that requires a different solution.

    I can not say how much printers you can connect - as you already noted at some point emi starts making problems. CPU wise just sending data it is no issue. It gets harder if you start having webcams as well as they use lot of usb bandwidth
  • I know they don't have GPIO, but I could, for example, read the digital inputs of the Arduino (it's just an idea) and I could have the status of the filament sensor through the serial port on the PC, I can do that for sure, but I wouldn't know how to get that reading to the server, I have basic knowledge of electronics but not much of programming and I don't know if I can do that. Do you think that would be possible?

    Another thing that worries me is if I will not have problems with the USB Hubs on the laptop, do you know of anyone who has had these problems?

    I don't use a webcam, only one eventually to make a TimeLapse for some video for my business's social networks, but I really don't need it
  • There is no direct support for external sensors outside own pc.

    It is possible of course using our api. You could write a script that monitors your GPIO and calls the web api to tell server that pin has changed and you should pause script. See for example this script which does exactly that:

    https://github.com/Raabi91/filament_runout_Repetier


  • That will probably be very useful, thank you very much!

    Just another question, if I have multiple instances of RepetierServer installed on 2 or more RPis, is there a way for all of them to access the same gcode "folder"? in the configuration of each Printer I can choose that all the printers access the folder of the first printer that I load and this is very useful for me, but when I have more than one installation, I have to load the same file in the different RPis
    thanks for your help!
  • No same gcode folder is only possible within one installation as the directory must be on same device.

    However you can store gcode in projects and start prints also from project. Here all instances can access same project if the server containing the project is listed in global config->connectivity.
  • Repetier said:
    No same gcode folder is only possible within one installation as the directory must be on same device.

    However you can store gcode in projects and start prints also from project. Here all instances can access same project if the server containing the project is listed in global config->connectivity.
    I'll try to run the server on a dedicated PC for that and use the documentation you posted above to use the RPi for the GPIO ports.
    Install RS on the laptop and now I'm trying to copy the backup
    I have 2 RPi Backups and I want to upload them to the same RS instance on PC
    I made the backup of both servers in the RPi using RepetierMonitor
    In the first one I made a complete backup and in the second one I made a backup of: Printers Configuration and GCODE Permanents, I supposed that this way I could configure the server with the information of the first instance and copy only the printers and GCODEs of the second instance too but when I load the backup of the second, I stop seeing the printers. I am also uploading the backup to the PC from RepetierMonitor
    I'm not really interested in backing up the printer configuration, but the gcodes, since I have 8GB of gcode and several folders, it would cost me a lot to reload them manually. If there is something I am doing wrong in the backup or there is a way to make it easier than downloading all the gcode and reloading them, tell me how. Thanks a lot!
  • Backup restores and overwrites contained files, so last restored will exist. If you have different slug names for the printers from second backup this will work, otherwise they will overwrite the other one. Also you loose the history of the second server as that is a database file and as said if you copy it replaces so only one can survive.
  • Hello!
    Install RS first on an old laptop (PhenomIIx4 and 4gb ddr3) but I had a lot of problems, I had to connect printers through USB HUB, because I have 7 printers currently and all the printers that were connected through the HUB were randomly disconnected, so install on a desktop PC with a Core2Duo and 3gb ddr2 and now it's working perfect.
    Also install the Raabi script on an RPi and I will be able to connect the filament sensors, so I am extremely happy with it
    BUT! Now I am having disconnections in 2 printers and I don't know why... the printer has 6 rear USB ports and 2 front USB ports, the printers are connected to the 6 rear and one front
    The printers that are disconnected are the same and the error is as follows

    2022-07-10 18:16:49: error: Reading serial connection failed: End of file. Closing connection.
    2022-07-10 18:16:49: Port closed for MagnaSE2
    2022-07-10 18:16:49: Connection closed: MagnaSE2
    2022-07-10 18:17:33: Connection started: MagnaSE2
    2022-07-10 18:17:33: Internal reset printer MagnaSE2
    2022-07-10 18:17:33: Reset printer MagnaSE2

    These printers have been working on Repetier for about 1 year running on the RaspberryPi and never had a problem with disconnections
    What change?
    Now they run on PC and before on RPi
    Before they were version 1.3 and now 1.4

    Any idea would be great.

    Thank you all for your help and Raabi for the filament_runout script, it's perfect
  • Other log

    2022-07-10 19:27:00: error: Reading serial conection failed: End of file. Closing connection.
    2022-07-10 19:27:00: Connection closed during print ... trying reconnect for 10 seconds to continue ...
    2022-07-10 19:27:00: Port closed for MagnaSE1
    2022-07-10 19:27:00: Connection closed: MagnaSE1
    2022-07-10 19:27:00: Connection continued: MagnaSE1
    2022-07-10 19:27:05: Repetier-Informer API response: {"error":0,"data":{"receivers":1}}
    2022-07-10 19:30:06: error: Reading serial conection failed: End of file. Closing connection.
    2022-07-10 19:30:06: Port closed for MagnaSE1
    2022-07-10 19:30:06: Connection closed: MagnaSE1
    2022-07-10 19:30:49: Connection started: MagnaSE1
    2022-07-10 19:30:49: Internal reset printer MagnaSE1
    2022-07-10 19:30:49: Reset printer MagnaSE1
  • and now, when I turn off one machine, another one stops printing, this is the log

    2022-07-10 21:01:13: error: Reading serial conection failed: End of file. Closing connection.
    2022-07-10 21:01:14: Connection closed during print ... trying reconnect for 10 seconds to continue ...
    2022-07-10 21:01:14: Port closed for HidraPlus
    2022-07-10 21:01:14: Connection closed: HidraPlus
    2022-07-10 21:01:14: Connection continued: HidraPlus
    2022-07-10 21:01:16: Repetier-Informer API response: {"error":0,"data":{"receivers":1}}
    2022-07-10 21:01:17: Repetier-Informer API response: {"error":0,"data":{"receivers":1}}
    2022-07-10 21:01:18: error: Reading serial conection failed: End of file. Closing connection.
    2022-07-10 21:01:18: Port closed for MagnaDirecta
    2022-07-10 21:01:18: Connection closed: MagnaDirecta
    2022-07-10 21:01:32: Connection started: MagnaDirecta
    2022-07-10 21:01:32: Internal reset printer MagnaDirecta
    2022-07-10 21:01:32: Reset printer MagnaDirecta
    2022-07-10 21:02:25: Closing websocket for missing ping

  • First, you should check /var/log/syslog (still linux I hope) to see why linux disconnected. I see it must be something temporarily as it reconnects quickly so probably EMF issues. After all you have 7 sources with own power that can interfere.

    In case of both closing I see both got end of file signal from os, so closing it is ok. Question is why they close. Are you using /dev/ or /dev/serial/by... for ports? Also I think once assigned they should not renumber. But maybe syslog shows why e.g. both same reason as they shared something or were too close together.

    How are usb cable length with new solution? Longer usb cables make it harder to get correct communication also 1.5m is normally no problem.
  • Repetier said:
    First, you should check /var/log/syslog (still linux I hope) to see why linux disconnected. I see it must be something temporarily as it reconnects quickly so probably EMF issues. After all you have 7 sources with own power that can interfere.

    In case of both closing I see both got end of file signal from os, so closing it is ok. Question is why they close. Are you using /dev/ or /dev/serial/by... for ports? Also I think once assigned they should not renumber. But maybe syslog shows why e.g. both same reason as they shared something or were too close together.

    How are usb cable length with new solution? Longer usb cables make it harder to get correct communication also 1.5m is normally no problem.
    Thanks for answering
    I'm still on Linux (Debian11)

    I copy syslog and server.log from the same disconnection

    syslog
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.183885] usb usb3-port1: disabled by hub (EMI?), re-enabling...
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.183905] usb 3-1: USB disconnect, device number 4
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.186606] ch341-uart ttyUSB1: ch341-uart converter now disconnected from ttyUSB1
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.186789] ch341 3-1:1.0: device disconnected
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.463816] usb 3-1: new full-speed USB device number 6 using uhci_hcd
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.643914] usb 3-1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.643919] usb 3-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.643922] usb 3-1: Product: USB Serial
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.647061] ch341 3-1:1.0: ch341-uart converter detected
    Jul 11 ​​00:10:14 repeater kernel: [ 3890.652983] usb 3-1: ch341-uart converter now attached to ttyUSB1
    Jul 11 ​​00:15:13 repeater kernel: [ 4189.521803] usb usb1-port2: disabled by hub (EMI?), re-enabling...
    Jul 11 ​​00:15:13 repeater kernel: [ 4189.521817] usb 1-2: USB disconnect, device number 4
    Jul 11 ​​00:15:13 repeater kernel: [ 4189.523499] ch341-uart ttyUSB5: ch341-uart converter now disconnected from ttyUSB5
    Jul 11 ​​00:15:13 repeater kernel: [ 4189.523518] ch341 1-2:1.0: device disconnected
    Jul 11 ​​00:15:13 repeater kernel: [ 4189.805751] usb 1-2: new full-speed USB device number 6 using uhci_hcd
    Jul 11 ​​00:15:14 repeater kernel: [ 4189.989362] usb 1-2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
    Jul 11 ​​00:15:14 repeater kernel: [ 4189.989367] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    Jul 11 ​​00:15:14 repeater kernel: [ 4189.989370] usb 1-2: Product: USB Serial
    Jul 11 ​​00:15:14 repeater kernel: [ 4189.992425] ch341 1-2:1.0: ch341-uart converter detected
    Jul 11 ​​00:15:14 repeater kernel: [ 4189.999423] usb 1-2: ch341-uart converter now attached to ttyUSB5

    Server.log
    2022-07-11 00:10:14: error: Reading serial connection failed: End of file. Closing connection.
    2022-07-11 00:10:14: Connection closed during print ... trying to reconnect for 10 seconds to continue ...
    2022-07-11 00:10:14: Port closed for MagnaSE1
    2022-07-11 00:10:14: Connection closed: MagnaSE1
    2022-07-11 00:10:14: Connection continued: MagnaSE1
    2022-07-11 00:15:13: error: Reading serial connection failed: End of file. Closing connection.
    2022-07-11 00:15:13: Connection closed during print ... trying to reconnect for 10 seconds to continue ...
    2022-07-11 00:15:13: Port closed for MagnaSE2
    2022-07-11 00:15:13: Connection closed: MagnaSE2
    2022-07-11 00:15:14: Connection continued: MagnaSE2

    I am using ports that look like this:
    /dev/serial/by-path/pci-0000:00:1a.1-usb-0:1:1.0-port0 (This on the MagnaSE1 machine, the first to disconnect in the log)

    I use the ones that start at /dev/serial/by-path/

    The cables are approx 1.5mts long, but I think 2 cables are a bit longer than that, but all of them are the same ones I used on the raspberrys. Can the PC be more sensitive to EMF than the Raspberrys?
    the setup is the same, I just took out 2 Raspberrys and put a PC (with all the software changes it requires)
  • Ok, here you see the real issue:

    Jul 11 ​​00:15:13 repeater kernel: [ 4189.521803] usb usb1-port2: disabled by hub (EMI?), re-enabling...
    Jul 11 ​​00:15:13 repeater kernel: [ 4189.521817] usb 1-2: USB disconnect, device number 4
    Jul 11 ​​00:15:13 repeater kernel: [ 4189.523499] ch341-uart ttyUSB5: ch341-uart converter now disconnected from ttyUSB5

    Is the printer connected to a hub? disabled by hub (EMI?) is what happened. This hub can also be inside your laptop. See usb devices as tree 
    lsusb -t
    then it is clear. Anyhow, that is why you get the disconnect. Not sur eif hub or the printer is here more sensitive. It really differs between hardwares. Even on pi I think the usb 2 is less sensitive then usb 3 ports.
  • It is not connected to a HUB, it is a desktop PC, Dell Optiplex 750.
    I am connecting the 6 rear ports and one front
  • Might still a board internal hub, hence
    lsusb -t
    to see the structure. Anyhow one of the components was not happy and did disconnect for a short period. Other usb cable can maybe make a difference - really depends where the interference comes from.
  • /:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    /:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M

    this returns me the command

    I'll try with other cables too. Thank you
  • One bus per port is good at least. Then it is the root hub that issues the EMI warning.
  • So I have to look for the problem outside the server, right? External EMI from power supplies or something? I will try to find new cables and I will try to keep the usb cables away from the power cables
  • Yes, it is linux disconnecting serial so nothing we can control. All you can do is enable to reconnect automatically and continue print in server. If that does not reset printer it at least allows to continue printing with short pause.

    It can also be a heater or motor cable coming too close to some communication part inside printer or what I also have heard problems with grounding inside printer when usb ground had contact to the printer housing. Then housing can catch up all the noise with inductions and transmit to usb. At least that is how I understood it from a user who found it. Electronics is not really my field.
Sign In or Register to comment.