serial-port

How to unlock COM port

Hello, I've a application that must work after another application. This second application has a bug that causes COM ports not to be closed in specific circumstances. I would like to close all COM ports programmatically in my application to ensure, that there will be no bugs about close ports reported. Is it possible if I do not own o...

Serial port, equivalent of "full duplex" flow control?

I have a document with connection information to a device over a serial port. It specifies "full duplex" as the setting for flow control. Under Windows, I have the following options for setting up the flow control: Xon/Xoff Hardware None What is the equivalent of "full duplex" in the above list? ...

How to do robust SerialPort programming with .NET / C# ?

I'm writing a Windows Service for communication with a Serial Mag-stripe reader and a relay board (access control system). I run into problems where the code stops working (i get IOExceptions) after another program has "interrupted" the process by opening the same serial port as my service. Part of the code is as follows: public parti...

What's the easiest, most practical way to toggle several lightbulbs with a PC?

This question is mainly electronics related, but it also has a programming aspect. Some background on the problem We have a traffic light on a wall in our office. When people come in to the office, they can immediately tell from the traffic light whether last night's automatic build & test runs went smoothly: Green means all tests pass...

How do I perform a nonblocking read using asio?

I am attempting to use boost::asio to read and write from a device on a serial port. Both boost::asio:read() and boost::asio::serial_port::read_some() block when there is nothing to read. Instead I would like to detect this condition and write a command to the port to kick-start the device. How can I either detect that no data is availa...

How to correctly use .NET2.0 serial port .BaseStream for async operation

I am attempting to use the .BaseStream property of the .NET2.0 SerialPort to do asynchronous reads and writes (BeginWrite/EndWrite, BeginRead/EndRead). I am having some success in this, but after a time, I notice (using Process Explorer) a very gradual increase in the Handles the app is using, and occasionally an extra thread, which als...

SerialPortCommunications

am trying to create a GUI for a c code written in LINUX. this code basically connects two systems,opens the serial port,writes data from one system to the other via the port.how do i go about this? the development tools present with me are Qt designer version 3.3.5 and K Develop,which one should I use.and how to go about it? am a total b...

How do I use dataReceived event of the SerialPort Port Object in C#?

Hi All, I am attempting to create a small application to collect data received from an external sensor attached to COM10. I have successfully created a small C# console object and application that opens the port and streams data to a file for a fixed period of time using a for-loop. I would like to convert this application to use th...

Binary data with pyserial(python serial port)

serial.write() method in pyserial seems to only send string data. I have arrays like [0xc0,0x04,0x00] and want to be able to send/receive them via the serial port? Are there any separate methods for raw I/O? I think I might need to change the arrays to ['\xc0','\x04','\x00'], still, null character might pose a problem. ...

.NET Library to access the COM Port?

Is there a library that would allow me to send and receive data on a Serial COM port? ...

How do I read text from a serial port?

I am trying to read data off of a Windows serial port through Java. I have the javax.comm libraries and am able to get some data but not correct data. When I read the port into a byte array and convert it to text I get a series of characters but no real text string. I have tried to specify the byte array as being both "UTF-8" and "US-...

Two Modems, two SerialPort objects in C#

I have two Conexant fax modems, and a C# app with two serialPort objects setup to listen for incoming data on both comm ports. Here is how I initialize each modem: m_SerialPort = new SerialPort("COM3", 2400); m_SerialPort.DataReceived += new SerialDataReceivedEventHandler(this.ReceiveChars); try { m_SerialPort.Open(); m_Serial...

Error opening serial port

I'm trying to open and read from a serial port using the System.IO.Ports.SerialPort class. I dragged the serial port from the tool pane (VS 2008) on to my windows form. I've got a property grid set up so I can easily change properties of the serial port at runtime. When I try to open the port, I get the error shown below. I don't under...

good serial port class for the .net framework?

Does anybody know of a good (hopefully free) class to replace the .net SerialPort class? It is causing me issues and I need one that is slightly more flexible. See my other thread about my issues, but essentially I need to suppress the IOCTL_SERIAL_SET_DTR and IOCTL_SERIAL_CLR_DTR commands from being issued when I open the port, so I n...

Open a socket using CreateFile

We've got some old serial code which checks whether a serial port is available simply by opening it and then closing it. Now we are adding network support to the app I want to reuse the function by supplying the ip address as a string. /** * So far I have tried: * A passed in portPath normally looks like: \\?\acpi#pnp0501#1#1#{GUID} ...

boost::asio::serial_port reading after reconnecting Device

I have a problem with the boost::asio::serial_port class reading from a GPS device (USB-Serial). Connecting the device and reading from it works fine, but when I disconnect and reconnect the device, read_some doesn't read any bytes from the port. As boost doesn't seam to detect that the serial port is gone ( is_open() returns true ), I ...

read file from serial port java

Hi, 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 read file up to end of the file. I'm not getting how to do this process plz help me. Thanks for reply ...

Reading file from serial port in Java

Hi, 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 as response then again i have to write name of the file which i want,but problem is its not writing file name to outputstream, below is my code. Plea...

What is the best way to access a serial port from VBA?

What is the best way to access a serial port from VBA? I have a need for some of our sales reps to be able to send a simple string over the serial port from an action button in PowerPoint. I don't commonly use VBA, especially for anything like this. Normally I would turn it into an application of some sort, but I actually don't think th...

unsatisfied link: SolarisParallel using rxtx to replace java comm api in Windows XP

Hi everyone, i'm trying to use the rxtx 2.0 jars and dll to use the java comm api in windows xp, i copied the RXTXcomm.jar to jre\ext and rxtxSerial.dll and rxtxParallel.dll to jre\bin When I run the program I got the following error: Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library....