@T3P3Tony Thank you for your help.
What I have tried so far:
- Update RRF to 3.6beta4
- Test CURL commands:
F:\temp>curl http://192.168.2.1/rr_connect?password=
{"err":0,"sessionTimeout":8000,"boardType":"duet3mb6hc102","apiLevel":2,"sessionKey":0}
F:\temp>curl --data-binary @"test.g" "http://192.168.2.1/rr_upload?name=/gcodes/test.g"
{"err":0}
F:\temp>
No success with Python so far.
What I dont understand is that the Python function generated from OpenAPI has only one parameter "name". The parameters "time" and "crc32" are optional. But at least two variables are required: source(path_and_filename.gcode) and destination(name) like in CURL.
rr_upload_post
Example
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
name = 'name_example' # str | Path to the file to upload
time = '2013-10-20T19:20:30+01:00' # datetime | ISO8601-like represenation of the time the file was last modified (optional)
crc32 = 'crc32_example' # str | CRC32 checksum of the file content as hex string *without* leading `0x`. Usage of this parameter is encouraged (optional)
try:
# Upload a file
api_response = api_instance.rr_upload_post(name, time=time, crc32=crc32)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->rr_upload_post: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
name | str | Path to the file to upload | |
time | datetime | ISO8601-like represenation of the time the file was last modified | [optional] |
crc32 | str | CRC32 checksum of the file content as hex string without leading `0x`. Usage of this parameter is encouraged | [optional] |