tree: 758c8af284bb394115b6e8a5998fadd267e538e4 [path history] [tgz]
  1. dbus_bindings/
  2. test_protos/
  3. daemon.cc
  4. daemon.h
  5. firmware_directory.cc
  6. firmware_directory.h
  7. firmware_directory_stub.cc
  8. firmware_directory_stub.h
  9. firmware_directory_unittest.cc
  10. firmware_manifest.proto
  11. helper_manifest.proto
  12. main.cc
  13. mock_modem.h
  14. mock_modem_helper.h
  15. modem.cc
  16. modem.h
  17. modem_flasher.cc
  18. modem_flasher.h
  19. modem_flasher_unittest.cc
  20. modem_helper.cc
  21. modem_helper.h
  22. modem_helper_directory.cc
  23. modem_helper_directory.h
  24. modem_helper_directory_stub.cc
  25. modem_helper_directory_stub.h
  26. modem_tracker.cc
  27. modem_tracker.h
  28. modemfwd.gyp
  29. OWNERS
  30. proto_file_reader.cc
  31. proto_file_reader.h
  32. README.md
modemfwd/README.md

Modem Firmware Daemon

This daemon abstracts out the common portions of updating modem firmware, i.e. deciding whether there is currently newer firmware available and getting the modem ready to be flashed with new firmware.

Modem-specific program API

In order to enforce a process boundary between the open-source modemfwd and potentially non-open-source modem firmware updaters, we farm out steps that require modem-specific knowledge to different programs. modemfwd will call into these programs with different flags to request different services. These flags are declared in the system API repo.

  • --prepare_to_flash: put the modem into firmware download mode
  • --flash_main_fw=<file>
  • --get_carrier_fw_info: get a string name for the carrier that is supported by the currently installed carrier firmware, and its version (if there is any)
  • --flash_carrier_fw=<file>
  • --reboot

--get_carrier_fw_info should return the carrier name on one line and the version on the next:

$ modem_program --get_carrier_fw_info
Carrier
10.20.30.40

All commands should return 0 on success and something non-zero on failure. modemfwd will look for these binaries in the directory passed as the --helper_directory argument on the command line.

Helper and firmawre directory structure

The protos defined in helper_manifest.proto and firmware_manifest.proto define manifests that should be provided in the helper and firmware directories so modemfwd can figure out what devices, carriers, etc. the contents can be used with.