I'm begginner in java, I'm writing ("FLASH").getbytes() like this to serialport.
After I'll get FLASH_OK as response, again I've to send file request.
After that I'll get response as FILE_OK then I have ... |
i'm beginner in java technology, I have to read file from port. Frst I'll write "FLASH" to outputstream then I'll get response as a "FLASH_OK" from target device, after getting FLASH_OK ... |
I wanted to use this code to send archives with Xmodem: http://www.java2s.com/Code/Java/Network-Protocol/JModemsimplecommunicationsprogram.htm
In this case, I want to establish a dialup connection between two computers and send a binary file. ... |
I want to send a file from my PC to a remote device connected through serial port. So is there any API in java to send file over serial port?
|
Is there any way how to upload file to embeded device throw Serial port? Im using RXTX, but I thing that I allready only sent data from file, not upload this ... |
i have not done this myself, so this is not gospel, but since you have no other replies, here goes. i would think it depends on whether you have code control of the other program...which i am guessing not. if you have control, get the app to use enhanced versions of the javax.comm classes - there are various ways of "improving" ... |
Hi, After updating to Windows 98 second edition from windows 95, the serial listener I am using (based on the commapi example) can no longer find the serial port. I am getting NoSuchPortException error. I still have the win32com.dll in the jdk1.3 bin directory, javax.com.properties and comm.jar are in jdk1.3 lib. I just can't figure out what went wrong. Can anyone ... |
|
Hello! Im programming an app in Java with a Modem in the serial port. I already know how to make the app read the messages that the modem sends. Ive also created a thread that after some time, it wakes up and looks if there are messages in the serial port. BUT, I would be interested in generate an interruption (or ... |
|
|
|
I can't open my serial port in Java. I know it's ok because other programs can communicate over COM1, but I can't. getPorts(); //get a handle on the ports try { System.out.println("Start reading from serial port"); if (portId.isCurrentlyOwned()) { System.out.println("port is currently owned"); System.out.println("port owned by : " + portId.getCurrentOwner()); } //if serialPort = (SerialPort) portId.open("ForeRunner201Loader", 10000); System.out.println("Step 1"); inputStream = ... |
Hi, ive only just started programming in java. My FYP involves getting gps info over serial port and searching the data rxed for time etc. I've managed to get SImpleRead working for the GPS im using so it reads everything in fine. I have to search through the sentences (input) received now for the word $GPRMC and im having great difficulty. ... |
I had serial port IO going a while back but now I can't find any ports. 2 things have changed that I can think of: 1) upgraded to Win XP home SP2. I've heard SP2 interferes with programs accessign the net etc. Anyone heard of issues with getting to com ports. 2) Now using Java 1.5 with eclipse. The code I'm ... |
|
I have an app in which I need to communicate some data( an int array ) over a serial port connection. The way I need to do this is first send the first item of data and then wait for an echo from the device connected to the serial port and then send the subsequent items of data. So each item ... |
Good day! I have made a program that reads data from a machine. When I deploy it for the first time, it gets the output successfully. But when I click the button so that I could get the data again, it doesn't read anymore. ControllerServlet.java import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import com.stripmap.ReadWriteC; public class ControllerServlet extends HttpServlet { public void ... |
|
public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { int nBytes = inputStream.available(); System.out.print("have " + nBytes + " bytes"); while ... |
Based on all the reading I have done there are two approaches to two-way communication with a serial port device --1) Lock Step and 2) Serial Events. The device I am coding against has three basic command sets, 1) send return wait for 1.2 seconds for response if no response send again (try a couple of times); 2) send a command ... |
Hi All, I am trying to write java application which read/write data from/to serial port , I have found this application in the net (http://www.captain.at/howto-java-serial-port-javax-comm-rxtx.php) which is a very good example. According to the logs I am able to write into the port but am not able to read from the port.. Any one can help to fix the issue WriteReadSerialPort.java ... |
Hi ranchers, I am Chaitanya, I am working on a GSM based application. The aim is to send message to a mobile from computer. Some user will send a message to my SIM, the SIM is placed in a GSM modem. My java program will alert me on receiving a message. Then I will issue a command to read the first ... |
Hi, I am sending a command to a device to retrieve data from that device.After writing a command to the device i will wait for some time(Response time ---> Thread.sleep(100)) to get the response form the device.But some times i will get the data from the device for that particular response time , but most of the times i won't get ... |
Hi, I used rxtx example(TwoWaySerialComm.java) to open modem in A and B. A use at command connect to B by modem. B can send text to A and B's text display in A's console after connected, but A can't send text to B. I don't know why. Does anybody know? http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.FileDescriptor; import java.io.IOException; ... |
If the computers are Linux (doubt it but it's an idea) you can assign the com port and IP and treat it like you would ethernet, just slower. Then you just need the FTP server and client. I'm not sure if this can be done in Windows though, I've never tried. I remember doing it, but I don't remember how...so it ... |