Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octoprint not working Original Prusa i3 MK3 via GPIO #2293

Closed
KissmanCZ opened this issue Dec 15, 2017 · 28 comments
Closed

Octoprint not working Original Prusa i3 MK3 via GPIO #2293

KissmanCZ opened this issue Dec 15, 2017 · 28 comments
Labels
not octoprint Issue is not on OctoPrint's end

Comments

@KissmanCZ
Copy link

KissmanCZ commented Dec 15, 2017

What did you expect to happen?

Working Octoprint on Rpi Zero via GPIO with EINSY Rambo in Prusa MK3

What happened instead?

Nothing, is not possible to connect MK3 to Octoprint via GPIO

Did the same happen when running OctoPrint in safe mode?

Yes

Version of OctoPrint

1.3.6

Operating System running OctoPrint

OctoPi 0.14.0

Printer model & used firmware incl. version

Original Prusa MK3, fw. 3.1.1 RC1 b122

Link to octoprint.log

https://pastebin.com/uKhXcJLJ

Link to contents of terminal tab or serial.log

https://pastebin.com/MvKm0gQL

@GitIssueBot
Copy link

Hi @KissmanCZ,

It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Read the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!).

If you did not intend to report a bug but wanted to request a feature or brain storm about some kind of development, please take special note of the title format to use as described in the Contribution Guidelines.

Please do not abuse the bug tracker as a support forum - if you have a question or otherwise need some kind of help or support refer to the Mailinglist or the G+ Community instead of here.

Also make sure you are at the right place - this is the bug tracker of the official version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third party OctoPrint plugins or unofficial versions. Make sure too that you have read through the Frequently Asked Questions and searched the existing tickets for your problem - try multiple search terms please.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2017-12-29 23:10 UTC) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you!

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.

@GitIssueBot GitIssueBot added the incomplete Issue template has not been fully filled out, no further processing until fixed label Dec 15, 2017
@foosel
Copy link
Member

foosel commented Dec 16, 2017

It works flawlessly over USB (I just tried), so that's not a general compatibility issue. It doesn't look like there's a printer on the other end of your /dev/ttyAMA0 there, which unless you took further steps than just hooking up your Pi to the board wouldn't surprise me: by default, that's the Raspberry Pi's own console (RPi1, 2, 0) or the bluetooth serial (3, 0W, here GPIO serial is /dev/ttyS0), NOT anything you've connected to its GPIO ports. That's nothing OctoPi or OctoPrint specific but rather a general Raspbian behaviour.

Make sure you've enabled GPIO serial and are trying to connect to the correct port. Then please report back.

@foosel foosel added needs information More information is needed to further process this issue or PR and removed incomplete Issue template has not been fully filled out, no further processing until fixed labels Dec 16, 2017
@KissmanCZ
Copy link
Author

KissmanCZ commented Dec 16, 2017

I disabled bluetooth from ttyAMA0 and console login from UART first of course :) tested with diferent speeds and still not working (UART is enabled and getty service stopped and disabled):

Connecting to: /dev/ttyAMA0Changing monitoring state from 'Offline' to 'Opening serial port'Connected to: Serial<id=0xac95c730, open=True>(port='/dev/ttyAMA0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitorStarting baud rate detectionChanging monitoring state from 'Opening serial port' to 'Detecting baudrate'Trying baudrate: 250000Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Trying baudrate: 125200Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Trying baudrate: 115200Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Trying baudrate: 230400Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Trying baudrate: 57600Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Trying baudrate: 38400Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Trying baudrate: 19200Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Trying baudrate: 9600Send: N0 M110 N0*125Baudrate test retry: 4Send: N0 M110 N0*125Baudrate test retry: 3Send: N0 M110 N0*125Baudrate test retry: 2Send: N0 M110 N0*125Baudrate test retry: 1Send: N0 M110 N0*125Baudrate test retry: 0Send: N0 M110 N0*125Changing monitoring state from 'Detecting baudrate' to 'Offline'Changing monitoring state from 'Offline' to 'Error: No more baudrates to test, and no suitable baudrate found.'Connection closed, closing down monitor

@KissmanCZ
Copy link
Author

Tested to open serial on Rpi with sudo screen /dev/ttyAMA0, so I know, my port is right and not busy with another service or app.

OctoPrint reports this when I open port on Rpi screen - port busy :)

