- Print
- DarkLight
- PDF
There'll be python scripts that doesn't explained in this docs, please ask the dev beforehand
A. MCU Commands
1. Get MCU FW Version
- Functionality : Obtain the VODA MCU FW version
- File : get_mcu_fw_version.py
- Expected Response
MCU FW Version: <build version>
2. Get VODA Config
- Functionality : Obtain VODA configuration that saved in MCU
- File : get_config.py
- Expected Response
Activation Status : activated
Sensor Sampling Rate : 5 Hz
Submission Rate : 5 minutes
Last Counter Value : 2.96 m3
Sensor Calibration Data : 500 , 500 , 500 , 500
Alarm Status : none
3. Get VODA RTC Time
- Functionality : Obtain VODA RTC timestamp
- File : get_time.py
- Expected Response
timestamp: <day>/<mon>/<year> <h>:<m>:<s>
4. Soft Reset
- Functionality : Reset the MCU saved configuration
- File : soft_reset.py
- Expected Response
Voda reset succeeded
5. Hard Reset
- Functionality : Reset the MCU saved configuration with only engineering serial cable
- File : hard_reset.py
- Expected Response
reset done
6. Flash MCU FW
- Functionality : Flash the MCU with desired firmware.
- File : flash_mcu_fw.py
- Expected Response
Flash Done
7. Set VODA RTC Time
- Functionality : Set VODA RTC timestamp
- File : set_time.py
- Expected Response
OK
8. Set VODA MCU Configurations
- Functionality : Set VODA Configurations that stored in MCU
- File : set_config.py
- Expected Response
OK
B. Modem Commands
Only Get IMEI, sync config, and flash modem apps command that must be executed when the modem is OFF. Other than that must be executed only when modem is ON
1. Get IMEI
This command can be executed only when VODA modem is turned off
- Functionality : Obtain the Modem's IMEI that embedded to VODA
- File : get_imei.py
- Expected Response
Command processed
Please wait..
Please wait..
Please wait..
IMEI is <imei obtained>
2. Sync Config
This command can be executed only when VODA modem is turned off
- Functionality : Connect to AWS manually and synchronize the configurations that saved at shadows
- File : sync_config.py
- Expected Response
Command Processed
3. VODA Power Off
- Functionality : Turn off the Modem
- File : power_off.py
- Expected Response
Voda is successfully turned off. Please wait for 10 seconds
4. Get Last Failure
- Functionality : Check last VODA state when it stops sending to AWS
- File : get_last_failure.py
- Expected Response
Last Modem state is <modem state>
4. Get Queue Usage Data Count
- Functionality : Get queue numbers that contains in the modem file system
When VODA failed to send the data to AWS, the files would be saved in queue and it will always trying to send them in the next submission period.
- File : get_queue_count.py
- Expected Response
Queue count result is <queue number> data
5. Get Queue Usage Data at Index
This command is deprecated
- Functionality : Get queue file name based on queue number. First ordered in queue will always be 0 indexed
- File : get_queue_at_index.py
- Expected Response
Queue file name at index <index number> is <file name>
6. Get Queue Usage Data Head
- Functionality : Get file name at first ordered in queue
- File : get_queue_head.py
- Expected Response
Queue head is <file name>
7. Retrieve Queue Usage Data
- Functionality : Get file contents based on file name that obtained from queue usage data head or queue usage data at index commands
- File : download_queue.py
- Expected Response
Got the file contents!
File contents has been saved in file named <file name> in this directory
8. Delete Retrieved Queue Usage Data
- Functionality : Delete desired queue usage data. Make sure the queue usage data file is has been retrieved before deleting started
- File : delete_queue.py
- Expected Response
Delete file is succeeded
9. Delete all retrieved queue usage data
- Functionality : List all queue, download all of them and then delete them after
- File : delete_all_queue.py
10. Download file
- Functionality : Read the target file and wrap it to the file with same name as target
- File : download_file.py
Downloaded file will be stored in files/download/ directory
11. Flash modem apps
- This command must be executed when modem is OFF
- Please watch out the file path
- Functionality : Replace the current modem apps with desired modem apps
- File : flash_modem_apps.py
12. Get Sim Card ID
- Functionality : Get simcard's ICCID
- File : get_sim_iccid.py
- Expected Response
Simcard ICCID is <simcard's ICCID>
13. Get modem state
- Functionality : Obtain the current modem state
- File : get_modem_state.py
14. Reset Modem Alarm Value
- Functionality : Set alarm value inside the modem to 0
- File : reset_alarm.py
- Expected Response
Reset Alarm is succeeded
15. Reset AMR Config
- Functionality : Reset the amr_cfg,json and runtime.json props that related to activation phase
- File : reset_amr_config.py
16. Upload files commands
- Functionality : Upload bunch of files to modem file system
- File :
- upload_amr_cfg.py (amr_cfg.json and amr_cfg.json_tmp)
- upload_battery_value.py (dev_info.json and dev_info.json_tmp)
- upload_consumption_profile.py (consumption_profile.json and consumption_profile.json_tmp)
- upload_nw_cfg.py (nw_cfg.json and nw_cfg.json_tmp)
- upload_runtime.py (runtime.json and runtime.json_tmp)
17. Upload AWS config for demo/dev
- Functionality : Set the aws server and its certificate
- File to be uploaded :
- mqtt_cfg.json and mqtt_cfg.json_tmp
- aws_client_cert_main.pem.crt
- aws_client_key_main.pem.key
- File to be executed :
- upload_old_aws_cfg.py (AWS DEMO)
- upload_new_aws_cfg.py (AWS DEV)
18. Upload usage data
- Functionality : Upload mock of usage data to the usage data file system in modem, located in /datatx/usage_data/ directory
- File:
- upload_usage_data.py (Single of usage data)
- upload_batch_usage_data.py (Selected range of usage data)
19. Upload backup files
- Functionality : Upload the backup files of json files into modem file system
- File : upload_backup_files.py
C. Tools
1. Factory Reset
- Functionality : Do the flash modem and mcu, and also reset all the config files int the modem file system
- File : factory_reset.py
When this file is executed, the options will be appeared
0 -> the server configurations will be configured as AWS DEMO
1 -> the server configurations will be configured as AWS DEV
2. Generate MCU FW from e2 studio workspace
- Functionality : Generate compiled MCU FW release as TSM_FW.hex and store it to destination path
- File : generate_mcu_fw_bin.py
3. Mock Scripts
- Functionality : Accelerate VODA running with set the RTC time based on submission period
- File :
- mock_daily_usage_data.py (will only run once based on submission period)
- mock_runtime.py (will only stopped if any key interruptions or error)
4. Parse usage data
- Functionality : Read the selected usage data and transform it to json file
- File : parse_usage_data.py
5. Reset Activation
Before start the activation test, please execute this file beforehand
- Functionality : Reset alarm, runtime, and amr configs that related to amr activation phase
- File : reset_activation.py