Introduction to the File Transfer Service

Overview

To enable file transfers from your Cloud to the Remote Asset through Octave’s service, you must configure Octave’s file service and integrate it with the Remote Asset through following steps:

  1. Integrate the Remote Asset with the ORP service (transfer over UART). This will allow it to:

    1. create Resources and exchange data with them to interact with the file service. This step is optional but recommended to manage acknowledgements.
    2. notify the file service that the asset is ready for transfers. This is required as not all Remote Assets will support the file transfer protocol.
    3. start the file transfer with the Octave Edge device from the file pending notification to file transfer completion.
    4. acknowledge the file transfer data packet sent by the Octave Edge and the file hash
  2. Retrieve the file via SCP (Ethernet):

    1. files are located at this location on the device /data/le_fs/fileStream/files
    2. they can be retrieved via SCP on Ethernet enabled devices
  3. Update the Resource on the Octave edge device to acknowledge file transfer completion by the remote asset and its usage.

Resources for File Transfer

File transfer Resources are under the /files/ category and are available by default on all FX30 and FX30S with Firmware version 3.3 and above.

The following screenshot shows these Resources on the Resource screen in the Octave UI (Build > Device > Resources):

697

There are four Resources to allow for control and monitoring of file service processes:

ResourceTypeDescription
/autostart [True]/falseControl
(Output)
Provides the capability to configure when file-sending starts between Octave Cloud and Octave Edge:

- as soon as the Octave Edge device is connected after your sending request (autostart=True, default).
- when you Remote Accept the file-sending request.
/download/valueNotification
(Input)
Provides the status information about the file-sending progress between Octave Cloud and Octave Edge.
{ "name": <file name>, "autostart": <autostart>, "state": <state>, "remaining": <remaining_size>, "progress": <percentage> }

where:

<file name>: string, up to 128 characters
<autostart>: boolean, indicates if autostart (see /autostart above) is set to true or false
<state>: string, download state:

- waiting: autostart is set to false and the asset needs to accept the file-sending. This is also returned if the file-sending is suspended.
- transferring: file sending is on-going.
- success: file sending succeeds.
- failure: file sending failure.
- deleted: file was deleted (the file was previously fully downloaded).
- aborted: file sending was aborted (the file was not previously fully downloaded).

<remaining_size>: integer, remaining size to be downloaded in bytes.
<percentage>: integer, file sending percentage (0 to 100).
/list/valueNotification
(Input)
Provides the available files in the Octave Edge device’s local flash memory when the Resource is read.
{ "path": <path>, "files":[ { "name": "file name 1", "hash": "hash 1", "size": 12345, "origin": 0 }, { "name": "file name 2", "hash": "hash 2", "size": 987654, "origin": 0 } ] }
- origin: 0 for server origin (file download)
/app/files/controlControl
(Output)
Provides the capability to control the file-sending operation between Octave Cloud and Octave Edge, and including the ability to delete the file from Octave Edge:
{ "name": <file name>, "transfer": <transfer>, }
<transfer>: string, sending state:
- start: file-sending to be started.
- pause: file-sending to be paused.
- abort: file-sending to be aborted.
- delete: delete the file from the Octave Edge device

The following diagram shows the workflow and states of the file-sending operation from Octave Cloud to Octave Edge reported in the /download/value Resource:

919

📘

Note:

  • In case the file to be sent has the same name and hash as a file already stored on the target Octave Edge device, the file is not sent, and the file-sending operation is set to completed. In this case the remote asset is not notified about the request.
  • During a file-sending operation, from the file request in the cloud to file-sending completion by the Octave Edge, it is not possible to send commands to the device. Therefore, it is important to consider the appropriate schedule with regard to your solution service availability to avoid transfer disruptions.
  • For example, consider that in your solution your remote asset needs to receive commands from your cloud during specific hours in the day. This will not be possible during a file transmission during which the Octave device cannot receive a command.

You can retrieve a number of Events handled through the file service Resources as part of file-sending process. See File Sending Reference for more information.