tasbihmr | 16 Feb 19:01
Picon
Favicon

reading from Serial Port (com port 1 to 10)

Dear All,

After thanking all those who are the contributors to this very 
informative and useful Java tool, I would like to ask that if there a 
sample code that can read and write the transaction to the serial port, 
i.e, simply read from a given port and write back to the same port. Has 
this tool been already developed ? I think it would be very useful 
because there are so many things out there (hardware as well), which 
are very able to communicate in serial.

Regards and thanks,
tasbihmr 

 
Victor Salaman | 17 Feb 10:00
Picon

Re: reading from Serial Port (com port 1 to 10)

Hi:

Some of us have written jPos serial handlers for our specific needs
and I don't know about everyone else's experience, but I finally gave
up trying to use serial ports in servers and PCs, as there are good
serial boards and bad serial boards and their reliability is not
consistent. Besides, for reliability, dependability and other obvious
reasons you want to decouple yourself from the PC.

* If you're serving incoming POS, use something like a Hypercom NAC
device. You won't have to worry about modems, serial ports or any of
the sort.
* If you're connecting serial devices directly, use an external device
server like Moxa device server series or Digi PortServer.

In both cases your software will just talk straight TCP/IP and the
device does all the serial management. It also works good for
redundancy since it's networked, if you have standy boxes, getting the
serial devices to see your other cluster box(es) is a snap!

IMHO these days it'd actually be a crime to plug a serial device
directly on the server(s), but I could be wrong. haha

-V

On Feb 16, 2008 2:01 PM, tasbihmr <tasbihmr@...> wrote:
>
>
>
>
(Continue reading)

tasbihmr | 17 Feb 11:56
Picon
Favicon

Re: reading from Serial Port (com port 1 to 10)

Dear Sir,

Thanks for your reply and the time you have put for this. I actually
enjoyed reading about your thoughts. What I want to tell about this is
that, the NAC device that you mentioned, is very nice, however it
requires several communication features and other software, without
which the scenario may fail to work for simple development work. But a
simple serial communication if associated with an extensive API like
the jPOS, may be able to solve development problems without the need
to consider the communication via the NAC devices or modems. Those can
be taken into consideration once the related parts which are developed
ahead of time are working efficiently.
If I may say what I am looking for. I am looking for the jPOS API to
take its input transaction from the serial port, perform processing on
it, and return it to the serial port. This should more or less be
possible and theoratically work also.

Thanks you in advance and regards,
tasbihmr

--- In jpos-dev@..., "Victor Salaman" <vsalaman@...> wrote:
>
> Hi:
> 
> Some of us have written jPos serial handlers for our specific needs
> and I don't know about everyone else's experience, but I finally gave
> up trying to use serial ports in servers and PCs, as there are good
> serial boards and bad serial boards and their reliability is not
> consistent. Besides, for reliability, dependability and other obvious
> reasons you want to decouple yourself from the PC.
(Continue reading)

Alejandro Revilla | 17 Feb 13:11
Favicon

Re: Re: reading from Serial Port (com port 1 to 10)

I agree with Victor, you definitely don't want to plug async ports to
your servers, but if you really need to, you can use Java' Comm API. 

We use RXTX in Linux and works great (we use it to connect to HSM
devices over serial ports). 

We also used it to accept async dialin modems but the performance was
pathetic (modems hung all the time).

Have a look at
http://jpos.svn.sourceforge.net/viewvc/jpos/branches/v1_5_3/jpos/src/ext/org/jpos/util/
where you can find some examples.

--Alejandro

 

Gmane