User Tools

Site Tools


wiki:interfaces:loftp

Local FTP

Introduction

A sFTP server is installed on the gateway. It can be used to:

  • Manage end-devices fleet
  • Manage gateway fleet
  • Receive frames from end-devices
  • Send frames to end-devices
  • Configure the gateway
  • Update and add license
  • Debug / troubleshoot the gateway

Its configuration is available in Configuration ⇒ Interfaces ⇒ Local FTP menu.

Local FTP

FTP Connection

  1. Enable local FTP as explained above
  2. On a computer, launch a FTP client such as FileZilla to connect to the server
  3. Use the address of home web user interface: http://klk-wifc-YYYYYY/ (YYYYYY are the 6 digits at the end of hostname/board id (upper case))
  4. Use port 2222
  5. The login and password are the same than those of the web user interface (default: spn/spnpwd)

FTP client configuration

FTP filesystem tree

The FTP filesystem tree is the following:
Tree

Help

Inline help is available in web user interface in Configuration ⇒ Interfaces ⇒ Local FTP ⇒ Help

An extract of this help is available below:

Click to display ⇲

Click to hide ⇱

Click to hide ⇱

Common parameters

This service is used to access to flows via a local FTP server. Once the service is enabled, the FTP server is accessible at the following address:

sftp://spn@klk-YYYY-ZZZZZZ:2222/

Where:

  • YYYY is the board type (wifc, wiis or fevo)
  • ZZZZZZ are the 6 digits of the end of hostname.

Example:

sftp://spn@klk-wifc-03001d:2222/

User is spn and password is SPN password (the same as web interface).

Flow syntax

End-device fleet flow

Available from end_device directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/end_device

Add end-device fleet:

  • Create a CSV file XXXXXXXX_end_device_fleet.csv.
    • XXXXXXXX_end_device_fleet.csv: syntax is described through end-devices DOWNLOAD button.
  • Command triggered with a file add_fleet.
  • A file XXXXXXXX_add_fleet_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command add_fleet is processed if XXXXXXXX_add_fleet_processed_yy does not exist and each time the command file is edited.

Get end-device fleet:

  • Command triggered with a file get_fleet.
  • A CSV file XXXXXXXX_end_device_fleet.csv is created once command processed.
  • A file XXXXXXXX_get_fleet_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command get_fleet is processed if XXXXXXXX_get_fleet_processed_yy does not exist and each time the command file is edited. XXXXXXXX_end_device_fleet.csv will be overwritten once command processed.

Delete end-device fleet:

  • Command triggered with a file delete_fleet.
  • A file XXXXXXXX_delete_fleet_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command delete_fleet is processed if XXXXXXXX_delete_fleet_processed_yy does not exist and each time the command file is edited.

Gateway fleet flow

Available from gateway directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/gateway

Add gateway fleet:

  • Create a CSV file XXXXXXXX_gateway_fleet.csv.
    • XXXXXXXX_gateway_fleet.csv: syntax is described through gateway DOWNLOAD button.
  • Command triggered with a file add_fleet.
  • A file XXXXXXXX_add_fleet_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command add_fleet is processed if XXXXXXXX_add_fleet_processed_yy does not exist and each time the command file is edited.

Get gateway fleet:

  • Command triggered with a file get_fleet.
  • A CSV file XXXXXXXX_gateway_fleet.csv is created once command processed.
  • A file XXXXXXXX_get_fleet_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command get_fleet is processed if XXXXXXXX_get_fleet_processed_yy does not exist and each time the command file is edited. XXXXXXXX_gateway_fleet.csv will be overwritten once command processed.

Delete gateway fleet:

  • Command triggered with a file delete_fleet.
  • A file XXXXXXXX_delete_fleet_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command delete_fleet is processed if XXXXXXXX_delete_fleet_processed_yy does not exist and each time the command file is edited.

Rx data flow

Available from rx_data directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/rx_data

Get Rx data:

  • Command triggered with a file get_rx_data.
  • One or several files XXXXXXXX_rx_data_YYYYMMDDhhmmss.csv are retrieved once command processed.
  • A file XXXXXXXX_get_rx_data_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.
    • YYYYMMDDhhmmss: UTC date and time of file creation.
      • YYYY: system year (zero padded, in [0000;9999]).
      • MM: system month (zero padded, in [01;12]).
      • DD: system day (zero padded, in [01;31]).
      • hh: system hour (zero padded, in [00;23]).
      • mm: system minute (zero padded, in [00;59]).
      • ss: system second (zero padded, in [00;59]).

Command get_rx_data is processed if XXXXXXXX_get_rx_data_processed_yy does not exist and each time the command file is edited.

Tx data flow

Available from tx_data directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/tx_data

