Page MenuHomeAleph Objects Inc

Baud Connection Fail error at first attempt to connect to printer
Open, HighPublic

Description

During Smoke Testing of 3.6.4 we are getting a Baud Connection fail error at the first attempt to connect to the printer. I attempted to flash FW to see if that would help but got a communications error. I then pulled the USB cable out of the computer and connected it to a different USB port and was able to connect to the printer successfully. This happened in our Ubuntu 16.04 system, Mac OS X High Sierra & El Capitan systems so far.
Here is the log for Ubuntu 16.4/Mini with aerostruder v1 toolhead


Here is the log for Mac OS X High Sierra/Mini2 with 0.25 toolhead

Here is the log for Mac OS X El Cap/Mini with standard mini extruder

A few more observations, this DID NOT occur in Windows 10/Mini with standard Mini toolhead.
Also, we tried pulling the USB cable and reconnecting to the same port and the connection failed. It only reconnected if USB was plugged into a different port.

Event Timeline

Yahuba created this task.Feb 8 2019, 11:55 AM

Update, was also able to replicate on Debian system connected to a Mini w LCD attached/standard mini toolhead

Worth mentioning. In almost all these cases there was a second printer connected to the computer (powered off). The only printer powered on was the one being used.
I uninstalled cura and cleared the cache in our Ubuntu 16.4 system. Then I disconnected the two printers and reconnected the Mini. Installed and launched Cura. Was able to get a successful connection to the printer on first attempt.

Yahuba added a comment.Feb 8 2019, 1:02 PM

OK, I have determined that this is definitely caused if there is a second printer connected to the same machine (even if the printer is powered off). This was definitely not an issue in the past and I am not sure how many users would run into this problem.

I noticed that the Windows 10 machine was the only one out these that did not have a second printer connected to it and it was the only one that was able to connect. I then connected a second printer to the system (left powered off) and when I attempted to connected to the powered printer, I got the same baud connection fail error.

alexei claimed this task.Feb 12 2019, 7:33 AM
alexei triaged this task as High priority.
alexei changed the edit policy from "All Users" to "Restricted Project (Project)".
karrad added a subscriber: karrad.Apr 26 2019, 8:08 AM

@alexei While attempting to connect with a TAZ Pro on fresh master build 3.6.7 and cache clear, I am receiving this error:

2019-04-26 08:05:39,980 - DEBUG - [(139638052085376)-MainThread] CuraEngineBackend.CuraEngineBackend._onBackendQuit [742]: Backend quit with return code 0. Resetting process and socket.
2019-04-26 08:05:41,236 - DEBUG - [(139638052085376)-MainThread] AutoSave.AutoSave._onTimeout [48]: Autosaving preferences, instances and profiles
2019-04-26 08:05:58,387 - DEBUG - [(139638052085376)-MainThread] USBPrinting.USBPrinterOutputDevice._log [54]: Closing the USB printer connection.
2019-04-26 08:05:58,389 - DEBUG - [(139638052085376)-MainThread] UM.Qt.QtApplication.preventComputerFromSleeping [565]: Prevent computer from sleeping? False
2019-04-26 08:06:00,353 - DEBUG - [(139638052085376)-MainThread] USBPrinting.USBPrinterOutputDevice._log [54]: Attempting to connect to None
2019-04-26 08:06:00,356 - INFO - [(139638052085376)-MainThread] USBPrinting.USBPrinterOutputDevice._log [54]: Detected 3D printer on /dev/ttyACM0.
Exception in thread Thread-14:
Traceback (most recent call last):
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/aleph/Projects/cura/build-master/build/dist/plugins/plugins/USBPrinting/USBPrinterOutputDevice.py", line 670, in _connect_func
    self._parent._detectSerialPort()
  File "/home/aleph/Projects/cura/build-master/build/dist/plugins/plugins/USBPrinting/USBPrinterOutputDevice.py", line 368, in _detectSerialPort
    serial_connection = serial.Serial(str(self._serial_port), baud_rate, timeout=3, writeTimeout=10000)
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/site-packages/serial/serialutil.py", line 217, in __init__
    self.baudrate = baudrate
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/site-packages/serial/serialutil.py", line 283, in baudrate
    b = int(baudrate)
ValueError: invalid literal for int() with base 10: 'AUTO'

The program is just stating "scanning available serial ports for printers"

Testing with Mini 2 SE, and Mini 1 Single Extruder I had no issues connecting

While testing a taz 6, i received this error while trying to connect:

