25 October 2004

Back to RXTX programming

Ok, after doing a stint with Java Communications API for developing Java applications with RS232 serial communications I am back at it again. This time developing a GSM-modem-borne SMS applications. Why not sign-up a shortcode from a telco? First, the application is intended for use with low-to-medium traffic systems which includes private health care, private schools, E-Loading, "AutoLoading" stations(somebody's thumb must take a rest from repetitively texting those E-load or Autload instructions to the SMS gateway) or control a server or PC remotely. Since I am doing this on Linux and not on Windows as what I did previously, I would need the RXTX for that or better yet the IBM Java Communications API for Linux.

Now, I have improved the wrapper class for initializing and opening serial and parallel port regardless of what and where the device is connected, what operating system is being used. Although installation is still OS-dependent, the runtime will be seamless.


4 comments:

nox said...

hi jared,

just wondering, what method do you suggest to best poll the gsm modem? thru a loop? do you use the CNMI feature? retrieving the message using the comm event is trivial (specially with the CNMI), but what i find difficult is reliably transmitting or send back a text message...

anyway hope you can share your adventures on javacomm land...


cheers!

nox

Jared said...

Surprisingly, for GSM-Modem polling since I've used JavaComm API before for a more "demanding" device than a GSM Modem, I'll be using the Concurrent API which is not yet available for Java 1.4.2 but threading principle goes something like this:

http://www.pikko-software.com/roller/page/jaredflo/20040822

I've used Doug Lea's Concurrent API for almost every Java threading requirements I have from this lowly GSM Modem to the high-traffic SMS Provisioning systems. (HUSH!) I work for one our country's wireless telcos.

Matthew Hewitt said...

Hello Jared

I have been programming using Java for a couple of years but find it very difficult to find the basics of serial port programming using Java on the internet. I wonder if you could recommend any sites and sample programs and tell me of any add-ons I might need

Thanks Matt

Jared said...

Hi Matthew,

Actually there's a lot. And one of them is this:

http://java.sun.com/products/javacomm/javadocs/API_users_guide.html

My tip only will be is to be more familiar with Java I/O(e.g.
InputStreams etc.) and Java Threads. Because Java Serial Programming
isn't your typical Java programming (e.g. servlets, applets etc.) it
involves a lot of low-level libraries and mostly platform-specific.

Thanks for dropping by.