many resends

I am seeing many resends from my Raspberry Pi server to the Ender 3 printer. I have printed the file directly  from a SD with success but the same file gets many resends when it is sent from the Raspberry Pi server to the printer. It is also prepending an automatic leveling and a preliminary priming path before the code that is appearing in the .gcode. I had tried to add these to the CuraEngin pre code in the gcode section but have since deleted it. I have reinitialized the initical gcode with the option in the CuraEngine with no joy. Does the Repetier Server keep a prefile that may be added? Could it be a handshaking problem between the Ender 3 usb-serial port and the Repetier Server?

Comments

  • There are 2 reasons for resends - communication errors and if ping pong is disabed the configured buffe rmight be too big causing overflow of data. Enable ping pong for testing and if it gets better enable it again and reduce input buffer. 127 is normally working good.

    Regarding g-code we only send the g-code you saved in server plus start/end g-code defined in server. So if it gets send it is included in one of these.
  • I resolved the issue. I had put some gcode in the Repetier Host that was to be executed on connection. It was always being executed, on the initiation of a print job. It was not shown in the gcode generated by the slicer. I finally realized this and searched, finding the code I had entered. It apparently did something to the serial line (I don't know what) but when it was eliminated the transmissions went perfectly. Thank you for your response.
  • The start/end code accessed through Repetier Host sends the start code plus 9 other scripts. This does not appear anywhere. This is accessed through the Repetier Host menu config->printer settings. It appears that this script is not passed through the statement compiler that accepts for generated gcode variables like BED temperature.
  • Yes, the scripts in host are only executed if host is the sender. With server connector the server is doing the work and host does not see/execute them actually. So that is why you need to copy them to the server scripts instead. Server has all the scripts host has as well plus some more.
  • I just updated my raspberry pi with a video display with raspberry pi attached on the back. I downloaded repetier server 1.46 and installed it. I cannot remember the license key. Can you provide this?
  • I am having a problem with the connection of the raspberry pi communicating with my ender 3 pro. I can use the server on my windows machine and it connects and runs the printer via the usb. However, I cannot get the raspberry pi to do the same. I have used both /deb/ttyAMA0 and /deb/ttyS0 with no luck. The video has a touch screen what uses a serial port and it works well. I am connecting the screen per the manufacturer's instructions with the cables provided. What port assignments should I use?
  • For license you can try our support page and tell them which email you used for buying, maybe we find it and can send it to that email.

    Regarding port use one of the /dev/serial/by-id or by-path ports you see. Must be one of these. ttyS0 is devitively wrong. 
  • I have tried /dev/tty, /dev/tty0, /dev/tty1, /dev/ttyAMA0, /dev/serial0. None seem to work as I get the timeout and momentary icon flash indicating offline. The period is the retry interval. 
  • Why are you talking about the hardware serials and not the usb serial devices? Didn't you connect the ender 3 with usb cable? As I said regular connected printers normally appear under /dev/serial/by-id/... with the name. Not true for hardware serials but you need to enable hardware serial if you somehow managed to add that. Alo 

  • There is no device in the /dev 

     /dev/serial/by-id/... 

    or
     pi@RepetierServer:/dev $ cd /serial
    -bash: cd: /serial: No such file or directory
    pi@RepetierServer:/dev $ cd /by-id
    -bash: cd: /by-id: No such file or directory
    pi@RepetierServer:/dev $

    pi@RepetierServer:/dev $ dir
    autofs         kmsg          ram10    tty13  tty4   tty9       vcsu
    block          log           ram11    tty14  tty40  ttyAMA0    vcsu1
    btrfs-control  loop0         ram12    tty15  tty41  ttyprintk  vcsu2
    bus            loop1         ram13    tty16  tty42  ttyS0      vcsu3
    cachefiles     loop2         ram14    tty17  tty43  uhid       vcsu4
    cec0           loop3         ram15    tty18  tty44  uinput     vcsu5
    cec1           loop4         ram2     tty19  tty45  urandom    vcsu6
    char           loop5         ram3     tty2   tty46  usb        vcsu7
    console        loop6         ram4     tty20  tty47  v4l        vga_arbiter
    cuse           loop7         ram5     tty21  tty48  vchiq      vhci
    disk           loop-control  ram6     tty22  tty49  vcio       video10
    dma_heap       mapper        ram7     tty23  tty5   vc-mem     video11
    dri            media0        ram8     tty24  tty50  vcs        video12
    fb0            media1        ram9     tty25  tty51  vcs1       video13
    fd             media2        random   tty26  tty52  vcs2       video14
    full           media3        rfkill   tty27  tty53  vcs3       video15
    fuse           mem           serial0  tty28  tty54  vcs4       video16
    gpiochip0      mmcblk0       serial1  tty29  tty55  vcs5       video18
    gpiochip1      mmcblk0p1     shm      tty3   tty56  vcs6       video19
    gpiomem        mmcblk0p2     snd      tty30  tty57  vcs7       video20
    hidraw0        mqueue        stderr   tty31  tty58  vcsa       video21
    hidraw1        net           stdin    tty32  tty59  vcsa1      video22
    hidraw2        null          stdout   tty33  tty6   vcsa2      video23
    hidraw3        port          tty      tty34  tty60  vcsa3      video31
    hwrng          ppp           tty0     tty35  tty61  vcsa4      watchdog
    i2c-20         ptmx          tty1     tty36  tty62  vcsa5      watchdog0
    i2c-21         pts           tty10    tty37  tty63  vcsa6      zero
    initctl        ram0          tty11    tty38  tty7   vcsa7
    input          ram1          tty12    tty39  tty8   vcsm-cma


  • That is bad. If you connect via usb (do you or not? You did not answer that one) it must appear or linux did not start the serial driver for it.

    If you run
    lsusb
    you should see a list of connecte dusb devices including your printer if it is enabled and connected.
    There are 2 possible errors here - no usb connection then you won't see it with lsusb as well. As a test remove usb able and run again. If one entry disappears tha was your printer.

    If you can see the usb device and you have no /dev/serial I assume linux does not have a driver for that device or did not detect it.

    Run
    lsmod
    to see active modules. In my list I see
    cdc_acm                28672  2

    which I'm pretty sure is my serial driver. You won't see a driver in your case I think, but consider they might have other names.

    Othe rpi has these usb devices
    Bus 001 Device 007: ID 1a86:7523 QinHeng Electronics CH340 serial converter
    Bus 001 Device 005: ID 2c99:0002 Prusa Original Prusa i3 MK3

    ch341                  16384  1
    usbserial              36864  3 ch341

    If you see you have a CH3xxx driver and no module try
    insmod ch341


  • I am connecting using the usb.

    I ran the lsusb and got the following:

    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 1912:1014  2.4G Composite Devic
    Bus 001 Device 003: ID 27c6:0818 Shenzhen Goodix Technology Co.,Ltd. TouchScreen
    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    pi@RepetierServer:/ $ lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 1912:1014  2.4G Composite Devic
    Bus 001 Device 003: ID 27c6:0818 Shenzhen Goodix Technology Co.,Ltd. TouchScreen
    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    pi@RepetierServer:/ $ lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 1912:1014  2.4G Composite Devic
    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    pi@RepetierServer:/ $ lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 1912:1014  2.4G Composite Devic
    Bus 001 Device 005: ID 27c6:0818 Shenzhen Goodix Technology Co.,Ltd. TouchScreen
    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    The first run was with the ender 3 printer not connected. The second run was with it connected. The third run was with the touchscreen disconnected. The fourth run was with it reconnected.
  • Note:
    The windows version of the server uses the usb and works well.
    The raspberry pi server is installed from the latest download of the version 1.4.6. It has gone through initialization and the printer has been installed with the connectWizard but it never returns from the protocol test.
  • As you see no device was added when you connected printer (which was enabled I hope, some do only appear with main power). I see no device appearing so linux did not see the printer.

    Try connecting something else to that usb port just to test that the pi usb port works. When printer creates com port on windows it should be ok. If othe devices (webcam/mouse/keyboard) do not appear as well I'd assume a defect on usb port. Then try other port e.g. the one where you connected the touchscreen which is a working device on working usb already tested.
  • The 2.4 GHz Composite device is the wireless keyboard/mouse dongle. It is working well. The Shenzhen Goodix Technology Co.,Ltd. TouchScreen is the touchscreen and it obviously comes and goes. I have tried each on different usb ports with success. Note too, that the ender port works well with the usb connected and with the Repetier Host on the Windows machine.
  • Correction, works well with the Repetier Server using the usb on the Windows machine. When I use the Host to go the Raspberry Pi Repetier Server, that is when I lose connection.
  • Strange. From googling it should show a line like this:
    Bus 001 Device 070: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
    And when other devices work there should be no reason and you need to dig deeper why linux does not show usb.

    Try 
    tail -f /var/log/syslog

    unplug usb and plug it back. There should appear new infos while you do. Press Ctrl+C when finished. There linux will most likely show why it did not list it as usb.
  • Note too, that the Raspberry Pi software when I display printer, shows that the printer is "idle" and momentarily switches to "offline". If I try to set up another port on the Raspberry Pi, it says that the port is "offline".
  • As long as you have not set the correct serial port it is not relevant what server shows. And since port did not appear so far it can not be the correct one. Thats the issue we try to fix.
  • I have discovered that the Raspberry pi 3 and 4 treat the serial port differently. I have a raspberry pi 4. I believe that there is a configuration problem that I am dealing with but haven't discovered it yet. Got any ideas?
  • btw: The ttyAMA0 is the only port that seems to temporarily attach but no data is sent. I will check the tx pin tomorrow.
  • ttyAMA0 is not a correct serial. So far I only see these two:
    ls -l /dev/serial/by-id/
    total 0
    lrwxrwxrwx 1 root root 13 Jan 16 15:25 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0
    lrwxrwxrwx 1 root root 13 Nov  2 12:53 usb-Prusa_Research__prusa3d.com__Original_Prusa_i3_MK3_CZPX3018X004XK75806-if00 -> ../../ttyACM0

    so pattern is ttyUSBxxx or ttyACMxxx
    for usb connections.
  • If I do
    "ls -l /dev/serial"
    both give "ls: cannot accell '/dev/serial': No such file or directory"
  • I know that is the problem. Linux does not add the device for some reason. Hence the
    tail -f /var/log/syslog
    test I supposed above to see why linux does not add it.
  • I believe that I have found the problem. There is a burn mark on the Raspberry Pi. I think there is some sort of failure that resulted in the Linux software failing to find the serial USB hardware. I am going to replace the Raspberry Pi.
Sign In or Register to comment.