ZeroPhone / Discussion-and-Research

General-purpose ZeroPhone discussion (mostly happening in Issues tab)
GNU General Public License v3.0
9 stars 0 forks source link

SIM800 firmware updater tool #11

Closed CRImier closed 5 years ago

CRImier commented 6 years ago

The SIM800 modem (and other SimCom modems, such as SIM5300 that the 3G ZeroPhone version will likely be using) have a mechanism for firmware updates. There does not seem to be a tool to update the modem firmware under Linux, but it should be doable, given that the specifications are available and there are tools to do it under Windows. The firmware can updated through the same UART connection that is already exposed to the Pi Zero, and Windows-specific firmware update instructions are available here: [http://www.raviyp.com/embedded/214-learn-how-to-update-the-firmware-of-your-sim800-modules through UART or USB]; [https://elementztechblog.wordpress.com/2016/08/02/updating-firmware-of-sim800-gsm-module/ through USB]. There's also [http://simcomm2m.com/UploadFile/TechnicalFile/SIM800%20Series_Software%20Upgrade_Application%20Note_V1.04.pdf an appnote describing the update process].

It's possible that, when a ZeroPhone is assembled with a modem module, the firmware won't be the newest available one. Therefore, it would be useful to have a firmware upgrade tool that would help users keep the modem firmware up-to-date. It could also help with SIM800 firmware reverse-engineering, in case somebody is interested to do that.

CRImier commented 5 years ago

There's a mtkdownload tool from Simcom, it appears - I've packaged it and put it in a repo!

root@zerophone-prototype:~# apt install mtkdownload
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  mtkdownload
0 upgraded, 1 newly installed, 0 to remove and 69 not upgraded.
Need to get 5,854 B of archives.
After this operation, 24.6 kB of additional disk space will be used.
Get:1 http://repo.zerophone.org/debian stretch/main armhf mtkdownload armhf 1.0 [5,854 B]
Fetched 5,854 B in 0s (13.1 kB/s)
Selecting previously unselected package mtkdownload.
(Reading database ... 117178 files and directories currently installed.)
Preparing to unpack .../mtkdownload_1.0_armhf.deb ...
Unpacking mtkdownload (1.0) ...
Setting up mtkdownload (1.0) ...
mtkdownload
root@zerophone-prototype:~# mtkdownload
Usage: mtkdownload <com> ROM_VIVA <format>

<com>: /dev/ttyS0,/dev/ttyS1,/dev/ttyS2..
means  COM1,COM2,COM3,COM4,USB2COM
ROM_VIVA is updating rom file
<format> Y,N
means  format FAT or not format Fat
Example: mtkdownload 100 ROM_VIVA Y
root@zerophone-prototype:~# yay!

Sources here.

CRImier commented 5 years ago

And now there's an app to upgrade the firmware through ZPUI!