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.
Related
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.
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
I'm trying to connect a Flash AIR application with a Java server using UDP DatagramSocket, but I don't have a clue how to do it. Can someone help?
You should use DatagramSocket class.
Here you have video called ADC Presents - Discover the UDP API in Adobe AIR 2. This helped me to work with UDP in AIR, so I hope you'll find it usefull too.
I'm new to networking and was wondering a way to find out from an android phone java app whether there is an application running on any computer on a wifi network it's connected to and a point in the right direction on what to google or a tutorial?
edit: The application I'd be finding would have been made to be found by the android app
Thanks,
Harold
You should use a UDP broadcast. Basically, a server announces its presence periodically on a local network with broadcast packets. A client then picks up on these packets, finds the source and connects to it. A networking library like KryoNet (available for both J2SE and Android Java) makes it much easier.
InetAddress address = client.discoverHost(54777, 5000);
System.out.println(address);
usually application discover their peers in the same network using UDP broadcasts, maybe thats what you are looking for. this requires the app on the lan to listen on a specified port, the phone (or whoever is looking for that app) sends a udp packet to that port on the broadcast address (255.255.255.255), and the app replies with its individual ip address. not sure if that is what you are looking for and if its possible with android
Can I write a java application that uses RxTxComm
to get signals from a remote control send to my serial receiver?
I have a RS-232 receiver I am listening on that com port for incoming bytes.
When I press any button on my remote control I don't see any data arriving to my serial port.
What am I missing here?
Should I see any data?
How does lirc do it ?
It is sovled here: http://commjava.blogspot.com/ have a look at it. (Be aware that they use proprietary third party code)
Lirc is not in java, their solution won't help you.