how to read virtual serial port of MIB520 - java

i need to read from my Pc the serial port that connected with MIB520 usb board ?
if i know the sequence of the data received byte by byte then can i use C# or any tool to read this port ??
i have iris and MicAz motes that read gps packet then they send them to the mote which attached to the MIB520 usb board.
note: that MIB 520 use two virtual ports,it use FTDI FT2232C

This is a pretty general question about connecting to serial ports via USB, so I'll point you to some sources of general information.
First of all, your machine will need to have the FTDI drivers installed.
If you want to manually interact with the serial device by typing commands and reading responses, you can use a terminal emulator like minicom or gtkterm. This question has some related information in the answers.
If you are looking for a java serial library, there are several you could try:
RXTX
serterm: An example project built with RXTX
javax.comm
jSSC

Related

Create virtual serial port programmatically

I want to create virtual serial port programmatically in c#,delphi or java and use this port for printer port. so this should created in ports(com & LPT) in device manager. but com0com create a new branch in device manager like "com0com - serial ports emulator" and does not display this port in printers ports list.how can i create virtual serial port programmatically that i can use this in printer ports.
Basically you cant in any of the languages you tagged .
In essence, you will need to write a device driver (i believe Delphi had a port for the DDK at one stage). Although this is not impossible, given the very fact that you asked this question here i'm guessing its a little bit above your level and a steeper learning curve than you might anticipate.
However, there are plenty of com port emulators floating about if you need to test against something. Just search google.

ASTM 1381-02 Serial Interfacing with Medical Lab equipment

Has anybody successfully interfaced Medical Lab devices like Cell Counters /ABG instruments to mirth connect using ASTM 1381-02 or similar protocols over serial port. I am working on a small project. I need the data transmitted by the machine in ASTM format to a text file/ to a database and I cannot afford to pay $30000 for mirth commercial support. I need a low cost or open source solution.
I was expecting MLLP listener to be off use but it seems to work with TCP and I have to make it work purely on serial communication.
Secondly
I tried writing ASTM serial data receiver in Java. But control characters such as ACK, STX, ETX, ETB, and other delimiters are not visible in terminals be it in Win 7 cmd or Netbeans/Eclipse console. Making me helpless in parsing the data.
Any help will in right direction be deeply appreciated.
If you are under Linux environment you may use COM port redirector to a given TCP port and use Mirth's TCP Listener to intercept that flow.
E.g., to pipe the serial port through netcat:
netcat ipaddress port < /dev/ttyS0
Or using socat:
socat pty,link=/dev/virtualcom0,raw tcp:ipaddress:port&
(check for correct parameters)
I recognize 2 problems:
First, is it possible to raise an ftp service on the windows PC? if so, you only need to create a file reader addressed to ftp to capture the txt with the ASTM.
Second, to determine the characters of start and end of message I recommend you read the information of the provider, if you do not have it available, I suggest you use notepad ++ to see the hidden features. I hope you help.
Just FYI there is a commercial extension available that provides ASTM E1381 support: https://www.nextgen.com/products-and-services/integration-engine?extension=astm-transmission

Automatic detection of Arduino COM port in JAVA (preferably via JSSC)

I wonder if there is a way to somehow automatically find a COM port which Arduino device is connected to. (Like it is done in Arduino IDE)
I have a piece of code which is working with Arduino via serial communication (using JSSC library) and it is quite frustrating I have to manually set COM port number every time.
Is there a way of either autodetect of the correct Arudino COM port or maybe communicate with Arduino via other ways, like HID device communication? (Dunno.)
Thanks in advance for your answers/ideas.
Serial communication manager have APIs to find serial port names like COMxx dynamically. Just connect your USB-USRT IC and SCM library will tell you the device node for it. Just google for Serial communication manager. It is hosted on github.

How do I communicate with a RS232 serial port on a remote device using TCP/IP?

I have a device connected using a serial port to GC-100-12. I want to connect to it remotely and pass commands to that device and retrieve replies from that device. I am capable of communicating if the device is connected straight to my laptop but I would like to allow for the device to not be physically connected as well.
I am using javax.comm to communicate with the serial device when connected locally.
EDIT:
It appears that the GC-100-12 I am using is an appropriate hardware solution as outlined by David. I simply opened a socket connection along with the port for the RS232 port and passed in commands as an array of bytes and voila!
You must use hardware solution. Something like this.
Given it's quite expensive, you may consider looking at Rasperry PI or even Arduino-based solution.

Get Arduino binary from a COM port using Java

I want to get Arduino code onto a virtual serial port instead of the actual Arduino. The IDE sends binary code to the Arduino through the COM port which in this case will be a virtual COM port and no Arduino.
I want to read and store the code that is being uploaded into the COM port. I have tried several Java libraries (RXTX, jSSC and the gnu.io), but I can't read what's on the COM port as it will always give the exception that it is being used by another application (which is the Arduino IDE). So I want to upload Arduino code on a virtual port and on the other end of this port there is a Java application which can read what is being sent to this port.
Related question: Upload Arduino code on virtual serial port through Arduino IDE.
If a solution is available or easier in any other language I'm open.
At the moment it sounds like you're trying to read and write to the same port with two applications, and expect to get the output of one on the input of the other - it doesn't quite work like that. Think of the COM port as one end of the stream you can read and write to, rather than the stream itself - hence when you tell more than one process (in your case the Arduino and your Java program) to read / write both from the same end, it will fail.
I believe what you're after is a null-modem emulator. Use something like com0com to create a pair of virtual COM ports, where the input on one will appear as the output on another (and vice versa.) You can then go about things relatively normally, writing to one COM port in the pair with the Arduino IDE and listening on the other COM port with your Java program, using jssc, RXTX or any other serial library you choose.

Categories