Hi, I found very annoying the fact that the SerialPort class in the .NET Framework doesn't allow to set the rts control to TOGGLE.
There is a property called RTSEnable that lets me control directly the status of the RTS signal, but in a Compact Framework app there is not much precision to make it work well.
Another solution can be to w...
Hi all
I have a GPS from u-blox.com with a USB-connection and driver. The driver installs a virual COM port that pops up when you plug the USB in. Using a hyperterminal I can then watch the flow of data from the GPS.
Then I want the data in my program, not so easy...
I have implemented some methods using the serialPort class to read f...
I have a c# winforms program and it opens up a serial port. The problem happens when the end user unplugs the usb cable and then the device disappears. After this the program will crash and want to report the error to microsoft.
Is there a way to capture this event and shut down gracefully?
...
To send a serial string character to the serial port. I would need to call WriteFile(handle, "A", strlen("A"), ...)
However, what if I want to specify and send a hex or binary number? For example, I want to send WriteFile(handle, 0x41, sizeOf(0x41), ...) ?
Is there a function that allow me to do this?
...
Vista SP1
Visual Studio 2008 SP1
.NET 3.5 SP1
C#
I have a winforms app I'm playing with that uses a SerialPort object as a private variable. When the application is compiled and executed, it works great. It also works running in debug mode wihtout any breakpoints. 90% of the time when I stop at a breakpoint and try to step through code ...
Hello everybody,
I am trying to use a RS-232 serial port on my PC with javax.comm class. I am newby on that API, so first of all I go through the documentation and I find out that the first thing you should do is "list" all the ports from the class CommPortListener and pick up one of them.
That worked just fine! Problem is, now, that m...
I have a GSM modem connected via USB. The modem creates 2 serial ports. The first is automatically attached to the modem, the second shows in Device Manager as "HUAWEI Mobile Connect - 3G PC UI Interface (COM6)"
The second port is used to get vital information from the modem, such as signal quality; to send and receive text messages; ...
Ok, one for the SO hive mind...
I have code which has - until today - run just fine on many systems and is deployed at many sites. It involves threads reading and writing data from a serial port.
Trying to check out a new device, my code was swamped with 995 ERROR_OPERATION_ABORTED errors calling GetOverlappedResult after the ReadFil...
I'm looking for SMS library that is written in c#, anyone the best library for it and it's free ? I can find more than 1 in Linux, but I'm can't found anything that is written in c# and free
...
Hi,
I am trying to create a serial port in VB.net using code only. Because I am creating a class library I cannot use the built-in component. I have tried instantiating a new SeialPort() object, but that does not seem to be enough. I'm sure there is something simple I am missing and any help would be greatly appreciated! Thanks!
P.S. ...
I have an application which is .NET 2.0, running on Windows XP Professional. This app uses the Serial Port to communicate with some custom devices.
For some reason, a few of our custom built PCs have an issue with the Serial Port, where it will stop functioning after a few weeks of use. Other that auto-reboots, which won't work in my ...
I am using a program that talks to my COMM port, but I have made another program that I want to "sniff" the comm port messages and perform it's own actions against those messages in addition. Is this possible in .NET c#?
...
when reading data through serial port
VARIANT data;
BSTR k;
if(m_mscom.GetCommEvent() == 2)
{
data = m_mscom.GetInput();
k = data.bstrVal;
}
What is BSTR k; and
what do you mean k=data.bstrVal? What is bstrVal?
...
I am working on a Windows utility program which communicates with some custom hardware using a standard COM port. The communication protocol (which is out of my control) requires me to transmit and receive raw 8-bit data bytes.
I am currently using the following Windows API function to send data to the COM port:
WriteFile(hFile, lpBuff...
I'm a beginner in Java. I'm reading data from the serial port. I got
serialPort.setSerialPortParams(
9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
What is the meaning of 9600, DATABITS_8,STOPBITS_1 and PARITY_NONE?
...
Hi,
I used pole display(E POS) in my POS c# application.I have two major problem in that,
1. I can't clear the display perfectly.
2. I can't set the cursor position.
I used some dirty tricks to do these.But I am not satisfied with that code.The following code i used.
Code :-
class PoleDisplay : SerialPort
{
private ...
I'm working on an App that talks to a serial port, and on my development machine, I'm running Vista, and that serial port is a Bluetooth connection. Occasionally, the serial port gets caught in a state where my App can no longer connect to it. In .net I get an IOException with a message reading "Element not found."
I've tried restarti...
I have a usb serial adapter that plug and plays at COM9 or higher on many systems. A third party package I am using in my software can only connect up to COM8. Is there some way to set a COM9 down to a lower port using WMI or something? I know I can do this in the port settings dialog in device manager, but it's easier for my end users i...
I am planning on re-writing a Win32 application (native C++) in .NET - most likely using mono so I can run it on Win32, Linux and mac. The problem I am trying to solve (having only really developed for Win32) is an issue with the serial port definition. How does one typically identify differences in platform when there is only supposed...
I asked this question:
http://stackoverflow.com/questions/434494/serial-port-rs232-in-mono-for-multiple-platforms
and this one is related:
http://stackoverflow.com/questions/304986/how-do-i-get-the-friendly-name-of-a-com-port-in-windows
But I want to be able to get the "friendly" name on Windows- and possibly also on linux /mac if ther...