You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by "Archer, Garry" <ga...@yale.edu> on 2014/04/29 17:03:00 UTC
Protocol Encoder/Decoder Pair for Serial Data Wrapped in TCP/IP
Packets.
Hello All,
As I may have mentioned in a previous thread I have serial data wrapped in TCP/IP packets arriving at a Web application on a Mac.
The Web app handles TCP/IP data with MINA from other sources with no problems, using NioSocketConnectors and NioSocketAcceptors and ProtocolEncoders and ProtocolDecoders for the messages.
I believe I can still use a NioSocketConnector and a NioSocketAcceptor to send and receive TCP/IP packets wrapping serial data if I can write an appropriate ProtocolEncoder and ProtocolDecoder pair to extract/wrap the data needed for the Web app. Does this sound reasonable?
Has anyone already done this in MINA? Or know of any source code that can wrap/unwrap serial data in TCP/IP packets and I can convert it to a MINA ProtocolEncoder and ProtocolDecoder pair?
Any help is deeply appreciated, thank you.
Regards,
Garry Archer
Systems Programmer
Department of Pathology
Yale School of Medicine
Re: Protocol Encoder/Decoder Pair for Serial Data Wrapped in TCP/IP
Packets.
Posted by "Archer, Garry" <ga...@yale.edu>.
Hello Emmanuel!
On Apr 29, 2014, at 11:44 AM, Emmanuel Lécharny wrote:
I won't be very helpful here, as I wasn't the one who worked on the
serial implementation on teh server side.
No problem. I am sure there was less need for serial communications and most resources were poured into the TCP/IP effort.
What I can tell you is that we would be pleased to modify MINA to have
something better than what we have, and that might require to get rid of
rxtx (which seems to be a mess and has a license hich is problematic).
This would be great! Yes, RXTX seems to be used everywhere.
A month or two ago, I implemented a MINA app on a Windows PC to send data with the SerialConnector class and I recall having to install RXTXcomm.jar into the JRE/lib/ext directory and rxtxSerial.dll into the JRE/bin directory in order for MINA to work.
Additionally, correct me if I am wrong, but RXTX is only installed into Windows. I also found out that RXTX is not compatible with Windows Server 2003 -- and that's what I have running in VirtualBox on my Mac!
The Java Communications API with serial implementations was abandoned by Sun as well. I couldn't even find it on Oracle's Java Website neither. I couldn't find a download of it at all!
There are a few alternative, like
http://www.sparetimelabs.com/purejavacomm/purejavacomm.php that would be
worth some investigation
Thank you very much for that link. I did take some time to read that, but I didn't see what I needed.
In order to write a ProtocolEncoder and ProtocolDecoder pair to extract/wrap the data required for the Web app I need to see what the structure of a TCP/IP packet is and how it wraps Serial data, and the structure of the Serial data which ultimately contains the Web data I need to parse with an IoHandler.
Unfortunately, I am having no luck finding any documentation or source code to see what those TCP/IP packet and Serial data structures look like. I thought that sort of information would be easy to find.
Basically, I keep hitting dead ends and my boss is ready to flay me alive at our next status meeting!
I knew working with a device with a serial communications port was going to be a headache, but it's turning out to be 10 times that!
Cheers,
Garry Archer
Systems Programmer
Department of Pathology
Yale School of Medicine
Re: Protocol Encoder/Decoder Pair for Serial Data Wrapped in TCP/IP
Packets.
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 4/29/14 5:03 PM, Archer, Garry a écrit :
> Hello All,
Hi Garry,
I won't be very helpful here, as I wasn't the one who worked on the
serial implementation on teh server side.
What I can tell you is that we would be pleased to modify MINA to have
something better than what we have, and that might require to get rid of
rxtx (which seems to be a mess and has a license hich is problematic).
There are a few alternative, like
http://www.sparetimelabs.com/purejavacomm/purejavacomm.php that would be
worth some investigation.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com