While I’ve been troubleshooting SMS Applications (based on smslib, Gnokii, Kannel) for over 3 yrs, it is excruciatingly painful to tell people the basics of the troubleshooting again and again. There have been numerous small docs, readme files, emails that have repeated the same things again and again. To people who have gone through with the implementation and fixed problems, I’ve repeatedly requested to document these at some place (…infact as part of their job profiles), but none have sadly been able to produce anything useful. So, here is an attempt to make the troubleshooting process a little more easier for someone who is stuck. There is always websearch that will finally give you the answer to the troubleshooting process, but this is just a reminder to myself where to look at.
- 0.) Archive the logs and send it... as basic as it sounds, ALWAYS look at the log file
- Check the application/library version – report this as part of any question you are asking
- Check the Native Library version and the Java Library version. These should ideally match or should have the same type. i.e if you are using RXTXComm (this is bundled with dhis-web-mobile module), then you should have rxtxSerial.so (Linux) or rxtxSerial.dll (Windows). If using the older version, check the comm.jar and the required dlls is at the right location.
- Check the compatibility of the modem (Kannel) and (smslib). If not listed, check if it supports common standard AT command and may just work
- If you are using SMSLib for Java on Linux with the RxTx, you can have a no response exception or gnu.io.NoSuchPortException, as if no modem is actually connected to your computer – create a simlink to the dev/ttyS20 and also do start your application (for DHIS this is catalina.sh) with the –Dsmslib.serial.polling parameter as given in this bug filing.
- Check if you have the correct port number in the configuration. For Windows, look at the device manager and the modem. Put the COM10 as the port (COM is needed for DHIS, while not for SMSListener), while for Linux add the /dev/tty<whatever> (/dev/ttyUSB0). For linux, try running the “wvdialconf /etc/wvdial.conf” (without quotes) or scanModem script. This will give the modem port
- Check the SIM memory location and add it to the configuration file. This is complex, but a Google search on your modem should help. If you don’t find anything obvious leaving it blank should likely work for your modem
- If you repeatedly see Framing Errors, it is primarily because the baud-rate mismatch between what you have set and what your modem supports. Running wvdialconf as earlier may give you good indication of what baud-rates are supported and best for your modem. If its windows, then setting to 56000 should be safe enough.
- Some modems supports a specialized AT command set. These are init commands and activation AT commands. You should change the manufacturer and model string. If you know the manufacturer, then it is always good to put the exact manufacturer name in that string.