USB - RS232 communication - java

Is it possible to send data from a USB port to a RS232 using java code?
The RS232 is a port on FPGA board and the computer(via USB) is used to send these data.

You can send data to a serial port from Java using a library like PureJavacomm, or RXTX. The latter is a bit of the de facto standard for Java, but has some quircks, while the former is actively developed and seems to work on all current "major" platforms (personal experience).

Related

UDP packet capturing on a servlet application running at GAE

I have a code running in router that sends UDP packets(using Sendto() function and a string of data) to a particular server whose IP address and port number I will mention in my code.
I want to deploy a server application that could receive a UDP packet and store its information on server or somewhere else not sure right now.
I have decided to use Google app Engine for hosting my server side code which most probably will be having something like recvfrom() function to receive string.
So how and by using what API's can I start developing my server side code.
Google App Engine has a Preview release of a Socket API, but it does not let you create listening sockets. See Limitations and restrictions section at https://developers.google.com/appengine/docs/python/sockets/
You cannot create a listen socket; you can only create outbound sockets.
You can use Google Compute Engine to run any reasonable software on Google's cloud platform, including programs that receive UDP datagrams. You must always pay for Compute Engine instances.
According to the newest edition of App Engine Socket docs for Java, if you're using java 8 runtime you should be able to use java sockets without limitations:
Applications in the Java 8 runtime default to using native Java
sockets with no restrictions: Google recommends that you keep this
default.
That means that it should be possible to use java.net.DatagramSocket or java.nio.channels.DatagramChannel freely to work with UDP.

Java Interface with serial port

I am looking for a library interface to allow me to check what has been posted to a serial port.
To be more precise, I am using a teensy 2.0 to interface with a button. I want to run code within the program without simulating a key press, and thought that printing something to serial would be a easy way to connect to the Java program.
I've once used RxTx library to establish a communication channel between PC and an external MCU via USB port. Worked fine : )
For my self I'm using the jssc library to communicate with the serial port and it's working fine and I here it'll stay that way here's the link : http://code.google.com/p/java-simple-serial-connector/downloads/list

Serial Communication support for windows in java

I need a package for communicating with a electronic console via usb-2-rs232 cable. I got a package called RXTX, but i am not still satisfied with this package. Is there any other alternative for serial communication under windows??
For Serial Communication we can alos use the Labview software,in his builtin example there is serial communication module.
You can also does serial communication by using hyperterminal.set the default parameters for serial commuinication.
RXTX is also an open source
I would like to recommend you Java Serial Port from serialio.com In java there is java serial API
which you can use

Sending commands from iPhone to Android

I need to send some commands using the wireless network from an iPhone application to an Android application. I thought a possible way would be to send the commands as strings over TCP (SOAP seemed a better solution, but it seems some libraries would be necessary and it is not necessary). Is there anyone out there who can address me to some documents or some place to start this kind of applications?
Thanks!
The simple answer to this question is that you need to listen on a specific port number by opening a Server Socket on the Android side, and from the client side (iPhone) open a socket connection towards the Android's IP address and port.
Luckily sockets are a pretty standard thing nowadays and behave typically the same across operating systems, that is Linux, Windows, Mac OSX, and iPhone iOS, Android and Symbian.
The only difference you have is which programming language you need to use. On Android you have to use Java. So if an Android application is waiting for the connection your application needs to open a ServerSocket and listen of incoming connections.
From the iPhone part, your application needs to be developed in Objective C. Nothing fundamentally different, but the programming language is different.

Java and USB-to-COM

I want to develop a Java application to communicate with the device based on Xilinx Spartan 3E Starter Kit.
The board is connected to my PC with USB-to-COM cable (COM is on the board).
What I need is to send some sequences of bytes to the device and than receive the response from it. It is the same way the serial terminals (hyperterminal, minicom, etc) do.
I'm kinda new to Java, so what classes do i need to implement this?
I'm not exactly sure what you mean by "USB-to-COM". Do you mean that the USB connection is accessible as an RS232 serial port on the PC (aka COM port on windows) ?
If so, you should look at the RXTX library here: http://rxtx.qbang.org . It provides support for Java serial port communications on a number of platforms. If you are new to Java, you might not find serial port programming the easiest way to learn Java, but the examples included with RXTX should be clear otherwise.

Categories

Resources