Connecting to: /dev/ttyAMA0Changing monitoring state from 'Offline' to 'Error: Connection error, see Terminal tab'Unexpected error while connecting to serial port: /dev/ttyAMA0 OSError: '[Errno 16] Device or resource busy: '/dev/ttyAMA0'' @ comm.py:_openSerial:1931 (hook default)

And when I close screen /dev/ttyAMA0, i get

Connecting to: /dev/ttyAMA0Changing monitoring state from 'Offline' to 'Opening serial port'Connected to: Serial<id=0xac95c730, open=True>(port='/dev/ttyAMA0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False)

and again, no M110 respond :(

@buzztiaan
Copy link

buzztiaan commented Dec 16, 2017 via email

@KissmanCZ
Copy link
Author

KissmanCZ commented Dec 16, 2017

Yup... added "Pi" user under which service OctoPrint running to group "dialout"

pi@octopi:~ $ ls -l /dev/ttyAMA0 crw-rw---- 1 root dialout 204, 64 Dec 16 19:23 /dev/ttyAMA0

@buzztiaan
Copy link

buzztiaan commented Dec 16, 2017 via email

@KissmanCZ
Copy link
Author

Of course :) rebooted

@KissmanCZ
Copy link
Author

Maybe this is related? prusa3d/Prusa-Firmware#297

@foosel
Copy link
Member

foosel commented Dec 16, 2017

Well, I can certainly tell you that I also don't get any reply or even output at all using minicom, so whatever it is, it's not the fault of OctoPrint. My money would be on the firmware not being ready yet.

Comparison... minicom via USB, printer resets and firmware says hello:

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on May  7 2017, 05:18:49.
Port /dev/ttyACM0, 21:01:11

Press CTRL-A Z for help on special keys

start
     echo:echo: Last Updated: Nov 29 2017 02:01:00 | Author: (none, default config)
                                                                                   Compiled: Nov 29 2017
                                                                                                        echo: Free Memory: 1522  PlannerBufferBytes: 1392
                                                                                                                                                         echo:Hardcoded Default Settings Loaded
                                                                                                                                                                                               crashdet_enable
CrashDetect ENABLED!
PAT9125_init:1
              FSensor
                      ENABLED

                             fsensor_enable

                                           PAT9125_init:1
                                                         tmc2130_init mode=0
initial zsteps on power up: 1016
initial zsteps after reset: 1016
echo:SD card ok

minicom via /dev/ttyAMA0 after disabling bluetooth and getty, nothing at all happens:

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on May  7 2017, 05:18:49.
Port /dev/ttyAMA0, 20:59:08

Press CTRL-A Z for help on special keys

@foosel foosel added not octoprint Issue is not on OctoPrint's end and removed needs information More information is needed to further process this issue or PR labels Dec 16, 2017
@buzztiaan
Copy link

buzztiaan commented Dec 16, 2017 via email

@foosel
Copy link
Member

foosel commented Dec 16, 2017

Heh, good idea, but nope, that's not it either.

@KissmanCZ
Copy link
Author

So, we must wait for Prusa EINSY firmware fix as I understand?

@foosel
Copy link
Member

foosel commented Dec 16, 2017

Based on my own observations so far: yes. If it wasn't late and I wasn't also fighting off the start of another cold I'd give it a try to simply compile a new firmware including the PR you linked and see where that gets us. But maybe someone else wants to try that ;)

In any case - closing because this doesn't look too be an OctoPrint problem at all but rather a MK3 problem. Happy to reopen should new information come in that proofs the contrary. Comments are still open though.

@foosel foosel closed this as completed Dec 16, 2017
@KissmanCZ
Copy link
Author

Ok... fast chat with Prusa support :(

`Já22:49
Hello, when will be firmware for MK3 with working UART feature availaible (Rpi Zero mounted to EINSY)?

Shane22:51
they are currently working on writing the firmware to support the pi0 board,

Shane22:51
I dont have an ETA yet`

@KissmanCZ
Copy link
Author

Thanks for your time Gina! ;)

@foosel
Copy link
Member

foosel commented Dec 16, 2017

Ah, that at least confirms it then 👍

@KissmanCZ
Copy link
Author

There is a mention on Prusa forum before few minutes...

Yes, I'd come to the same conclusion, so I tried building the current code from GitHub. It worked, and the internal Pi Zero W is now working as it should. However, I 100% agree with you that this is not necessarily the smartest/safest thing to do as lots of things are changing right now. I'll likely revert to the current release.

@KissmanCZ
Copy link
Author

New firmware is up ;) 3_1_1_rc2_b137 going to test.

