"Connect" via Octoprint causes Printer to restart

At first I thought I was having issues with the PSUControl plugin, which has had some changes recently, but looking at the log, it doesn't seem relevant to this issues.

2021-04-23 12:04:52,908 - octoprint.plugins.geeks3d - INFO - Event: Connecting
2021-04-23 12:04:52,909 - octoprint.plugins.geeks3d - INFO - Payload: None
2021-04-23 12:04:52,985 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2021-04-23 12:04:53,004 - octoprint.plugins.geeks3d - INFO - Event: PrinterStateChanged
2021-04-23 12:04:53,005 - octoprint.plugins.geeks3d - INFO - Payload: {u'state_id': 'DETECT_SERIAL', u'state_string': u'Detecting serial connection'}
2021-04-23 12:04:53,098 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 1 port/baudrate candidates: /dev/ttyUSB0@115200
2021-04-23 12:04:53,100 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 115200
2021-04-23 12:04:53,101 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 115200
2021-04-23 12:04:53,143 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-04-23 12:04:53,167 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-04-23 12:04:54,949 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Operational"
2021-04-23 12:04:54,963 - octoprint.plugins.geeks3d - INFO - Event: PrinterStateChanged
2021-04-23 12:04:54,966 - octoprint.plugins.geeks3d - INFO - Payload: {u'state_id': 'OPERATIONAL', u'state_string': u'Operational'}
2021-04-23 12:04:55,003 - octoprint.plugins.geeks3d - INFO - Event: Connected
2021-04-23 12:04:55,005 - octoprint.plugins.geeks3d - INFO - Payload: {u'baudrate': 115200, u'port': u'AUTO'}
2021-04-23 12:04:55,058 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-04-23 12:05:03,614 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin Creality 3D"
2021-04-23 12:05:03,624 - octoprint.plugins.geeks3d - INFO - Event: FirmwareData
2021-04-23 12:05:03,643 - octoprint.plugins.geeks3d - INFO - Payload: {u'data': {u'SOURCE_CODE_URL': u'GitHub - MarlinFirmware/Marlin: Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.', u'EXTRUDER_COUNT': u'1', u'UUID': u'cede2a2f-41a2-4748-9b12-c55c62f367ff', u'FIRMWARE_NAME': u'Marlin Creality 3D', u'MACHINE_TYPE': u'Ender-3', u'PROTOCOL_VERSION': u'1.0'}, u'name': u'Marlin Creality 3D'}
2021-04-23 12:05:03,661 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2021-04-23 12:05:04,071 - octoprint.plugins.tracking - INFO - Sent tracking event printer_connected, payload: {u'printer_baudrate': 115200, u'printer_port': u'AUTO', u'firmware_name': u'Marlin Creality 3D'}

When I hit to "Connect" button on the Octoprint web UI, My Ender 3 restarts. The screen goes blank, and the Ender logo shows up, and if something is printing, it halts printing.

I'm hoping someone can help me figure out what might be causing this issue.

Could you provide fresh octoprint and serial logs with the issue recreated. Since you mentioned PSUControl it cant hurt to capture the info for that too.

Follow these steps: Troubleshooting Β· kantlivelong/OctoPrint-PSUControl Wiki Β· GitHub

This is "by design", and a feature of the controller PCB. When anything makes a connection with the board, the board resets, no matter if it is OctoPrint, Cura, or whatever software. It is because most printer controllers are descendants of Arduino boards, and they used this mechanism as a simple way to upload new code to the board without having to press a reset button on the board.

2 Likes

Whaaat. That's insane.

I'm also guessing SD print was used then..?

I thought I included the relevant logs, but here's the rest, starting from boot:

