serial-port

Serial Port and ObjectDisposedException Safe Handle has been closed

I am receiving data from a device that's sending information over the serial port and I get this exception: "ObjectDisposedException Safe Handle has been closed". It may happen within seconds to several minutes and there doesn't seem to be a pattern. Another thing that happens is that it will stop receiving data with no exception and I...

grep 5 seconds of input from the serial port inside a shell-script

I've got a device that I'm operating next to my PC and as it runs it's spitting log lines out it's serial port. I have this wired to my PC and I can see the log lines fine if I'm using either minicom or something like: ttylog -b 115200 -d /dev/ttyS0 I want to write 5 seconds of the device serial output to a temp file (or assign it to ...

Console CTRL-C handling when using serial port fails

Using VB.Net I've added a CTRL-C handler: AddHandler Console.CancelKeyPress, AddressOf QuitHandler Which does the following: Private Sub QuitHandler(ByVal sender As Object, ByVal args As ConsoleCancelEventArgs) Console.WriteLine("Quitting...") args.Cancel = True Quit = True End Sub I then have a main l...

how to read data from serial port in vb.net ?

I am trying to read data from rfid tag using rfid reader. i can connect reader, but cannot get data? ...

Change COM port via registry, command line or software?

Hi. Does anybody know how to change the COM port number that Windows maps to a USB virtual COM port? You can change this via the Device Manager and clicking on the Advanced button.. but how can you do this via an API, registry change or commandline operation? Any ideas please? ...

java api to send file through serial port

Hi geeks, 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? ...

GUI for serial port using java

Hi geeks, I am explaining my full problem. So I am building one GUI for a device connected to my PC using serial port. I am using javacomm apis and eclipse as my tools. For writing data to serial port I am using thread and for reading I will use a thread or EventListener. So now my question is if I am sending any command to serial port ...

How do I know a program exited, from serial console perspective

I have a program that communicates via serial port to the target. The target is likely a shell or similar program. In case I want to send several commands to the target, how can I know a command is end so that I can send the next command? I have had some ideas, like catch the shell prompt or let the command output some text before exits...

Difference between 32bit <> 64bit and serial communication

Hi, I'am using the Rs232 Class Library in a vb.net application to print text to a POS printer. in the last week some of our clients have upgraded their system to Windows 7 x64 bits versions and start to fail when they print text via COM to the printer. Can anyone help me regarding this? Is there anything special you have to do with a 64b...

RS232 question - how to read weight to PC

I have a scale that connect to PC through RS232, I send "W" to receive the weight. The scale sends the weight all the time as it's read. How do I catch the weight that is being read? Can i get any C# sample code? ...

Linux: multiple-SIGIO problem (async serial communication)

Hi all. I'm esperiencing a SIGIO-related problem in a C++ program I'm working on. Platform: Linux 2.6.30, x86 Arch Scenario: async serial communication. I followed this async-communication example from the Linux Serial Programming HowTo and it worked flawlessy. Then I removed the "sleep+check wait_flag" thing and now I handle the r...

SerialPort timeouts in standalone mode

I have a strange behaviour im my app. I open a COM port to comunicate witha a device over Bluetooth. I do the following steps: Open the virtual COM port; Switch remote bluetooth to command mode; Perform few commands (eg. read remote device's serial number); Switch remote bluetooth to data amode; Send data to device; Read a byte of ans...

Read weight of package from a Fedex scale within web application?

I've been asked if I can read the weight from a scale, connected via RS232, and dump it into a web application. Reading the weight of the scale from the local machine isn't bad (this SO question gives an explanation: http://stackoverflow.com/questions/2038387/rs232-question-how-to-read-weight-to-pc), but... How do I then get that data ...

Trying to open a serial port with pyserial on WinXP -> "Access denied"

I'm trying to send data to an hplc pump via the serial port using python and pyserial. I tested the cable and the pump under linux (a gentoo derivative), where it worked perfectly, albeit as root. Now i have to use the code on a WinXP machine, where i always get an "Access denied" error when trying to open the port (i adjusted the parame...

SerialPortEventListener from another class....

basically my program should display a frame in which a panel draw a point on the screen according to "input" data (integer values) coming from a serial connection on my pc. The problem is: how to "transfer" values from the serial port to the OTHER class Frame and call the REPAINT() method?????????? Given that via console I receive ever...

How can I find out a COM port number of a bluetooth device in c#?

Hi! My company developed a device that communicates with a PC via Bluetooth using a virtual COM port. Now we need a user to pair a device with a PC (MS Windows OS) first and then enter it's com port number manually into our application(I bet 95% of users will fail on this taks). So I'd like my application to present a user with a lis...

serialization of function/api calls (at a target) over some transport

I have set of api's to be called over a transport (say for eg RS232 and some other transports). Essentially the calling side runs on a host and sends something like this: (func_name, param_1, param_2, param_3) over the RS232 link and a bit of code at the other end does the actual function calling. To transfer the function name and par...

How do you simulate a serial device?

I am working on driver that talks to a device via a serial port in C#. I do not always have the device available to do physical testing with. Is there a way I can simulate a device on a serial port so that it responds in an ideal manner? ...

"Connection reset by peer" exception when connecting android g1 to rs232 adapter

Hi all, I'm trying to connect my android G1 phone to an rs232 adapter but continue to get a "Connection reset by peer" exception. I have the right UUID set up (00001101-0000-1000-8000-00805F9B34FB) but continue to get this exception. Unfortunately, there doesn't appear to be any stacktrace in eclipse. Any help would be greatly appreci...

How to set baud rate to 10400

Is it possible to set the baud rate to 10400? (Using .Net) ...