User Tools

Site Tools


wiki:local_ftp_2.0.3

This is an old revision of the document!


Local FTP features

In this page, “XXXXXXXX” represents the hardware serial number of the board (8 digits)(upper case)(see How to find the hardware serial number of the board?)

FTP filesystem structure

The FTP filesystem structure is the following:

Features

The features are triggered by the presence of empty files, with specific names in specific folders. Each “flow” uses its own folder.

End-device fleet flow

Available from end_device directory:

sftp://spn@klk-wifc-YYYYYY:2222/end_device

Add end-device fleet

  • Create a CSV file XXXXXXXX_end_device_fleet.csv.
    • XXXXXXXX_end_device_fleet.csv: Syntax can be retrieved by using the associated get_… command, or, it can be downloaded from the resources page.
  • 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 added.

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 added. 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 added.

Gateway fleet flow

Available from gateway directory:

sftp://spn@klk-wifc-YYYYYY:2222/gateway

Add gateway fleet

  • Create a CSV file XXXXXXXX_gateway_fleet.csv.
    • XXXXXXXX_gateway_fleet.csv: Syntax can be retrieved by using the associated get_… command, or, it can be downloaded from the resources page.
  • 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 added.

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 added. 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 added.

Rx data flow

Available from rx_data directory:

sftp://spn@klk-wifc-YYYYYY: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 added.

Tx data flow

Available from tx_data directory:

sftp://spn@klk-wifc-YYYYYY:2222/tx_data

Add Tx data

  • Create a CSV file XXXXXXXX_tx_data.csv.
    • XXXXXXXX_tx_data.csv: Syntax can be retrieved by using the associated get_… command, or, it can be downloaded from the resources page.
  • 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 added.

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 added.

Configuration flow

Available from configuration directory:

sftp://spn@klk-wifc-YYYYYY:2222/configuration

Set configuration

  • Create a JSON file XXXXXXXX_data.json.
    • XXXXXXXX_data.json: Syntax can be retrieved by using the associated get_… command, or, it can be downloaded from the resources page.
  • 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_yy does not exist and each time the command file is added.

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_yy does not exist and each time the command file is added. 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_yy does not exist and each time the command file is added.

Update flow

Available from update directory:

sftp://spn@klk-wifc-YYYYYY:2222/update

Update

  • Copy an *.ipk.gpg 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_yy does not exist and each time the command file is added.

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_yy does not exist and each time the command file is added.

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_yy does not exist and each time the command file is added.

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_yy does not exist and each time the command file is added.

Halt

This feature is under restriction

  • 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_yy does not exist and each time the command file is added.

Status flow

Available from status directory:

sftp://spn@klk-wifc-YYYYYY:2222/status

Get status

  • Command triggered with a file get_status.
  • A CSV file XXXXXXXX_status.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.

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

Log flow

Available from log directory:

sftp://spn@klk-wifc-YYYYYY: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_yy does not exist and each time the command file is added.

wiki/local_ftp_2.0.3.1582293857.txt.gz · Last modified: 2020/02/21 15:04 by mgr