serial-port

RS-232 for Linux and WIN32 cannot receive data on Linux

I am trying to receive characters from an Arduino board on linux, but this library returns no characters. The code: #include "rs232.h" #include <time.h> #include <stdio.h> void main() { int res = OpenComport(16, 9600); printf("Open port result: %d\n\n\n", res); unsigned char *buf; while(1) { int n = PollCompor...

Submitting "operator commands" (e.g. remaining cash SIM credits) via AT commands to GSM phone/modem

Howdy overflowers! I'm a bit stuck investigating the how-to's of sending operator commands (dont know the correct technical term) using my GSM modem, in order to get an "alert" type message response from my network operator. Response characteristics are of course operator+command specific, but I figure they're used in similar ways regard...

Writing to COM port on C# or python

Hi, im trying to write a string to a COM4 which is a usb-serial adapter using Visual Studio C# and got the following error: Access to the port 'COM4' is denied. My program is extremely simple: serialport.Open(); serialport.WriteLine("test"); serialport.Close(); I also tried using pyserial with python and got: Traceback (most re...

C++ Serial Communication

I'm running Ubuntu 9.10 and I seem to be having trouble with termios. So I can start minicom open the serial port at 57600 Baud, 8N1, no hardware or software flow control and it works great. I type in @17 5 and my device responds. When I try to set up my serial port in my C++ code I don't get a response. I know that the software is com...

Controlling Pioneer DVD-V5000 DVD Player via 9-Pin RS-232 Serial Port

All right, let me preface this by saying: I'm not completely confident this is programming-related. I'm trying to use software to solve a problem, but the software I actually trust; I suspect I'm doing something wrong with the hardware. However, I don't know where else to ask this question. Superuser already shot me down, and the Gad...

How to use the COM port for switching

Can anyone point me in the right direction as to what is all involved in developing an interface that will use the COM port to switch a set of dry contacts on and off? I have an application that I am developing at present that needs to control an external switch that uses wires. The COM port should switch between a short and an open. C...

I need an efficient way to process a backspace in a C# text box.

I have a GUI that has a text box that is used to display the output of a device that is connected to a serial port. There are times when that device will output a "ticker". This is a sequence of character-backspace-character that results in the appearance of an analog clock's hands turning using the characters '|', '/', '-' and '\' alo...

Modify COM Port device name at runtime (Windows)

I'm not sure if this is possible but my requirement is this. On startup, my application swaps COM1 to COMV1, listens to the output interprets the data and passes it through to COM1. On shutdown, my applications swaps COMV1 back to COM1 so applications can continue to use it as normal. Thanks for any help, Richard ...

Twisted's Serialport and disappearing serial port devices

Hi, I'm using twisted.internet.serialport to have my program be continuously connected to a device on a serial port. Unfortunately my serial port is just a usb device, which means it can be disconnected or reset by the OS at any time (port 2 disabled by hub (EMI?), re-enabling... ). I see that pyserial has support for this for a few we...

Preventing .net serialport crashing on FTDI USB device disconnect

I have an application which is supposed to communicate with multiple custom devices, some of which use FTDI USB-to-serial converter chips, and some of which use TCP. The application needs to be able to accept data at any time, from devices which may be plugged or unplugged at any time; the application serves as a bridge between devices ...

PHP : Access to Bluetooth GPS via Serial Port (SPP) COM3

Hello, how can I access to my Bluetooth GPS via Standard Serial Port (SPP) using PHP in Windows ? Thanks. ...

SetCommState failing on Windows 7

We have code that talks to our USB COMM class device, which works fine under Windows XP but is failing under Windows 7. Specifically the call to SetCommState is failing. Here's a simplified snippet. Note that in this case we don't even change any fields from GetCommState, but the result is that SetCommState fails with an error code of 87...

How to monitor RS-232 PC port1 (i.e. COM1)?

I have a Microcontroller Development board that is connected to my PC via RS-232 DB-9 serial COM port (whatever one you want to call it). The Micro has built in monitor code that uses functions like printf() and putchar() to produce console output on the PC side monitoring application. I want to use this output functionality to transmi...

USART transmit problems on a PIC

I'm trying to send data to an SD card from a PIC18f4580, but the PIC is not sending what it should be. related global variables: unsigned char TXBuffer[128]; //tx buffer unsigned char TXCurrentPos = 0x00; //tracks the next byte to be sent unsigned char TXEndPos = 0x00; //tracks where new data should be put into the array I am adding ...

Port communication

I have a USB Modem connected to my PC with a SIM card inserted. I want to write a C# application to send SMS through the modem can any one help me with this??? another question..I have heard about serial port communication...Is there some thing called as USB port communication??? ...

Readline from Serial Port locks up

I am trying to read data from a scale RS232 interface. It sends a continuous ASCII string stream through the Serial Port which I am having trouble getting. I just want to get one line of the data that it is sending out. I guess I assumed that I would use Readline to get the data, but it just locks up the PC when I run it. I think it ...

.NET 4 Serial Port ObjectDisposedException on Windows 7 Only

This is a problem I used to have all the time with the serial port class in .NET 2.0. It was suggested that upgrading to .NET 4 would fix the problem... and it did in almost all cases. If I am using the serial port class built-in to .NET to communicate with a USB-to-serial adapter, and the adapter is unexpectedly unplugged while the po...

App designer in GUI format

Hi All, My first post here so please be gentle. I have only just started looking to ios programming after working in the automation systems programming world for a while. it strikes me that there are no fast build program interfaces out there. the closest to what i have been looking for comes from CommandFusion but their GUIdesigner sof...

Mac Command Line - List Available Serial Ports?

on my Mac, i currently have the available serial ports: /dev/tty.usbserial-A700dYoR /dev/cu.usbserial-A700dYoR /dev/tty.Bluetooth-PDA-Sync /dev/cu.Bluetooth-PDA-Sync /dev/tty.Bluetooth-Modem /dev/cu.Bluetooth-Modem is it possible to retrieve a list of the available serial ports of the computer from the command line (terminal)? ...

Sending bytes to serial port from UNIX command line?

i would like to send a stream of bytes to a serial port using the command line. is this possible? my serial port is at /dev/cu.usbserial-A700dYoR on my Mac. for example, if i wanted to send the integer 50 or the string "data" to that serial port, how can i do that? my knowledge of UNIX is very limited. ...