Printer will reset, but not connect

Hi All,
I'm running Repetier Host V2.0.5 on Debian 9.

Host starts up. When I click connect, it successfully resets the printer, but the connect icon stays the same, and it does not indicate any connection. There is no log message or error.

The funny thing is, when I try to use repetier server, I can connect and use the printer with the exact same settings.

Any suggestions, or places to look for an error message?



Comments

  • What baud rate do you need? Host can only ansi rates on linux and tries a tool setBaudrate in same directory to set non ansi baud rates. Server runs in C++ and can set also non ansi baud rates in linux. So I guess it has something to do with this.

    On the other side host under linux is not the most stable, so use the server connector in host and be more on the safe side for prints.
  • Yup! I think you got it.

    I was at 250000, and last night I reflashed the printer to 115200, and it works now. Interestingly, server did not work at exactly 250000...I actually had to set it to 256000 to work.

    Thanks for the help and info!
  • Some serial drivers do not support non ansi baud rates as well, so setting the multiplier fails or is not exact.
  • ME1ME1
    edited June 2019
    Repetier said:
    Some serial drivers do not support non ansi baud rates as well, so setting the multiplier fails or is not exact.
    I have a similar problem with the new repetier host 2.1.6 on Ubuntu 18.04.

    The printer is resetted when connecting USB to laptop. When trying to connect repetierhost 2.1.6 with 250000 baud it says: "error: baud_base (115200) does not allow setting custom baud rate Forcing set baudrate failed" and the connection fails.

    Some other baud rate like 115200 does not throw this error, I can connect but cannot control the printer.

    The funny thing: if I use repetierHost 1.6.2 which I was using for a long time under Linux now, there are no error messages and I can print just like normal. Does version 2.1.6 have bugs/connection problems and should I wait for one of the next versions?
  • Mono serial library does only support ANSI baud rates. 250000 baud is no such baud rate. As a solution we call a C++ softwware SetBaudraute after connecting to change it using that software (sources are included). 

        ss.flags = (ss.flags & ~ASYNC_SPD_MASK) | ASYNC_SPD_CUST;
        ss.custom_divisor = (ss.baud_base + (baud / 2)) / baud;
        ss.custom_divisor = (ss.baud_base + (baud / 2)) / baud;
        if(ss.custom_divisor == 0) {
          cerr << "error: baud_base (" << ss.baud_base << ") does not allow setting custom baud rate" << endl;  
          exit(-2);
        }

    is where it stops. For 115200 baud it should not go there so I assume ss.baud_base is what it was set to before and from that it can not switch to 250000. Haven't changed that code since it was working so it istrange that 1.6.2 ha sit working. On the other side with baud_base 115200 it will in deed become 0. Idea of the method is that baud_base is a very big number. But not all boards support this non ansi baud rate trick. But then 1.6.2 should also not work. What shoudl work is setting printer baud rate to ansi value e.g. 115200 or 230400 then linux has no problems and hence libraries also not.

    What board/serial driver does it use in case I can replay it?
  • ME1ME1
    edited June 2019
    Repetier said:
    [...]
    What board/serial driver does it use in case I can replay it?

    I am using an Arduino Due as board with firmware Repetier_0.92.4, which was specifically made by my printer maker (it is a Construction Zone CZ1 Version 2 printer).
    Serial driver is xhci_hcd:
    Jun 09 19:02:53 m5 kernel: usb 1-2: new full-speed USB device number 16 using xhci_hcd
    Jun 09 19:02:53 m5 kernel: usb 1-2: New USB device found, idVendor=2a03, idProduct=003d
    Jun 09 19:02:53 m5 kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
    Jun 09 19:02:53 m5 kernel: usb 1-2: Product: Arduino Due Prog. Port
    Jun 09 19:02:53 m5 kernel: usb 1-2: Manufacturer: Arduino (www.arduino.org)

    I also find it strange, that 1.6.2 works with the same setting.
    I was printing with 1.6.2 just normal.

    I will try 230400.
  • Get same hardware device name, have set it to 250000 baud and tested appimage and linux tar ball and both have no problems connecting to 250000 baud with Ubuntu 16.04. So it should at least work unless something modified port behaviour.

    As a last resort you can also install Repetier-Server and print over the server using the server connector in host. This is also the best solution - you can even close host and print will continue. And there is no C# dependency for connection.
Sign In or Register to comment.