SerialPort.DataReceived Event HELP Programming Software Development by Magic8Computing Hi, I am new to programming and have attached my code so far, i need to insert the code to read data from serial port but havent a clue where to put it or how any help would be great Imports System Imports System.IO.Ports Public Class Form1 Private mySerialPort As New SerialPort Private Sub … Re: SerialPort.DataReceived Event HELP Programming Software Development by ddanbe You could place the code from the example in the form load event and leave out th console.WriteLines. Re: Serialport does not return any data Programming Software Development by sknake I see a problem right away with garbage collection in your code. Take this portion of your code: [code] SerialPort sp; private void Form1_Load(object sender, EventArgs e) { string[] sps = SerialPort.GetPortNames(); foreach (string pname in sps) { … Serialport does not return any data Programming Software Development by therockey123 I have connected a sensor to serial port of PC and want to read incoming data from Serial port in C#. Below is code snippet. I tried to iterate through all the ports and open each port to check if device is connected to any port so that i can read data from that port. However, none of the port return any data. "sp_DataReceived" event … Re: Serialport does not return any data Programming Software Development by sinnerFA Does your code throw any exceptions? I am looking @ your code and I do not see any port config info (baud, parity, etc...) Check this out: [URL="http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx"]MSDN system.io.ports.serialport[/URL] HTH's... SerialPort Programming issues Programming Software Development by limepebblez Hey guys I'm really stuck in this very urgently needed solution, been working for 3 weeks plus and still can't come up with a working solution! Help needed asap. [U]ISSUE:[/U] The problem is simple. I have 2 PCs. One is 'master', second is 'slave'. On 'master', I have my .NET software installed and on 'slave' a third party software, let's call … Re: SerialPort.GetPortNames() Programming Software Development by Software guy I ran this program by not using a combo box but a command line. And it works fine for me. The code I used: [code] public void serialport() { foreach (string s in System.IO.Ports.SerialPort.GetPortNames()) { Console.WriteLine("{0}", s); }… SerialPort.GetPortNames() Programming Software Development by Fritz.fx Hi all. I'm using this seemingly simple code (from msdn) to fill a combobox with available Com ports but it keeps adding this strange character at the end of it, like so "COM4洐" It was working fine yesterday, but it started doing it after a reboot and no change to the code. [CODE]foreach (string s in System.IO.Ports.SerialPort.… output based on serial port input Programming Software Development by james557 Hola Happy New Year !! ~ im doing this project on C# programming and im stucked on it for many days. What i need to do is to read either '0' or '1' from a circuit ( external circuit board is connected to my laptop via serial port ), and based on either '0' or '1'received, different videos ( video 1 or video 2) will be played. The following is my … Reading and Analyzing Serial Data Programming Software Development by slpefanis Hi All First time I've posted but have done lots of reading on here as it's an amazing resource. I am busy writing a program that is going to read data from 2 serial devices. One being a scale and the other being a "load testing" machine. Currently im working on the code to read data from the scale. I was using the code on the … Hex data conversion in VB2008 Express Programming Software Development by KrisJones Can Somebody please help a newbie ? I`ve searched high and low for an answer, but just can`t seem to get it working ! I`m trying to write a programme ,in VB2008 Express, to receive Serial Port Ascii data ( from a Multimeter) and display it as Hex Data in a textbox. I can get the Ascii data to show, but just cannot convert it into Hex. Once … Using serialport and backgroundworker Programming Software Development by memorex I need to make a project that takes data from a uC through serial port and insert it in some databases. I want to take the data from 5 sensors, i'm sending the data from al 5 sensors once per hour. The problem is that I want to use backgroundworker for taking the data from serial port, and insert in the database and another backgroundworker for the… Visual C# problem, SerialPort DataReceive Programming Software Development by GaryS92 … am have having problems translating this code [CODE]Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO… Recieve from SerialPort from Another Machine Programming Software Development by JOSheaIV Hello everyone, So today I wrote a small little application that reads in the bytes from a SerialPort object. While this worked successfully, it was completely local. The device I was reading from was plugged into my machine. Now, again while that worked, I need to use the same logic to read from a SerialPort object that might be located on … C# Remoting to access SerialPort? Programming Software Development by gumbald I'm having problems with the telnet on a device, so wanting to run a program attached by serial port to the device and then have other machines access this by C# remoting. However, I can't seem to find a way to give the interface access to this local resource after setting it up? [code] using System; using System.Collections.Generic; using … write ctrl+z to managed System::IO::Ports::SerialPort Programming Software Development by chamika.deshan Hi I am trying to write "at" commands to serail port and send sms. `smsPort->Write("at"); // smsport type is System::IO::Ports::SerialPort ^smsPort;` gives me output OK At the end(after the writing message) I need to write ctrl+z smsPort->Write("Message"); smsPort->Write((char)26); this gives me … vb.net serialport Programming Software Development by dre-logics i use vb.net 2012 and a pin terminal on serialport. Everthing works fine (sending en receiving), i want that the communication stop after 500 milliseconds if there no reaction from the terminal , reason pin terminal stopped or serial cable loose . How can i achieve this? This is code i have So far, but code does not work: Imports System.IO.… Re: Recieve from SerialPort from Another Machine Programming Software Development by JOSheaIV So I finally got an update on this. Turns out the device that usually connects to a serial port, is actually plugged into a wireless transmitter. I have an IP Address, but sadly, the SerialPort object can accept that IP, it just complains that when trying to connect it's not valid. So I have this wireless device transmitting, I just need to figure… System.IO.Ports.SerialPort Question!! Programming Software Development by ecloney I am new to vb.net and am using visual studio 2008. I am sending data back and forth using the serialport module. I am wondering if there is a way to send a hex byte, rather than having the module ALWAYS convert everything to ASCII. This is extremely obnoxious, and so far I cant seem to figure out how to avoid this. I am sending this data … Re: SerialPort Programming issues Programming Software Development by AndreRet Have a look at [URL="http://bytes.com/topic/visual-basic-net/answers/461567-using-function-keys-vb-net"]THIS[/URL] link. The coding will be something like - [CODE]Private Sub Form1_KeyDown( _ ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyEventArgs _ ) Handles MyBase.KeyDown If e.KeyCode = Keys.F2 Then MsgBox("F2 … Re: SerialPort Programming issues Programming Software Development by limepebblez [QUOTE=AndreRet;1394688]Have a look at [URL="http://bytes.com/topic/visual-basic-net/answers/461567-using-function-keys-vb-net"]THIS[/URL] link. The coding will be something like - [CODE]Private Sub Form1_KeyDown( _ ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyEventArgs _ ) Handles MyBase.KeyDown If e.KeyCode = … Re: Eject and re-detect serialport without unplugging it Programming Software Development by Begginnerdev This will be a really ugly method of doing it, but this may do what you wish. Private Function ResetSerialPort() As IO.Ports.SerialPort Try For Each sPort As String In IO.Ports.SerialPort.GetPortNames() Dim spMyPort As New IO.Ports.SerialPort(sPort) If spMyPort.IsOpen Then spMyPort.Close()… Re: Send correct ascii to serialport Programming Software Development by procomp65 I am developing the software for the manufacturer and he needs a \004 to trigger an event in the microcontroller. If I press alt 004 in tera term and hyperterminal it works. I need to emulate that same sequence or character or byte to beable to communicate with the device. If you enter a "Alt 004" at the cursor on these 2 terminal … Re: Reading text from textbox and passing to serialPort Programming Software Development by Ketsuekiame Unfortunately, there's nothing communicating over your COM1 port. However, you might be able to get a list of the com ports available on your machine and then select the correct one for your device. `SerialPort.GetPortNames` will return a list of com ports to you. But you might need to do some registry queries to get the right com port by the … serialport in win32 console Programming Software Development by arunkp i need to send at or atx commands to mobile using c or c++.please tell me how to send it in win32 console?which fn &header file is used for this purpose? thanks in advance. Re: Visual C# problem, SerialPort DataReceive Programming Software Development by GaryS92 After some research, [CODE]private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e) { string inchar = string.Empty; string IDstr = string.Empty; string Datastr = string.Empty; Int32 result; inchar = SerialPort1.ReadLine(); IDstr = inchar.… Re: Recieve from SerialPort from Another Machine Programming Software Development by SalmiSoft I think you'll need to have some software running on the machine which physically has the serial port. You could write that software yourself, or buy it (eg http://www.advancedvirtualcomport.com/index.html). Re: Recieve from SerialPort from Another Machine Programming Software Development by JOSheaIV Yeah I assumed I might, any idea how I would got about though writing it? I know how to use the Serial Port, but is there anyway to pull that data from another machine using say an IP address? Re: Recieve from SerialPort from Another Machine Programming Software Development by SalmiSoft I would set the machine that has the physical serial port to be a server (use TcpListener?) and the remote machine to be a client (use TcpClient?). Then the client can send stuff to the server for the server to send to the device attached to the serial port, and the server can send back whatever it receives from the serial device. The server doesn'… Re: Recieve from SerialPort from Another Machine Programming Software Development by SalmiSoft I am lost. How is your device connected? Serial line? (RS232 or something else?). Network cable? Wifi? If the device is connected via a network cable or wifi, can you ping it?