This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:local_ftp [2020/02/21 15:03] mgr |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Local FTP ====== | ||
- | ===== Introduction ===== | ||
- | An sFTP server is installed on the gateway. It can be used to: | ||
- | * Configure the station. | ||
- | * Configure the end-devices fleet. | ||
- | * Receive frames from end-devices. | ||
- | * Transmit frames to end-devices. | ||
- | * Debug / troubleshoot the station. | ||
- | |||
- | Its configuration is available in the //Local FTP// tab under the //Interface// menu. | ||
- | |||
- | {{ :images:localftpenable.png?400 |}} | ||
- | |||
- | ===== FTP Connection ===== | ||
- | |||
- | - Enable local FTP in the //Local FTP// tab under the //Interface// menu. | ||
- | - On your computer, launch a ftp client such as //FileZilla// or //WinSCP// to connect to the server. | ||
- | - Use the address of home web interface: ''http://klk-wifc-YYYYYY/'' (YYYYYY are the 6 digits at the end of hostname/board id (upper case)). | ||
- | - Use port **2222**. | ||
- | - The login and password are the same than those of the web interface (default: ''spn'' / ''spnpwd''). | ||
- | |||
- | {{ :images:localftp_fillezilla.png?400 |}} | ||
- | |||
- | ===== FTP filesystem structure ===== | ||
- | |||
- | The FTP filesystem structure is the following: \\ | ||
- | {{:images:localftpstructure_v2.0.png?100|}} | ||
- | |||
- | ===== Features ===== | ||
- | |||
- | <note important>In this page, “XXXXXXXX” represents the hardware serial number of the board (8 digits)(upper case)(see [[wiki:faq#How to find the hardware serial number of the board?|How to find the hardware serial number of the board?]]) | ||
- | </note> | ||
- | |||
- | 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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/end_device | ||
- | </code> | ||
- | === 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 [[wiki:resources#templates|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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/gateway | ||
- | </code> | ||
- | === 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 [[wiki:resources#templates|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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/rx_data | ||
- | </code> | ||
- | === 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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/tx_data | ||
- | </code> | ||
- | === 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 [[wiki:resources#templates|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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/configuration | ||
- | </code> | ||
- | === 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 [[wiki:resources#templates|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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/update | ||
- | </code> | ||
- | === 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 === | ||
- | |||
- | <note important>This feature is under [[wiki:resources_spn_firmware_2.0.3#restrictions|restriction]]</note> | ||
- | |||
- | * 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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/status | ||
- | </code> | ||
- | === 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: | ||
- | <code>sftp://spn@klk-wifc-YYYYYY:2222/log | ||
- | </code> | ||
- | === 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. |