Java + 3G USB dongle + SMS + javax.comm

This is 3rd post about SMS.

No time to rewrite the sms application on c#. Made the existing legacy java app robust. Let it survive for some time #zen

Here are some of the interesting facts –

  • We need to use good olden 32 bit JRE to continue to support javax.comm api
  • Win32com.dll doesn’t have an implementation for 64 bit

*Often, java doesn’t get response from serial port, it makes our situation pathetic in SLA. You don’t have control over it.

So far, I have used to devices.

  1. HSDPA 3g dongle from StarHub made by Huawei Device
  2. Wavecom GSM modem connected to usb via USB to Serial convertor cable.



CommPortIdentifier.getPortIdentifiers() is empty

I am trying to work on a legacy SMS gateway built on java. I’ve made my hands dirty with AT commands with Ubuntu ‘long long ago’ – Pls check this –

Connecting Sony Ericsson W810i to Mandriva and executing AT commands with Java

So, I thought I can do something here. Okay. I setup the environment with my Eclipse is using jdk8 x64.

I got two errors –

Firstly, CommPortIdentifier.getPortIdentifiers() returns no COM ports. I copied win32com.dll to jre\bin folder and to jre\lib


Error loading win32com: java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jre1.8.0_45\bin\win32com.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform


Java already stopped support javax.comm library. So they do not have x64 bit dll to work with 64 bit java. So, I’ve downloaded 32 bit version of JRE 5 (latest JRE doesn’t work for javax.comm). hah!