@Pretender1988smg
Copy link

Did you get it work? and when how?

@markim
Copy link

markim commented Mar 5, 2018

Just want to put this here in case anyone else runs into problems: there are additional settings that must be made to the octoprint software before it will work with the MK3 and the Raspberry Pi Zero W https://help.prusa3d.com/l/en/article/Loz15FAgEk-octo-print-raspberry-pi-zero-w

In theory, running sudo apt-get update and sudo apt-get upgrade (maybe even apt update and apt upgrade, or apt dist-upgrade) should upgrade all the binaries on the Pi and possible speed some things up for you too.

@foosel
Copy link
Member

foosel commented Mar 5, 2018

As a side note, contrary to Prusa, I do not recommend the RPi0W. It's WIFI interface has some serious issues and utilizing it causes severe CPU load. And it's overall rather slow.

@markim
Copy link

markim commented Mar 5, 2018

Just to clarify: Is this solely because of the video streaming? I'm not having a bad time using mine to print so far. See top here: https://i.imgur.com/jZtyc1o.png I'm going to try using the camera module in a couple days. I don't plan on utilizing streaming, though, I just want timelapses. I feel like the RPiZW should have enough power to at least run serve the http and take a picture every every few minutes or so. Is the streaming only "turned on" when a user tries to connect to it, or can disable it? By the way, thank you for all your hard development work!

@foosel
Copy link
Member

foosel commented Mar 5, 2018

Video streaming, or any kind of network utilization really. I got reproductions without running OctoPrint or a webcam at all by just copying a file from or to a location on my local network via the Pi0W. I'd also strongly advise against uploading (or downloading, e.g. by switching to the GCODE viewer) large files while printing. Anything that produces traffic on the network interface causes load and can cause stuttering. Same load issue on the Pi3, but with its four course it simply doesn't have a noticeable impact on print performance.

For some shots of top that show this, see my comments here.

Just leaving the stream URL unconfigured and only limiting yourself to snapshots could work. Or using the SnapStream plugin (a good interval would need to be tested). But sorry, I really can't recommend it.

@joysfera
Copy link

I'm tempted to attach an Ethernet NIC to RPi0 (via SPI) and give it a try. If the CPU utilization wasn't that scary it could be a good compromise for Octoprint.

@n1cho1as
Copy link

As a side note, contrary to Prusa, I do not recommend the RPi0W. It's WIFI interface has some serious issues and utilizing it causes severe CPU load. And it's overall rather slow.

I bought a PI Zero W without making sure it would work 100%. My bad for trusting Prusa. I want to use this card so that I can perform bed leveling using one of the add-ins. If I disable the WiFi component, will this card be able to perform this basic function? Would I just add a USB WiFi or ethernet dongle to this device?

@arhi
Copy link

arhi commented Jan 31, 2020

card be able to perform this basic function

Should be. It's not a board you wanna use to print from but octoprint without any serious plugins (the bed level visualiser etc will not be a problem) it will work... so you setup the rpi0w with octoprint, just make sure you do not print from the octoprint but you print from the printer's sd card, so even if rpi0w cpu crap out it's not affecting the printer... this will make bunch of plugins unusable (you cannot do octolapse for e.g.) but it will still allow you to monitor the printer and use few interesting plugins... just don't print from it as it will ruin your prints

@n1cho1as
Copy link

n1cho1as commented Jan 31, 2020

card be able to perform this basic function

Should be. It's not a board you wanna use to print from but octoprint without any serious plugins (the bed level visualiser etc will not be a problem) it will work...

Thanks for the advice regarding printing, I never planned on using it as a print server. Good to know.
I have since installed octoprint using the latest build and ran into a connectivity issue with OctoPrint and the printer. Discovered that when using the USB connection I do not want to enable RPI as in the Prusa gude. Once I disabled it I was able to run it and as you said I can run the Prusa Leveling Guide. Thanks! :-)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
not octoprint Issue is not on OctoPrint's end
Projects
None yet
Development

No branches or pull requests

9 participants