2019-04-26 08:18:57,190 - WARNING - [(140715872622336)-Thread-2] UM.OutputDevice.OutputDeviceManager.removeOutputDevice [126]: Could not find output device with id Autodetect to remove
2019-04-26 08:19:10,536 - DEBUG - [(140717144751744)-MainThread] USBPrinting.USBPrinterOutputDevice._log [54]: Attempting to connect to None
Exception in thread Thread-19:
Traceback (most recent call last):
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/site-packages/serial/serialposix.py", line 265, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
OSError: [Errno 16] Device or resource busy: '/dev/ttyACM0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/aleph/Projects/cura/build-master/build/dist/plugins/plugins/USBPrinting/USBPrinterOutputDevice.py", line 670, in _connect_func
    self._parent._detectSerialPort()
  File "/home/aleph/Projects/cura/build-master/build/dist/plugins/plugins/USBPrinting/USBPrinterOutputDevice.py", line 368, in _detectSerialPort
    serial_connection = serial.Serial(str(self._serial_port), baud_rate, timeout=3, writeTimeout=10000)
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/site-packages/serial/serialutil.py", line 236, in __init__
    self.open()
  File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 16] could not open port /dev/ttyACM0: [Errno 16] Device or resource busy: '/dev/ttyACM0'

After automatically updating firmware, I was able to connect w/o issue

While attempting to automatically update FW on the Pro, I got a cirtical crash:

2019-04-26 08:22:55,976 - INFO - [(140717144751744)-MainThread] USBPrinting.USBPrinterOutputDevice._log [54]: Detected 3D printer on /dev/ttyACM0.
2019-04-26 08:22:55,985 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [61]: An uncaught error has occurred!
2019-04-26 08:22:55,987 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]: Traceback (most recent call last):
2019-04-26 08:22:55,988 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:   File "/home/aleph/Projects/cura/build-master/build/dist/plugins/plugins/USBPrinting/USBPrinterOutputDeviceManager.py", line 111, in updateAllFirmware
2019-04-26 08:22:55,990 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:     self._usb_output_devices[printer_connection].updateFirmware(file_name, update_eeprom)
2019-04-26 08:22:55,992 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:   File "/home/aleph/Projects/cura/build-master/build/dist/plugins/plugins/USBPrinting/USBPrinterOutputDevice.py", line 321, in updateFirmware
2019-04-26 08:22:55,993 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:     self._detectSerialPort()
2019-04-26 08:22:55,998 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:   File "/home/aleph/Projects/cura/build-master/build/dist/plugins/plugins/USBPrinting/USBPrinterOutputDevice.py", line 368, in _detectSerialPort
2019-04-26 08:22:56,000 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:     serial_connection = serial.Serial(str(self._serial_port), baud_rate, timeout=3, writeTimeout=10000)
2019-04-26 08:22:56,002 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:   File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/site-packages/serial/serialutil.py", line 217, in __init__
2019-04-26 08:22:56,003 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:     self.baudrate = baudrate
2019-04-26 08:22:56,005 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:   File "/home/aleph/Projects/cura/build-master/build/inst/lib/python3.5/site-packages/serial/serialutil.py", line 283, in baudrate
2019-04-26 08:22:56,006 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]:     b = int(baudrate)
2019-04-26 08:22:56,007 - CRITICAL - [(140717144751744)-MainThread] cura.CrashHandler.__init__ [64]: ValueError: invalid literal for int() with base 10: 'AUTO'
aleph@lyrebird:~/Projects/cura/build-master/build/dist$

Retested this in the 3.6.7 release with following operating systems (each case, i had two printers connected to same computer, the one set up to use in CuraLE was powered on and a secondary printer was connected to the computer but powered off):
Ubuntu 16.04 - stayed stuck in "Scanning Available Serial Ports for printers" indefinitely
Ubuntu 18.04 - was able to connect to printer
Mac OS X (El Capitan) - was able to connect to printer
Mac OS X (High Sierra) - was able to connect to printer
Debian (stretch) - stayed stuck in "Scanning Available Serial Ports for printers" indefinitely
Windows 7 - Status changed to "Can't Connect to Printer"
Windows 10 - was able to connect to printer

Ubuntu 16.04 log:


Debian Log:
Windows 7 log:

karrad closed this task as Resolved.Jun 14 2019, 1:05 PM

Have not seen this be an issue on recent smoke tests, closing down.

Sorry, just double-checked this in 3.6.10 and was still able to replicate this in the following systems (two printers connected to same machine; one powered off):
Ubuntu 16.04 - "cant connect to printer" status
Ubuntu 18.04 - stays stuck scanning for available printers.
OSX - El Capitan - "cant connect to printer" status
Windows 7 - "cant connect to printer" status

karrad reopened this task as Open.Jun 14 2019, 1:35 PM