serial-port

How to send data to external device

Hi All, I have a serial device connected to my computer at com port. I want to send Hex data to this device, what is the best approach to send data to the device. For example I have this data- String hexStr = "02303033434333d3037313131303131323639393130333131303139033f"; What I am doing right now is- byte[] unsignedByte = HexU...

carriage return in minicom?

I need serial terminal for linux. I downloaded minicom, at first I was little bit confuse about user interface and shortcuts. But now I have problem with sending carriage return. I need send "command\n\r". But I am not able to send carriage return or newline character. ...

Problem with comm port in C# application on a laptop

Hi everyone, I am using visual studio 2008 and developing a windows forms application in C# using .net 3.5 I am doing serial communication and on a button click the application getting a list of all the comm ports available. I then scan for the device i am looking for by opening each port in turn, sending my custom handshake request c...

Can iPad communicate with embedded systems via RS232 serial communication ?

I have never used iPad. I am completely new to iPhone and iPad application development. I have a robot which can listen to commands sent to it via serial communication or through Xbee. Can someone tell me if it is possible to write an iPad application that can send commands through COM port? ...

ObjectDisposedException when I abort a thread that's writing to the serial port

I've written an application with a plug-in feature, and if a plug in doesn't respond quickly to a stop request, I call Thread.Abort() on its worker thread. This seems to work most of the time, but I recently discovered that it throws an ObjectDisposedException if the thread is aborted while it's writing to the serial port. With some USB-...

SerialPort Closes Unexpectedly

I have a C# application that uses the SerialPort object to establish a connection between another copy of the application running on another machine with BlueTooth capabilities. The program fairly constantly writes out some ascii data from the main machine, which is then received by the remote machine. The process goes fairly nicely (tho...

Improving a SerialPort Connection

Pretty simple question this time around. I have an application that communicates with another copy of the application on another machines. One application sends a pretty constant stream of data, the other receives it. The code to send data looks like this (where serialPort is an instance of the System.IO.Ports.SerialPorts class in C# .N...

SerialPort.Close() problem - can't shut down the application with the taskmanager!

This is a major issue - I use a serial port in an application here and I poll the status of the attached device by opening and then closing the port again. If the device fails, SOMETIMES the SerialPort.Close() - method NEVER returns and this is really a show stopper. The worst thing is that even shutting down the application using the ...

Serial port library/header file in C for WinCE

Hi, I am a newbie in WinCE application programming. But the starting is not as smooth as expected. I could not find code examples, tutorials to learn from. I could not find a book on WinCE programming. Are all the libraries and header files for winCE same as for windows (WIN32)? I am programming in C. I want to use serial port communi...

IECPort javascript class

So I've never used javascript before. I was sent this code that interfaces with a tty device. I need to port this code to python but there's not a single comment in the entire thing. Is this an internal javascript class or whatever javascript uses? var IEC = new IECPort('/dev/ttyS2'); ...

OS X Vs Linux - Serial port handling

Hello, I am trying to port (or rather customize) a pure Linux application to OS X Snow Leopard (10.6.4). It is an application that sends a binary to a target hardware over the serial port. The app is almost running but i am hit with an interesting problem with the serial port writes. With all the same settings as Linux (115.2k is the b...

How to read from a serial port using xpcom from Firefox?

Hello, I want to use xpcom to connect Mozilla Firefox to a serial port. The final result should be an xpi addon that can be installed on various environments (cross-platform Windows/Linux with Firefox 3.*). Where should I start? I have found an example here: http://forums.mozillazine.org/viewtopic.php?f=19&t=1083965&start=0 , b...

system.io.ports using rtsenabled receiving wrong packet

i am writing a method which sends a particular packet and gets an answer back from an electronic device. I am using system.io.ports with rtsEnabled = true. The problem is that when entering the application the received packet is altered. I am monitoring what is being received using eltima and the packet received by eltima and that by...

accessing COM port using ASP.net : access denied

Hi, I've written a Generic Handler so I can access my server's COM port through javascript. I'm doing this, because I'm writing a Web Interface to an ESP-88 from BOSE, for internal use. The code must be configurable, and I added routines for both TCP/IP support and RS232. In a desktop app, the code runs fine, but in an ASP.net 4.0 App...

Reading remote control signals from java application

hey there can i write a java application that using 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 . while i am pressing buttons on the remote control i don't see any data arrived to my serial port what am i missing here ? sho...

Writing an API to communicate with a device connected on Serial port

I am afraid that several terminologies in my question are wrong. Please bear with me and correct me wherever I am wrong. I have to write a library/program that will provide set of function to operate a card reader attached at Serial Port. Like to eject card that was inserted in it, user will simply have to call in his code, for example,...

Serial port access error in WINE

Hello, I have a setup in which i use a USB serial adapter + some applicationwhich sends and receives data using that serial usb. But this setup which works on a Windows, or even in a VMWare Virtual windows, does not work under WINE. IT transmits data but i cannot receive data. The cable and the applications are same as in the working an...

Disposing serial port object

I'm writing a small piece of code that would determine which serial ports on a computer are free for connection. This is done by looping through the different serial ports and calling the Open() method. If an exception occurs, this indicates that the port is unavailable. However visual studios is telling me that I'm not disposing of the...

Why can't this code open a serial port?

Public Class my_class Dim WithEvents COMPort As New System.IO.Ports.SerialPort Public Sub FindReader() Dim ports As String() = IO.Ports.SerialPort.GetPortNames() Dim port As String For Each port In ports MsgBox(port, MsgBoxStyle.OkOnly Or MsgBoxStyle.Exclamation, "Serial port detecetd") Next port If COMPort...

SerialPort.BaseStream.BeginWrite & BeginRead questions

I'm having some issues trying to figure out Async communication on a serialport object and was hoping to get some help. I'm still learning Async stuff so be gentle:)    I basically need to make sure that the buffer isn't full prior to writing to the serial port and also all data has been read before any more data gets written to avoid ...