I am getting the following error when trying to run a simple program to transfer a file between a Raspberry Pi running the C SDK version 2.0.2, and a thingworx server.
twFileManager_TransferFile: Error invoking Copy service on FileTransferSubsystem
Does anyone know what this error means or how I can solve it?
Are there any more errors in any of the logs?
Is it connecting to the platform, do you see anything about this in the platform/application log? Have you looked into the example provided with the CSDK package?
Unfortunately with the new SDK there is no example which includes file transfer. I am able to successfully connect to the platform. I have included the full output from the program when run, as you can see it is able to connect the websocket, initialize the api and build the virtual filesystem.
[FORCE] 2017-11-02 17:10:14,714: Starting up...
[WARN ] 2017-11-02 17:10:14,714: SDK Version: 2.0.2
[WARN ] 2017-11-02 17:10:14,714: TLS Library: OpenSSL
[WARN ] 2017-11-02 17:10:14,715: TLS Library Version: 1.0.2l
[DEBUG] 2017-11-02 17:10:14,715: twWs_Create: Initializing Websocket Client for 126.96.36.199:80//Thingworx/WS
[DEBUG] 2017-11-02 17:10:14,715: twTlsClient_Create: Initializing TLS Client
[DEBUG] 2017-11-02 17:10:14,730: twApi_Initialize: Websocket Established after 0 tries
[DEBUG] 2017-11-02 17:10:14,730: subscribedPropsMgr_Initialize: Initializing subscribed properties manager
[DEBUG] 2017-11-02 17:10:14,731: API initialized
[DEBUG] 2017-11-02 17:10:14,731: added FileTransferExample to boundList
[DEBUG] 2017-11-02 17:10:14,731: twApi_BindThings: not currently connected, only binding things to api
[DEBUG] 2017-11-02 17:10:14,731: twMessage_Delete: Deleting BIND Message: 1
[DEBUG] 2017-11-02 17:10:14,731: Thing bound
[DEBUG] 2017-11-02 17:10:14,731: Virtual filesystem built
[DEBUG] 2017-11-02 17:10:14,732: twTlsClient_Reconnect: Re-establishing SSL context
[DEBUG] 2017-11-02 17:10:14,732: twTlsClient_Connect: Connecting to server
[DEBUG] 2017-11-02 17:10:15,801: ws_on_headers_complete: Websocket connected!
[INFO ] 2017-11-02 17:10:15,801: twWs_Connect: Websocket connected!
[DEBUG] 2017-11-02 17:10:15,802: twWs_SendMessage: Sent 60 bytes using 1 frames.
[DEBUG] 2017-11-02 17:10:15,896: twMessage_Delete: Deleting RESPONSE Message: 2
[DEBUG] 2017-11-02 17:10:15,896: twMessage_Delete: Deleting AUTH Message: 2
[DEBUG] 2017-11-02 17:10:15,896: twWs_SendMessage: Sent 38 bytes using 1 frames.
[DEBUG] 2017-11-02 17:10:16,43: twMessage_Delete: Deleting RESPONSE Message: 3
[DEBUG] 2017-11-02 17:10:16,43: twMessage_Delete: Deleting BIND Message: 3
[DEBUG] 2017-11-02 17:10:16,43: Connected to server
[DEBUG] 2017-11-02 17:10:16,43: Taking photo....
[DEBUG] 2017-11-02 17:10:17,118: Sending photo...
[DEBUG] 2017-11-02 17:10:17,118: getRealPath: Real path for FileTransferExample:out/outgoing.jpg = /transfer/outgoing/outgoing.jpg
[DEBUG] 2017-11-02 17:10:17,118: twWs_SendMessage: Sent 256 bytes using 1 frames.
[WARN ] 2017-11-02 17:10:47,152: api:sendMessageBlocking: Message 4 timed out
[INFO ] 2017-11-02 17:10:47,152: twMessageHandler_CleanupOldMessages: Message 4 timed out
[DEBUG] 2017-11-02 17:10:47,152: twMessage_Delete: Deleting REQUEST Message: 4
[ERROR] 2017-11-02 17:10:47,152: twFileManager_TransferFile: Error invoking Copy service on FileTransferSubsystem
[DEBUG] 2017-11-02 17:10:47,152: Photo Sent.
I've responded to your previous thread, there is an example suuplied with the new SDK. I'll copy here:
As of 2.0 there was a slight change in how the examples are provided. So, now there is a README_BUILDING.txt and CMakeLists.txt files , that along with the documentation, you may refer to to build your sample projects.The project SteamSensor will include all of the features enabled by default (again you may refer to the documentation to disable the ones you don't need)
In the new SDK under the SteamSensor example there is no mention of file transfer, or any example given of how to use it. The README_BUILDING.txt is just about how to run the example programs, which we already knew how to do in order to get this program running with the CSDK. We were not having any of these issues running on the old version 1.3 SDK, but we cannot find any examples or documentation about how to specifically use file transfer capabilities with the new version 2.0.2 SDK.
Thank you for your help!
Could you please point me to the exact spot in the SteamSensor example which shows how file transfer works with the new SDK? Or any specific line which could help us build a file transfer program. I still do not see anything related to file transfers in any of the examples.
The new SDK comes with the documentation within the downloadable
Page 111 and 112 talk about building the example using the CMakelist with all of the options enabled by default:
Thank you for pointing that out. I attempted to run cmake with the flags in order to build the applications, but when I added that I got the same errors as before. I also noticed on the server side in the logs on the mashup I see this error:
ERROR - Error in invoking service Things_repositoryThing, LoadText, Things, repositoryThing, Services, LoadText. Error from the server: "File Does Not Exist"
Hi Connor, I apologize I didn't notice this reply. Would it be possible to open a support ticket for this so we could dedicate a resource to investigate or would you like us to open one on your behalf?