swiflash allows to flash images into WP/AR products
through USB port. This is a recovery tool that can be used even if
the device is not booting anymore. This tool is platform specific (only
for WP/AR Series).
Follow these instructions for Ubuntu/Debian distributions
wget http://updatesite.sierrawireless.com/swiflash/swiflash_latest.deb -O /tmp/swiflash_latest.deb
sudo apt-get install /tmp/swiflash_latest.deb
swiflash
tool zip archive from this link
unzip swiflash.zip -d $HOME/legato/swiflash
)
echo 'export PATH=$HOME/legato/swiflash:$PATH' >> $HOME/.bashrc
)
This is a recovery tool, that can be used to flash images even if the
device is not booting anymore (because of corrupted configurations files
in the root FS, badly customized Linux kernel
or Legato framework, or whatever...).
Most of times, the tool can be used without having to do any hardware
manipulation, as soon as the DM USB port (download port) is available.
However, sometimes the module may be in a unrecoverable state (no DM
port); in such cases, the module shall be switched in bootloader mode
before the flashing operation.
Please follow these steps to switch your module in bootloader mode:
Then you will be able to execute the
- Use one of the following methods to toggle the bootloader mode:
- Either toggle the TP1 pin to LOW or OFF position
Please refer to your product PTS to know where this pin is connected
(on MangOH board, this is switch number 7)
Then reboot the module
- Or use the
AT!BOOTHOLD
AT command (this will perform a module reset).
You can access to AT commands from the device Linux shell (UART or SSH) by using themicrocom -E /dev/ttyAT
command- Plug the device USB cable
- Check that a
/dev/ttyUSBX
serial port is mounted on your system: this will be the DM port, necessary to handle the download.swiflash
command (see below).
Note: if you used the hardware switch to enter bootloader mode, you'll have to switch back to HIGH or ON position once the download is started.
sudo cp $ROOT/99-sierrawireless-modem.rules /etc/udev/rules.d
sudo service udev restart
(Assuming that $ROOT
is the location where swiflash was installed)Run swiflash --help
for complete usage details.
swiflash [OPTION] -m "<module>" -i <image>
or
swiflash [OPTION] -m "<module>" -r
Options:
-i <image> Uses the provided image file (cwe or spk file) to flash the device
-r Restore the Linux root filesystem in its original state by erasing the USER1 partition (all filesystem updates will be lost)
Note: This option is not supported on following modules: ar758x
-m "<module>" Specifies the target module type.
Allowed values are: ar86, ar7, ar758x, wp85, wp750x, wp76xx, wp77xx, fx30_wp85
-f,--force Bypass preliminary checks for dialout group and ModemManager service, and launch the download anyway (see above)
-h,--help Display this message
Reset user partition on a Legato device
swiflash -m "wp85" -r
Download reference device image on a Legato device
swiflash -m "wp85" -i $WP85_DEVICE_IMAGE/image.spk
where image.spk is the image to be used, according to your customer configuration