2021-04-23 12:03:53,400 - octoprint.startup - INFO - ******************************************************************************
2021-04-23 12:03:53,401 - octoprint.startup - INFO - Starting OctoPrint 1.5.3
2021-04-23 12:03:53,402 - octoprint.startup - INFO - ******************************************************************************
2021-04-23 12:03:53,803 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity changed from offline to online
2021-04-23 12:03:53,915 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2021-04-23 12:03:53,915 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 8.8.8.8:53 is working
2021-04-23 12:03:53,916 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2021-04-23 12:03:54,467 - octoprint.startup - INFO - Blacklist processing done, adding 12 blacklisted plugin versions: roomtemp (any), GcodeEditor (0.1.1), GcodeEditor (0.2.0), GcodeEditor (0.2.1), GcodeEditor (0.2.2), GcodeEditor (0.2.3), GcodeEditor (0.2.4), GcodeEditor (0.2.5), GcodeEditor (0.2.6), GcodeEditor (0.2.8), gcodeleveling (0.1.0), gcodeleveling (0.1.1)
2021-04-23 12:03:54,488 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2021-04-23 12:03:55,480 - octoprint.startup - INFO - Added settings overlay from plugin firmware_check
2021-04-23 12:03:55,483 - octoprint.plugin.core - INFO - Found 24 plugin(s) providing 24 mixin implementations, 48 hook handlers
2021-04-23 12:03:55,574 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2021-04-23 12:03:55,588 - octoprint.server - INFO - Intermediary server started
2021-04-23 12:03:55,605 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2021-04-23 12:03:55,991 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2021-04-23 12:03:55,994 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW (needs: u"Need(method='role', value=u'plugin_action_command_notification_show')")
2021-04-23 12:03:55,994 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR (needs: u"Need(method='role', value=u'plugin_action_command_notification_clear')")
2021-04-23 12:03:55,995 - octoprint.server - INFO - Added new permission from plugin action_command_prompt: PLUGIN_ACTION_COMMAND_PROMPT_INTERACT (needs: u"Need(method='role', value=u'plugin_action_command_prompt_interact')")
2021-04-23 12:03:55,996 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: u"Need(method='role', value=u'plugin_announcements_read')")
2021-04-23 12:03:55,997 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_MANAGE (needs: u"Need(method='role', value=u'plugin_announcements_manage'), Need(method='role', value=u'plugin_announcements_read')")
2021-04-23 12:03:55,998 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: u"Need(method='role', value=u'plugin_appkeys_admin')")
2021-04-23 12:03:55,998 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: u"Need(method='role', value=u'plugin_backup_access')")
2021-04-23 12:03:56,000 - octoprint.server - INFO - Added new permission from plugin firmware_check: PLUGIN_FIRMWARE_CHECK_DISPLAY (needs: u"Need(method='role', value=u'plugin_firmware_check_display')")
2021-04-23 12:03:56,001 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: u"Need(method='role', value=u'plugin_logging_manage')")
2021-04-23 12:03:56,002 - octoprint.server - INFO - Added new permission from plugin pi_support: PLUGIN_PI_SUPPORT_STATUS (needs: u"Need(method='role', value=u'plugin_pi_support_check')")
2021-04-23 12:03:56,003 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: u"Need(method='role', value=u'plugin_pluginmanager_manage')")
2021-04-23 12:03:56,004 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_INSTALL (needs: u"Need(method='role', value=u'plugin_pluginmanager_install'), Need(method='role', value=u'plugin_pluginmanager_manage')")
2021-04-23 12:03:56,005 - octoprint.server - INFO - Added new permission from plugin psucontrol: PLUGIN_PSUCONTROL_CONTROL (needs: u"Need(method='role', value=u'plugin_psucontrol_admin')")
2021-04-23 12:03:56,006 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: u"Need(method='role', value=u'plugin_softwareupdate_check')")
2021-04-23 12:03:56,007 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: u"Need(method='role', value=u'plugin_softwareupdate_update')")
2021-04-23 12:03:56,007 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CONFIGURE (needs: u"Need(method='role', value=u'plugin_softwareupdate_configure')")
2021-04-23 12:03:56,178 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2021-04-23 12:03:56,827 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2021-04-23 12:03:57,431 - octoprint.util.pip - INFO - Version of pip is 19.3.1
2021-04-23 12:03:57,432 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2021-04-23 12:03:57,433 - octoprint.util.pip - INFO - ==> pip ok -> yes
2021-04-23 12:03:57,438 - octoprint.plugin.core - INFO - Initialized 24 plugin implementation(s)
2021-04-23 12:03:57,489 - octoprint.plugins.psucontrol_rpigpio - INFO - Running RPi.GPIO version 0.7.0
2021-04-23 12:03:57,490 - octoprint.plugins.psucontrol_rpigpio - INFO - Configuring switching GPIO for pin 3
2021-04-23 12:03:57,496 - octoprint.plugin.core - INFO - 24 plugin(s) registered with the system:
|  3D Geeks: OctoPrint Plugin (1.0.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_geeks3d
|  Access Anywhere - The Spaghetti Detective (1.6.5) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_thespaghettidetective
|  Action Command Notification Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_notification
|  Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys
|  Backup & Restore (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup
|  Change Filament Plugin (0.3.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_Change_Filament
|  Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
|  Error Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/errortracking
|  File Check (2021.2.23) (bundled) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_file_check
|  Firmware Check (2021.2.4) (bundled) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_firmware_check
|  GCode Viewer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/gcodeviewer
|  HeaterTimeout (0.0.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_HeaterTimeout
|  Logging (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging
|  Pi Support Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pi_support
|  Plugin Manager (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager
|  PSU Control (1.0.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol
|  PSU Control - RPi.GPIO (1.0.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol_rpigpio
|  Software Update (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate
|  TouchUI (0.3.17) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_touchui
|  Virtual Printer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/virtual_printer
Prefix legend: ! = disabled, # = blacklisted, * = incompatible
2021-04-23 12:03:57,528 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details:
|  hardware:
|      cores: 4
|      freq: 1500.0
|      ram: 1904005120
|  os:
|      bits: 32
|      id: linux
|      platform: linux2
|  plugins:
|      pi_support:
|          model: Raspberry Pi 4 Model B Rev 1.1
|          octopi_version: 0.17.0
|          throttle_state: '0x0'
|  python:
|      pip: 19.3.1
|      version: 2.7.16
|      virtualenv: /home/pi/oprint
2021-04-23 12:03:57,541 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2021-04-23 12:03:57,563 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2021-04-23 12:03:58,157 - octoprint.server - INFO - Shutting down intermediary server...
2021-04-23 12:03:58,345 - octoprint.server - INFO - Intermediary server shut down
2021-04-23 12:03:58,347 - octoprint.events - INFO - Processing startup event, this is our first event
2021-04-23 12:03:58,347 - octoprint.events - INFO - Adding 2 events to queue that were held back before startup event
2021-04-23 12:03:58,350 - octoprint.plugins.geeks3d - INFO - Event: Startup
2021-04-23 12:03:58,351 - octoprint.plugins.geeks3d - INFO - Payload: None 
2021-04-23 12:03:58,352 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2021-04-23 12:03:58,353 - octoprint.plugin - ERROR - Error while calling plugin geeks3d
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/__init__.py", line 271, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/__init__.py", line 1890, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_geeks3d/__init__.py", line 150, in on_event
    self.event_handler.handle_event( event, payload)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_geeks3d/Geeks3DEventHandler.py", line 83, in handle_event
    if self._plugin.settings.get_boolean(['push_server_startup']):
AttributeError: 'NoneType' object has no attribute 'get_boolean'
2021-04-23 12:03:58,355 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2021-04-23 12:03:58,368 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2021-04-23 12:03:58,382 - octoprint.plugins.geeks3d - INFO - Event: ConnectivityChanged
2021-04-23 12:03:58,384 - octoprint.plugins.geeks3d - INFO - Payload: {u'new': True, u'connection': True, u'old': False, u'resolution': True} 
2021-04-23 12:03:58,386 - octoprint.plugins.softwareupdate - INFO - Fetching check overlays from https://plugins.octoprint.org/update_check_overlay.json
2021-04-23 12:03:58,429 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2021-04-23 12:03:58,481 - octoprint.plugins.geeks3d - INFO - Event: plugin_pi_support_throttle_state
2021-04-23 12:03:58,483 - octoprint.plugins.geeks3d - INFO - Payload: {u'raw_value': 0, u'past_overheat': False, u'past_undervoltage': False, u'current_undervoltage': False, u'current_overheat': False, u'past_issue': False, u'current_issue': False} 
2021-04-23 12:03:58,502 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2021-04-23 12:03:59,226 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi._http._tcp.local.' for _http._tcp.local.
2021-04-23 12:03:59,393 - octoprint.plugins.tracking - INFO - Sent tracking event system_unthrottled, payload: {u'throttled_mask': 0, u'throttled_voltage_now': False, u'throttled_voltage_past': False, u'throttled_overheat_now': False, u'throttled_now': False, u'throttled_past': False, u'throttled_overheat_past': False}
2021-04-23 12:03:59,682 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2021-04-23 12:04:00,129 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi._octoprint._tcp.local.' for _octoprint._tcp.local.
2021-04-23 12:04:00,133 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on octopi for SSDP
2021-04-23 12:04:00,167 - octoprint.plugins.psucontrol - INFO - Registered plugin - psucontrol_rpigpio
2021-04-23 12:04:00,169 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2021-04-23 12:04:00,323 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2021-04-23 12:04:00,789 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.1.225
2021-04-23 12:04:00,994 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2021-04-23 12:04:01,030 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2021-04-23 12:04:01,044 - octoprint.util.pip - INFO - ==> pip ok -> yes
2021-04-23 12:04:01,180 - octoprint.plugins.softwareupdate - INFO - Minimum free storage across all update relevant locations is 3.6GB. That is considered sufficient for updating.
2021-04-23 12:04:01,611 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2021-04-23 12:04:01,640 - octoprint.plugins.HeaterTimeout - INFO - Starting up...
2021-04-23 12:04:01,690 - octoprint.plugins.geeks3d - INFO - Event: ClientOpened
2021-04-23 12:04:01,694 - octoprint.plugins.geeks3d - INFO - Payload: {u'remoteAddress': u'::ffff:192.168.1.225'} 
2021-04-23 12:04:01,838 - octoprint.server.util.flask - INFO - Passively logging in user admin from ::ffff:192.168.1.225
2021-04-23 12:04:01,865 - octoprint.access.users - INFO - Logged in user: admin
2021-04-23 12:04:01,873 - octoprint.plugins.geeks3d - INFO - Event: UserLoggedIn
2021-04-23 12:04:01,878 - octoprint.plugins.geeks3d - INFO - Payload: {u'username': 'admin'} 
2021-04-23 12:04:01,974 - octoprint.server.util.sockjs - INFO - User admin logged in on the socket from client ::ffff:192.168.1.225
2021-04-23 12:04:01,987 - octoprint.plugins.geeks3d - INFO - Event: ClientAuthed
2021-04-23 12:04:01,990 - octoprint.plugins.geeks3d - INFO - Payload: {u'username': 'admin', u'remoteAddress': u'::ffff:192.168.1.225'} 
2021-04-23 12:04:02,097 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'https://octopi.local/'}
2021-04-23 12:04:02,135 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 6}
2021-04-23 12:04:02,325 - octoprint.plugins.thespaghettidetective - INFO - Linked printer: {u'id': 42235, u'is_pro': False, u'name': u'Ender 3'}
2021-04-23 12:04:02,602 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {u'python': '2.7.16', u'os': u'linux', u'ram': 1904005120, u'octopi_version': u'0.17.0', u'version': u'1.5.3', u'pip': '19.3.1', u'cores': 4, u'freq': 1500.0, u'pi_model': u'Raspberry Pi 4 Model B Rev 1.1', u'bits': 32}
2021-04-23 12:04:03,071 - octoprint.plugins.tracking - INFO - Sent tracking event pong, payload: {u'python': '2.7.16', u'os': u'linux', u'ram': 1904005120, u'octopi_version': u'0.17.0', u'version': u'1.5.3', u'plugins': u'heatertimeout:0.0.3,psucontrol_rpigpio:1.0.2,touchui:0.3.17,psucontrol:1.0.4,thespaghettidetective:1.6.5,change_filament:0.3.1,geeks3d:1.0.0', u'pip': '19.3.1', u'cores': 4, u'freq': 1500.0, u'pi_model': u'Raspberry Pi 4 Model B Rev 1.1', u'bits': 32}
2021-04-23 12:04:03,706 - backoff - INFO - Backing off wait_for_janus(...) for 0.9s (error: [Errno 111] Connection refused)
2021-04-23 12:04:05,610 - octoprint.server.util.flask - INFO - Passively logging in user admin from ::ffff:192.168.1.225
2021-04-23 12:04:05,611 - octoprint.access.users - INFO - Logged in user: admin
2021-04-23 12:04:05,621 - octoprint.plugins.geeks3d - INFO - Event: UserLoggedIn
2021-04-23 12:04:05,622 - octoprint.plugins.geeks3d - INFO - Payload: {u'username': 'admin'} 
2021-04-23 12:04:11,762 - octoprint.plugins.geeks3d - INFO - Creating QR...
2021-04-23 12:04:15,091 - octoprint.server.preemptive_cache - INFO - ... done in 12.99s
2021-04-23 12:04:15,092 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://octopi.local/'}
2021-04-23 12:04:15,151 - octoprint.plugins.geeks3d - INFO - Event: ClientClosed
2021-04-23 12:04:15,149 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:192.168.1.225
2021-04-23 12:04:15,153 - octoprint.plugins.geeks3d - INFO - Payload: {u'remoteAddress': u'::ffff:192.168.1.225'} 
2021-04-23 12:04:15,507 - octoprint.server.preemptive_cache - INFO - ... done in 0.41s
2021-04-23 12:04:15,807 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.1.225
2021-04-23 12:04:15,845 - octoprint.plugins.geeks3d - INFO - Event: ClientOpened
2021-04-23 12:04:15,847 - octoprint.plugins.geeks3d - INFO - Payload: {u'remoteAddress': u'::ffff:192.168.1.225'} 
2021-04-23 12:04:15,927 - octoprint.server.util.flask - INFO - Passively logging in user admin from ::ffff:192.168.1.225
2021-04-23 12:04:15,928 - octoprint.access.users - INFO - Logged in user: admin
2021-04-23 12:04:15,937 - octoprint.plugins.geeks3d - INFO - Event: UserLoggedIn
2021-04-23 12:04:15,938 - octoprint.plugins.geeks3d - INFO - Payload: {u'username': 'admin'} 
2021-04-23 12:04:18,105 - octoprint.server.util.sockjs - INFO - User admin logged in on the socket from client ::ffff:192.168.1.225
2021-04-23 12:04:18,117 - octoprint.plugins.geeks3d - INFO - Event: ClientAuthed
2021-04-23 12:04:18,119 - octoprint.plugins.geeks3d - INFO - Payload: {u'username': 'admin', u'remoteAddress': u'::ffff:192.168.1.225'} 
2021-04-23 12:04:25,270 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2021-04-23 12:04:25,405 - octoprint.plugins.geeks3d - INFO - Event: plugin_psucontrol_psu_state_changed
2021-04-23 12:04:25,407 - octoprint.plugins.geeks3d - INFO - Payload: {'isPSUOn': True} 
2021-04-23 12:04:52,908 - octoprint.plugins.geeks3d - INFO - Event: Connecting
2021-04-23 12:04:52,909 - octoprint.plugins.geeks3d - INFO - Payload: None 
2021-04-23 12:04:52,985 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2021-04-23 12:04:53,004 - octoprint.plugins.geeks3d - INFO - Event: PrinterStateChanged
2021-04-23 12:04:53,005 - octoprint.plugins.geeks3d - INFO - Payload: {u'state_id': 'DETECT_SERIAL', u'state_string': u'Detecting serial connection'} 
2021-04-23 12:04:53,098 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 1 port/baudrate candidates: /dev/ttyUSB0@115200
2021-04-23 12:04:53,100 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 115200
2021-04-23 12:04:53,101 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 115200
2021-04-23 12:04:53,143 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-04-23 12:04:53,167 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-04-23 12:04:54,949 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Operational"
2021-04-23 12:04:54,963 - octoprint.plugins.geeks3d - INFO - Event: PrinterStateChanged
2021-04-23 12:04:54,966 - octoprint.plugins.geeks3d - INFO - Payload: {u'state_id': 'OPERATIONAL', u'state_string': u'Operational'} 
2021-04-23 12:04:55,003 - octoprint.plugins.geeks3d - INFO - Event: Connected
2021-04-23 12:04:55,005 - octoprint.plugins.geeks3d - INFO - Payload: {u'baudrate': 115200, u'port': u'AUTO'} 
2021-04-23 12:04:55,058 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-04-23 12:05:03,614 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin Creality 3D"
2021-04-23 12:05:03,624 - octoprint.plugins.geeks3d - INFO - Event: FirmwareData
2021-04-23 12:05:03,643 - octoprint.plugins.geeks3d - INFO - Payload: {u'data': {u'SOURCE_CODE_URL': u'[REMOVED URL FOR POSTING REASONS], u'EXTRUDER_COUNT': u'1', u'UUID': u'cede2a2f-41a2-4748-9b12-c55c62f367ff', u'FIRMWARE_NAME': u'Marlin Creality 3D', u'MACHINE_TYPE': u'Ender-3', u'PROTOCOL_VERSION': u'1.0'}, u'name': u'Marlin Creality 3D'} 
2021-04-23 12:05:03,661 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2021-04-23 12:05:04,071 - octoprint.plugins.tracking - INFO - Sent tracking event printer_connected, payload: {u'printer_baudrate': 115200, u'printer_port': u'AUTO', u'firmware_name': u'Marlin Creality 3D'}

But I've not seen this behavior before. I've never had the printer stop printing as I connect. I've been running Octoprint for at least 4 or 5 months now.

Ender 3 with what board? The 8-bit AVR boards definitely do this, but I don't think the 32 bit ones do.

But it's true. Most printer do that. My old Velleman K820 didn't, but Prusa does, Formbot/Vivedino does.

Surely it's only when printing from SD directly on the printer though right?

It's always when you connect OctoPrint to the printer.
And it can be disaster during a SD card print.

How the heck does that work. If it resets on connect then how does connect ever succeed? Maybe I'm missing something.

So: When the USB chip on the printer board is about to establish a connection to a host, it generates a hardware reset.

Like here with the Rambo board (Rambo - RepRap):

During the connection attempt, pin 13/DTR goes low so through the capacitor C10, a RESET pulse for the board is generated.

3 Likes

Well that answers it. Thanks :slight_smile:

1 Like

The reason for the reset is that the microcontroller goes through the bootloader part of the firmware, and there's a small window where you can instruct the bootloader to go into a mode where you can update the rest of the firmware, instead of running the current firmware. You see, the bootloader is just a bit of code prepended to the actual firmware that is run once after a reset.