AirFix: Fixing Sierra Wireless Watcher
The Sierra Wireless Watcher Software is used for Sierra Wireless UMTS Modems to connect to the internet. Unfortunately this software has a bug with some cards (e.g. with my AirCard 850). Sierra did not want to fix the bug although I reported the bug in a detailed way. Another example of a bad company you should think twice before buying a product.
Without using the airplane mode the Watcher software works (more or less). But when the airplane mode is enabled and the Watcher software is started there is a strange behaviour: The software connects successfully but it does not escape the state of "connecting". This means that the "Disconnect"-Button keeps grayed out and there is no way to terminate the connection except killing Watcher. In this case also no records to the phone log and the transmitted data is written. Read on here for my fix
Detailed description of bug
A picture is worth a thousand words. So here is what the bug looks like:
As you can see the there is no way to terminate the session as the "Disconnect"-button is greyed out. After searching around for a long time I found out that this only happens when the "airplane mode" is turned on when starting the application. The airplane mode is a very important feature as the card is switched to lowest power mode preserving valuable energy.
The manual fix
An obvious idea was to turn off the airplane mode before starting Sierra Watcher. Indeed, it worked. I found out the corresponding AT commands for the Modem to turn on/off the airplane mode. In (e.g.) HyperTerminal connect to the modem (in my case COM12) and enter:
AT+CFUN=0
for enabling the airplane mode and
AT+CFUN=1
for disabling the airplane mode.
My solution: AirFix.exe
The major problem was another bug in Sierra's software (lot's of bugs...): When I sent the command directly on the cmd-Prompt:
echo AT+CFUN=1 > \\.\COM12:
the command was recognized (the LED on the card flashed) but computer totally crashed. The same when I opened the serial device just with file operations within a Visual Basic script.
So I built up a complete C program AirFix.exe which does this job. In special, the program does the following:
- Using CEnumerateSerial, the COM port of the modem is found by using "friendly names". The program matches on Sierra AND AirCard AND Modem
- CreateFile opens "\\\\.\\COM%d"
- Using GetCommState and SetCommState the serial port is configured with 9600,8,N,1
- Using SetCommTimeouts the timeouts are configured
- Using WriteFile the data "AT+CFUN=1\x0D" is written to the serial port
- The program waits for "OK" using ReadFile in a loop
- serial port is closed with CloseHandle
- Using RegOpenKeyEx and RegQueryValueEx the value of HKEY_LOCAL_MACHINE\SOFTWARE\Sierra Wireless Inc\Watcher Helper\Application Paths\3G Watcher is determined. This is the installation directory of the Watcher software
- The program waits for 500 milliseconds
- Watcher.exe is started using ShellExecute with the directory found above
You can download the program file here: Media:AirFix.zip. Just copy to some destination and call AirFix.exe instead of Watcher.exe.
I will send the (short) source code on request.
Comments
<comments />