Jump to content

xsimplex

Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by xsimplex

  1. Hey,

     

    I have a weird issue I'm kind of stumped on. I have a Docker container slicing customisable print jobs with CuraEngine which it then sends to the printer via the printer API.

    This setup has worked so far, but today I restarted the Docker container and now get a 405: Client Error METHOD NOT ALLOWED error when trying to send the printjob to the printer with

    requests.post(http://192.168.1.x/api/v1/print_job', files={'jobname': jobname, 'file': gcode_file}, auth=requests.auth.HTTPDigestAuth(ILAUMS5_USER, ILAUMS5_PASS))

    Usually a 405 error indicates that the method used is not allowed for the endpoint I'm trying to reach, but the /print_job endpoint can be reached both over GET and POST, so this should not be the issue.

    I have also verified that the credentials are valid, the file exists and the jobname is valid.

    Does anyone have an idea what I am missing? Any help is very much appreciated.

  2. On 2/19/2021 at 11:35 PM, Smithy said:

     

    Use a get request for auth/verify, not a post request.

     

    requests.gett('http://192.168.1.91/api/v1/auth/verify', auth=requests.auth.HTTPDigestAuth(usr, pwd))

    Oh yes, that is of course it. Thanks for pointing that stupid mistake out to me!

     

    On 2/19/2021 at 11:20 PM, gr5 said:

    Did you know you can ssh into your printer with user/pass root/ultimaker?  You have to put the printer into "developer" mode first.  When in developer mode it also shows the ip address on the main display which is helpful.  Then you are in linux and can use utilities like "dmesg" to search for possible errors.  It's "debian jessie".  Or it was - I think maybe firmware version 6.X is a newer version of debian.

    This is also a very helpful tip, though, being able to look directly into the printers kernel ring buffer can come in quite handy I bet.

    Big thank you to both of you!

  3. Hey,

     

    I have a question regarding the Ultimaker API on my S5:  For a couple of days now, I have been unable to use new credentials for my printer.

    I'm using Python with the requests library to do this.

    Obtaining new credentials with

    requests.post('http://192.168.1.x/api/v1/auth/request', data={'application': 'program', 'user': 'Docker'})

    works fine and returns a new id, key pair which I then confirm by hand on the printer. Querying /check/id also works and returns "authorized".

    But if I try to verify the id,key pair with

    requests.post('http://192.168.1.x/api/v1/auth/verify', auth=requests.auth.HTTPDigestAuth(usr, pwd))

    where I have saved the id and key into usr and pwd respectively, it returns

    405: Method not allowed

    Unfortunately the API documentation does not mention this error code at all, so I am confused as to why this is happening.

    Any help with this would be greatly appreciated!

×
×
  • Create New...