Wednesday, December 3, 2014

Flashing GL865-QUAD's firmware

If you bought a GSM Click board from MikroElektronika, chances are that the GL865-QUAD modem comes with older firmware. That might work for you, but my board came with version 10.00.144, which doesn't support SSL.

The GL865-QUAD chip can be easily upgraded via its AUX serial interface. Note that the AUX port is not the same serial port we use to operate the modem normally via AT commands, and it's actually not broken out to external pins so a bit of soldering is required.

Set up


A quick look at the datasheet reveals the location of the TX/RX pins:


I used a couple of breadboard jumper cables soldered directly to those pins:


To communicate with the GL865-QUAD I used this FTDI USB-serial converter from Sparkfun. According to Telit's datasheet, the AUX port is 2.8V CMOS logic, so I bridged across the two pads next to the 3.3V mark on the FTDI board with a bit of solder:



The GL865 hardware guide states that the absolute maximum input on 2.8V CMOS pins is 3.1V. I found the output of the FTDI chip was slightly over 3.1V, so I simply tied the TX/RX pairs together and hoped for the best. It turned out okay, but if you want to be extra careful, I suggest you use a simple level converter like this:

GL865 pin 45 (TXD_AUX) -------------- FTDI RXD
GL865 pin 44 (RXD_AUX) ----+---|<|--- FTDI TXD
                           |  1N4148
                           /
                           \ 4K7
                           /
                           |
GL865 any GND pin      ----+--------- FTDI GND

The diode will provide the necessary ~0.6V drop so that the FTDI output is within safe levels while the resistor pulls the CMOS input down to 0V when the FTDI TXD outputs a logic 0.

My whole setup looked like this:


Besides the RX/TX cables, I tied both the GL865 and FTDI grounds together (blue cable), and of course you need a 3.3V source to power the whole board. I used some batteries and a 3.3V regulator for this (not shown in the picture above).

Get the firmware


As of today, the latest firmware version is 10.01.140. It's not publicly available neither on Telit nor MikroE's websites, but you can request it directly through MikroE's contact page. Ask them for the XFP tool, too. They answer within 24 hours. The XFP tool runs on Windows, if you are on Linux or OS X you can run it from a Windows virtual machine.

Flash the firmware


With the GSM Click powered off, load up Xfp, select the firmware and hit program. As soon as Xfp says "Linking", power on the GSM Click. It has to be done in that very order. If you hit the program button after the Click has booted, Xfp will stay in a never ending "Linking" loop. It takes about 10 minutes to finish:



Test it!

To check the firmware version you can use the AT+CGMR command, which should output something like this:

--> AT+CGMR
<-- 10.01.140\r\n

And... done!