Skip to content

Stock Firmware Installation

Before you can use a freshly assembled ahoi modem, you have to install (flash) the ahoi firmware on it. The easiest and recommended way is to

  • download a firmware image from the Downloads page and
  • install the ST firmware tools as described below.

However, this procedure requires additional hardware. An alternative (but much slower) way to install the firmware is to use the serial connection that is mainly used for communication between modem and host (a computer). Please refer to MoSh Firmware Installation to learn about this method.

Flash Tool Installation

To install the firmware on a modem, you need the ST-Link Utility. It is available for both Linux and MS Windows.

Linux

In Ubuntu Linux, you can simply install the provided package:

sudo apt install stlink-tools

If you encounter any issues with the tool or run a different Linux, you can install the STlink tools from source instead. The procedure for debian-based distributions is as follows.

Install the dependencies:

sudo apt install make libusb-1.0-0-dev build-essential

Download, compile and install the ST-Link tools:

git clone https://github.com/texane/stlink.git
cd stlink && make release && make debug && cd build/Release && sudo make install

MS Windows

STM provides an MS Windows version of the ST-Link Utility (with GUI). Simply download the tool and install it.

Firmware Installation

To install a firmware image on the modem, you have to connect the modem to your computer with an ST-LINK/V2 programmer (or any other compatible SWD programmer). Please note that programmer will not power the modem; you need to connect a 12V battery or lab power supply.

Linux

Open a terminal flash a firmware image ahoi.bin from the command line via

st-flash write /path/to/ahoi.bin 0x8000000

MS Windows

Open the ST-Link Utility GUI, select and install the firmware image.

Final Steps

After the firmware has been successfully flashed to the modem, remove the programmer from the modem and reboot it (by power cycling). In addition to a lit power LED, the battery level LED (LD5) should be blinking as described in the Hardware Usage documentation.

To prepare the modem for its use, execute the following concluding steps:

  1. Use a serial cable (FTDI 3V3) to connect your modem with your computer.
  2. Run MoSh (mosh.py application from PyLib) and check that it responds to, e.g., a `version' command; refer to the PyLib Installation for this purpose.
  3. Set the ID of the modem (which is initially zero) by running id <ID> (the ID will be stored in the EEPROM of the modem, so a restart with following "id" command via MoSh should produce the previously set ID (in hex format)

You're now set to use the modem!