Corruption File Test
  • 24 Nov 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Corruption File Test

  • Dark
    Light
  • PDF

Article summary

Main Procedure

Basically, the main procedure of this test is explained as below:

  1. Prepare the corrupted original file
  2. Upload it to modem
  3. Turn it on with get imei, the imei should not be appeared as it found a corrupted file
  4. Turn off the modem
  5. Turn it on again, make sure the imei appeared on the command response
  6. Make sure the file is fixed with download file command

More Detailed Procedure

If You're blind enough about the main procedure, follow these instructions:

  1. Open test scripts directory, and then go to files/modem_cfg_files

  2. Prepare the corrupted original file by delete the file contents. You can choose whatever config files you will be deleted between alarm, amr_cfg, consumption_profile, dev_info, fw_ver, mqtt_cfg, nw_cfg, and runtime.

Fig 1 amr_cfg.json
Fig 2 amr_cfg.json after contents deleted
  1. Make sure you save the file that you've been deleted
  2. Open any script with name started with "upload_xxxx.py"
Fig 3 upload_amr_cfg.py
  1. Modify the target file name with desired file you will be uploaded (make sure you modify the source file and destination file for both original and temporary)
Fig 4 Example picture if wanna upload runtime.json
  1. Run get imei command by executing the script in terminal
py get_imei.py
  1. Run the file that you've been modified at step 4 and 5
  2. Make sure the upload file is successfully executed
  3. Turn it off with power off command
py power_off.py
  1. After waiting for several seconds, turn it on again with get imei command
  2. Make sure the response is Failed, which means the IMEI is not successfully obtained
  3. Turn the modem off again, wait for several seconds
  4. Turn it on again with get imei command
  5. Make sure the IMEI is successfully obtained
  6. Verify the test with download the desired config files
  7. Make sure both original and temporary files has been fixed (not corrupted or empty)

Was this article helpful?

What's Next