Add Tx data:

  • Create a CSV file XXXXXXXX_tx_data.csv.
    • XXXXXXXX_tx_data.csv: syntax is described through Tx data DOWNLOAD button.
  • Command triggered with a file add_tx_data.
  • A file XXXXXXXX_add_tx_data_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command add_tx_data is processed if XXXXXXXX_add_tx_data_processed_yy does not exist and each time the command file is edited.

Get Tx data:

  • Command triggered with a file get_tx_data.
  • A CSV file XXXXXXXX_tx_data_YYYYMMDDhhmmss.csv is created once command processed.
  • A file XXXXXXXX_get_tx_data_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.
    • YYYYMMDDhhmmss: UTC date and time of file creation.
      • YYYY: system year (zero padded, in [0000;9999]).
      • MM: system month (zero padded, in [01;12]).
      • DD: system day (zero padded, in [01;31]).
      • hh: system hour (zero padded, in [00;23]).
      • mm: system minute (zero padded, in [00;59]).
      • ss: system second (zero padded, in [00;59]).

Command get_tx_data is processed if XXXXXXXX_get_tx_data_processed_yy does not exist and each time the command file is edited.

Configuration flow

Available from configuration directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/configuration

Set configuration:

  • Create a JSON file XXXXXXXX_data.json.
    • XXXXXXXX_data.json: syntax is described through configuration DOWNLOAD button.
  • Command triggered with a file set_configuration.
  • A file XXXXXXXX_set_configuration_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command set_configuration is processed if XXXXXXXX_set_configuration_processed_yy does not exist and each time the command file is edited.

Get configuration:

  • Command triggered with a file get_configuration.
  • A JSON file XXXXXXXX_data.json is created once command processed.
  • A file XXXXXXXX_get_configuration_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command get_configuration is processed if XXXXXXXX_get_configuration_processed_yy does not exist and each time the command file is edited. XXXXXXXX_data.json will be overwritten once command processed.

Reset configuration:

  • Command triggered with a file reset_configuration.
  • A file XXXXXXXX_reset_configuration_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command reset_configuration is processed if XXXXXXXX_reset_configuration_processed_yy does not exist and each time the command file is edited.

Update flow

Available from update directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/update

Update:

  • Copy an *.ipk file.
  • Command triggered with a file update.
  • A file XXXXXXXX_update_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command update is processed if XXXXXXXX_update_processed_yy does not exist and each time the command file is edited. An additional reboot command is needed to complete update.

Add license:

  • Copy a license file XXXXXXXX_license.txt.
  • Command triggered with a file add_license.
  • A file XXXXXXXX_add_license_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command add_license is processed if XXXXXXXX_add_license_processed_yy does not exist and each time the command file is edited.

Restore:

  • Command triggered with a file restore.
  • A file XXXXXXXX_restore_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command restore is processed if XXXXXXXX_restore_processed_yy does not exist and each time the command file is edited. An additional reboot command is needed to complete restore.

Reboot:

  • Command triggered with a file reboot.
  • A file XXXXXXXX_reboot_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command reboot is processed if XXXXXXXX_reboot_processed_yy does not exist and each time the command file is edited.

Halt:

  • Command triggered with a file halt.
  • A file XXXXXXXX_halt_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command halt is processed if XXXXXXXX_halt_processed_yy does not exist and each time the command file is edited.

Status flow

Available from status directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/status

Get status:

  • Command triggered with a file get_status.
  • A CSV file XXXXXXXX_status_YYYYMMDDhhmmss.csv is created once command processed.
  • A file XXXXXXXX_get_status_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.
    • YYYYMMDDhhmmss: UTC date and time of file creation.
      • YYYY: system year (zero padded, in [0000;9999]).
      • MM: system month (zero padded, in [01;12]).
      • DD: system day (zero padded, in [01;31]).
      • hh: system hour (zero padded, in [00;23]).
      • mm: system minute (zero padded, in [00;59]).
      • ss: system second (zero padded, in [00;59]).

Command get_status is processed if XXXXXXXX_get_status_processed_yy does not exist and each time the command file is edited. XXXXXXXX_status.csv will be overwritten once command processed.

Log flow

Available from log directory:

sftp://spn@klk-YYYY-ZZZZZZ:2222/log

Get log:

  • Command triggered with a file get_log.
  • A directory XXXXXXXX_logs containing logs public, internal, packet_forwarder and loramacserver is created once command processed.
  • A file XXXXXXXX_get_log_processed_yy is created once command processed.
    • XXXXXXXX: gateway serial number in upper case.
    • yy: command status ok or ko.

Command get_log is processed if XXXXXXXX_get_log_processed_yy does not exist and each time the command file is edited.

wiki/interfaces/loftp.txt · Last modified: 2020/03/13 15:40 by ghi