Error: Can't connect to Prusa Connect.
Hello,
I have followed the steps at: https://help.prusa3d.com/guide/prusalink-and-prusa-connect-setup-for-mk3-s-_221744 to install PrusaLink.
And I have the following error at the step 4:
I I can SSH into the device and I can reach the host though...
pi@prusa:~ $ nc -v -z connect.prusa3d.com 443
Connection to connect.prusa3d.com (172.104.231.244) 443 port [tcp/https] succeeded!
I have the latest firmware: prusa3d_fw_3_11_0_MK3S
Printer: Original Prusa i3 MK3S+
Raspberry Pi Zero W running PrusaLink downloaded from the link at the official page here: https://help.prusa3d.com/guide/prusalink-and-prusa-connect-setup-for-mk3-s-_221744
I have tried to look for the prusa-link version but prusa-link -h does not show it, neither the website... So if that can help you:
pi@prusa:/etc $ uname -a
Linux prusa 5.10.63+ #1459 Wed Oct 6 16:40:27 BST 2021 armv6l GNU/Linux
RE: Error: Can't connect to Prusa Connect.
Tried with prusa-link-0.6.1 from this post: https://forum.prusa3d.com/forum/postid/595198/
Same error.
It isn't clear to me which image is the latest: prusa-link-0.6.1.img.gz or prusalink.img.gz ?
RE:
Debug logs attached in the associated Github issue: https://github.com/prusa3d/Prusa-Link-Web/issues/198
pi@prusa:~ $ prusa-link -f -d start
RE:
Hi, sorry about the version being hard tso get at from the command line. Fixed that for 0.7.0
The official image does not contain the version number, so we can upload a new one without changing the link - yes, that's not smart, no, can't change it.
I can't reproduce it. Have asked whether connect was down last weekend but as the logs have their time not synced - are from March, we're not certain of that either.
Can you show, what kind of prusa_link_settings.ini (edit: prusa_printer_settings.ini) have you ended up with, it might be the request fails because of broken escaping in this version
Thank you
RE: Error: Can't connect to Prusa Connect.
Can you show, what kind of prusa_link_settings.ini have you ended up with, it might be the request fails because of broken escaping in this version
I have searched for some ini file but I wasn't able to find anything, perhaps because the setup steps were not completed ?
Where this file should be located ?
Also, Prusa connect was not down. I was able to go there and also reach the dns.
Thanks!
RE: Error: Can't connect to Prusa Connect.
Sorry - prusa_printer_settings.ini - it should be on the pi in /home/pi/prusa_printer_settings.ini
RE:
I can confirme the file is not there (I guess it should be in the home directory ?)
pi@prusa:~ $ ls -al total 52 drwxr-xr-x 8 pi pi 4096 Jun 27 15:59 . drwxr-xr-x 3 root root 4096 Oct 30 2021 .. -rw------- 1 pi pi 1584 Mar 16 14:32 .bash_history -rw-r--r-- 1 pi pi 220 Oct 30 2021 .bash_logout -rw-r--r-- 1 pi pi 3523 Oct 30 2021 .bashrc drwxr-xr-x 3 pi pi 4096 Nov 9 2021 .cache drwx------ 5 pi pi 4096 Nov 9 2021 .local -rw-r--r-- 1 pi pi 807 Oct 30 2021 .profile drwx------ 2 pi pi 4096 Mar 16 14:08 .ssh drwxr-xr-x 3 pi pi 4096 Nov 9 2021 'Prusa Link gcodes' drwxr-xr-x 5 pi pi 4096 Dec 17 2021 Prusa-Connect-SDK-Printer drwxr-xr-x 7 pi pi 4096 Mar 16 14:27 Prusa-Link -rw-r--r-- 1 pi pi 0 Mar 16 14:29 debug.log -rw-r--r-- 1 pi pi 4 Jun 27 15:59 prusa-link.pid pi@prusa:~ $ find . | grep prusa_link_settings.ini pi@prusa:~ $
And no Prusa folder in /etc
pi@prusa:~ $ ls -al /etc/ | grep -i prusa pi@prusa:~ $
RE: Error: Can't connect to Prusa Connect.
The file not being there, do you know if it is possible to manually craft one to "force" the printer registration ?
RE: Error: Can't connect to Prusa Connect.
Okay well, guess we don't write it before considering the wizard done. :/ Sorry. Except for like turning off the tls and wiresharking it, I have no more ideas on how to get info on what's happening there.
Manually crafting one would get you a step of the way there, but to have Connect working, you'd have to jump through unreasonable hoops in this version
Internally we use emoji in the printer names, so we hope it's not a problem with encoding and stuff like that.
The file should look kinda like this
[printer] name = Printer name location = Location type = MK3S [network] hostname = hostname [service::local] enable = 1 username = digest = api_key = [service::connect] hostname = connect.prusa3d.com tls = 1 port = token =
RE: Error: Can't connect to Prusa Connect.
thanks! I will try.
For the digest: is it the base 64 encoded value for username:password that will be used in a Base64 http Basic Authorization ?
Just to make it clear, the username / password is local for the printer right ? This is not the username/password of our Prusa account ?
RE: Error: Can't connect to Prusa Connect.
Just saw that from the source code it seems to be the HTTP Digest, so in that case, which realm value is used ?
RE: Error: Can't connect to Prusa Connect.
Oh !!!
I have just retried today, and it works!! Without having to craft any config file.
So yes, maybe a downtime of several hours last week-end...
So now I have both OctoPrint and PrusaLink setup lol. I can switch between the 2 easily.
Thanks!
RE: Error: Can't connect to Prusa Connect.
You're too fast,even for the forum notiff system 😀 Awesome, glad it works, i feel bad you had to look where the digest is being generated. I could have generated a digest for a specific password and tell you that, but that felt bad, so i just didn't. Thanks for the patience
RE: Error: Can't connect to Prusa Connect.
No worry 😉
It gave me time to install also Octoprint, so I now have both connected and switch from one to the other thanks to the Rpi Port 🙂
But I have a strong preference in having an integrated solution with PrusaLink on RPI Zero that it is powered by the printer, even if some cool features of Octoprint are missing.
BTW, in terms of performance, so far I have used my RPI Zero because my RPI zero W 2 is used elsewhere, but if you had the choice, would you advise to install on the RPI Zero W v2 instead of the v1 ? I am wondering if the perf improvements from v1 to v2 are really seen through the web interface ?
Thanks!
RE: Error: Can't connect to Prusa Connect.
Okay, third time i'm writing this, the forum keeps screwing me over
Hi, yes I'd recommend the Rpi Zero 2. When you have the web interface open, the gcode sender performance takes a hit, this could result in the printer running out of gcodes to do, especially in long fine curves or circles. Also there's a bug - a race condition of pi against the printer that the printer is more likely to win, when the pi chugs. If you'd like to fix it, find a function wait_for_queue and in it a while loop.
Change it from
while True:
to
while self.data.enqueued:
then pip install the folder Prusa-Link (no sudo)
RE: Error: Can't connect to Prusa Connect.
Thanks a lot!
RE:
For anyone going over this thread, here are the detailed steps:
First:
ssh [email protected]
Then:
pi@prusalink:~ $ grep -R "def wait_for_queue" . ./.local/lib/python3.9/site-packages/prusa/link/printer_adapter/file_printer.py: def wait_for_queue(self): ./Prusa-Link/prusa/link/printer_adapter/file_printer.py: def wait_for_queue(self):
I have edited:
- line 213 of ./.local/lib/python3.9/site-packages/prusa/link/printer_adapter/file_printer.p
- line 213 of ./Prusa-Link/prusa/link/printer_adapter/file_printer.py
Then did:
pi@prusalink:~ $ pip install Prusa-Link pi@prusalink:~ $ sudo reboot
I am not sure I need to run the pip install If I edit the one in .local folder directly but I did. Rebooted and checked that the UI works.
Also switched the SD card to my RPI Zero W 2. Sad there is none in stock at the moment over the world lol.
Thanks a lot for your kind help Tojik 😀
RE: Error: Can't connect to Prusa Connect.
Hi, no, no need to run pip then, I just assumed you'd edit the one in home, to be fair I've gone over it in more detail in another thread and on discord, I just figured you're a pro so I ommited the details, thanks for adding them and for being so chill.
This probably warrants 0.6.2 but I guess that will not happen