Hooking The Comm Port (RS232)?
Nov 2, 2011
I currently have software that sends out plain text(i.e. 'X') to comm 1 port and was wondering if there was any way to capture that plain text and also respond to that port on the same compute as the port without having anything plugged into the machine (i.e. 9 pin serial cable). I am trying to avoid buy any more hardware as this is an objective to acutally cut down on hardware.
View 1 Replies
ADVERTISEMENT
Oct 18, 2010
I have developed a microprocessor based devise. It can communicate with laptop through RS232 as a VB application. Now most of laptops have USB port only. So I want to use USB replacing RS232 port on laptop side but not change anything on the device side. Can I do this using a USB-RS232 converter? How to change the VB software?
View 1 Replies
Jan 27, 2010
Basically I need to send the hex command FA through a COM port.
I have added the com port and set the baud etc and all seems to be working well there. I am just a little unsure how to send the correct hexadecimal command. For example,
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SerialPort1.Open()
[Code].....
View 4 Replies
Apr 29, 2011
Is it possible to create a logical serical port in vb that another application can open and read/write to?
View 2 Replies
Nov 27, 2011
I used microsoft com control 6.0 in the application for sending data to the led control
MSComm1.EOFEnable = True
MSComm1.SThreshold = 100
MSComm1.InputLen = 0
[code].....
View 1 Replies
Dec 31, 2009
Now I know whats going to happen, I will post a request for code syntax and one of the admins is going to say that I need to post the code I already have. The code I already have is irrelevant to what i wish to do. So, continuing on; I have a micro controller that i wish to send commands to it in HEX data type. Communication is via the serial port RS232. (well technically its through the USB to serial converter)Steps:
1) Sending a "001" tells the micro controller to await instructions as to what to set the duty cycle to
2) The data that follows i.e." 050, 010, 185 " will be added to 400 (by the micro controller) to come up with a duty cycle based on a 10 bit resolution of 0-1024. I am only going to be using the range of 401- ~500.
I can communicate with the micro controller via hyper terminal. Using the Alt + #keys method I can transmit data to the micro controller, and this is what i with to do with vb.net.[code]
View 4 Replies
Feb 22, 2007
I have an older VB6 application which uses a scanner on the COMM port and does the following... (I have been tasked with re-writing it in ASP.NET (VB)...
OLD APPLICATION...
1. reads a Scanner and loads the data onto the PC
2. FTP's the data file to a SQL Server (where a small app picks it up and processes it)
3. Deletes the data from the scanner[code]...
View 6 Replies
May 3, 2006
I'm debugging a VB app where I'm using a comm port attached to a bluetooth radio paired to another bluetooth radio in order to communicate with a remote barcode scanner. The pair of bluetoooth devices basically work as a serial cable replacement. Sometimes it works fine, but after a while I get an UnauthorizedAccessException message which breaks the program (see attached jpeg).
I only get this when I use the radios and not when I use a direct cable. I wonder if it has something to do with other bluetooth devices nearby trying to communicate with mine. I've used the .NET Framework 2.0 Confuration tool to adjust the zone security to give full trust to MyComputer, so I don't think it has to do with security, but I'm really going beyond my area of expertise here. I don't know what's going on.
[Code]...
View 2 Replies
Apr 8, 2010
I did a search for "How do I implement Serial COM Port communications? and found a response by Xiaoyun Li which was last posted on April 10, 2009. Xiaoyun's response included sample code. My intent has been to get a clean compile on the sample code, then test it, then expand the code into a real application. I am down to a single error message, which I can't figure out how to resolve: "Method 'Public Sub DoUpdate()' does not have a signature compatible with delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'." [code]I marked where the error occurs in the code with *** to the right of the error line.The code is attached to a simple form, Form1 which contains a single text box, TextBox1.It appears to me that the code needs a Delegate statement, but I can't figure out how to code it or where to put it.d.
View 3 Replies
Apr 13, 2012
I am getting scale values from a comm port into a richtextbox control, now as long as the connections and the scale is working great scale readings continuously flow into the control all the time, however when the connections or the scale is turned of the label that displays the weight will give a message saying error.
After 5 seconds I want to be able to give the operator the choice to take scale readings manually. This is my code so far.
Private Sub tmScaleTimer_Tick(sender As System.Object, e As System.EventArgs) Handles tmScaleTimer.Tick
If rtbDisplay.Text.Length = i Then
[Code].....
how do I restart the timer if the interval has elapsed
View 1 Replies
Feb 9, 2010
I am writing a VB.NET app that has a piece which needs to send a small command to comm port 2 and get the return result. The problem is .NET doesnt have any support for serial communication seems like.
I just need to send the command "headtype" and get the result.
View 2 Replies
May 18, 2010
I have recently developed a serial port communication program to access my hardware firewall and its connected to the device via a converter usb to rs232head plugged to a rs232 to an ethernet cable. this ethernet cable then plugs into the device console port.
my program functions similar to that of TeraTerm. an opensource hyperterminal program written in C++ but i decided to do one for vb.net
Alright to cut the story short, i have successfully coded out the program to accept incomming data from the device but however, i'm also receiving ansi escape sequence along with it and i have no idea how i could implement codes to remove these. i have spend 3 weeks trying to look for vt100 emulation codes written in vb.net but i found none so far. most are written in c++. here's an image to illustrate the problem which im facing.
The image below is a screenshot taken when the i ran both the programs together. The bottom is tera term 3.1 and the top is my vb project which i made using msdn's example and improved on the codes. basically tera term was able to interpret those escape sequence and display accordingly to that of the vt100 terminal display. I have spent time reading on regular expressions using the inbuilt function regex in visual basic and tried parsing some strings but its not working. i guess its far more complex than i thought.
View 6 Replies
May 2, 2011
I have been using VB 6.0 and new to VB.net (VB 2005) I want to know how to read characters from RS-232 port.
I have created serialport object and want to read this sort of thing "A,2451.3955,06715.8253"
View 8 Replies
Mar 18, 2011
i have some code here that is used for a project, the code is used in visual basic 6 and i am using visual studio 2008 in the project i have to communicate with a PIC micro controller, i do not know what to do because in visual basic 6 w use MS comms and in visual studio 2008 uses a serial port thing code below.[code]
View 3 Replies
Aug 23, 2010
I need to write and read data from a RS232 port. On the RS232 port there is a RFID Card reader-Writer connected. So I need to send hex codes to the device, and have to poll every 1sec if there is a card in the system. If there is a card I need to read the info that is on the card. My biggest problem is I think is that I am not sure how many characters there will be in return after the read command (maybe it is always the same length this I am not sure). What is the right way to read-write to the com port. So I always got the same result and not skipping a code.
View 12 Replies
Sep 28, 2011
I want to create an application in VB.net that will read data outputted by a RFID reader on serial port.I want to know how will my application be able to identify the interrupt generated by Serial port and will read data from there?
View 2 Replies
Nov 2, 2009
I am trying to make a program in vb 2005 to real all the data from a device connected on Serial Port (Com 1).i did this: [code]and this is how i want to reciveit.when i lounch the program i only receive first line "410001+00000001" and after that i get on the device rs232 error.
View 6 Replies
Nov 5, 2009
The vb.net code is functioning correctly as it talks to a device through COM1 serial port.What I was hoping was the equivalent c# code is not creating the same string and as a result, the serial 'packet' is not correct. Check this illustration of my problem [URL]...
My goal is to eliminate the addition of the extra characters '/0' and '/b' that what I hoped was the c# equivalent to the correctly functioning vb.net code. It just occurred to me I should change the code to employ Stringbuilder. The 'packetbuilder' method/function builds a string and keeps concatenating things to itself.
[Code]...
View 5 Replies
Mar 24, 2010
how can i, for example add a datum from the rs232 with other variable here is my code:
Dim ii As Byte
Dim c(100) As Char
c = Me.SerialPort1.ReadExisting()
[Code]....
View 19 Replies
Nov 10, 2009
I'm currently working on a project where I am transmitting data from a comm device via the serial port and resorting the raw data (in binary) to its respective ascii values. The problem I'm facing is determining the most efficient method to accomplish my goal. Essentially, I have 68 bytes coming in, the first and second bytes represent the page and packet number and the data itself ranges from 3 to 64, the remaining for my checksum.
What I am needing to do is, grab 50 consecutive bytes per variable in my array, and that is where I'm confused. I have easily pulled my 3-64 bytes and stored that data to a string. I just don't know the most efficient method to accomplish my goal. Should I write directly to file all my data, as there are like 8 pages, of 128 packet data. [Code] I can capture the the first 50 by using a for-loop easily, but what would be the preferred method to track what data chunk I've taken? The more I think about it, I think I may just want to write to file, all my data, and then just take them back to back in 50 byte chunks. Is that the most efficient method?
View 3 Replies
Apr 18, 2010
I;m attempting to write code to read several NMEA ports and format the data for archive. When I execute the following code:
Using Commportno As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort(portName:=port)
Dim Incoming As String = Commportno.ReadLine()
View 5 Replies
Mar 5, 2010
What i need to write is i get different signal from PIC16F877A and through serial port, i need to display diffrent text from different signal, Such as: Signal from portB.1 display 1, signal from portb.2 display 2. Between the microcontroller and serial port im using MAX232.
View 2 Replies
Aug 1, 2010
I want to know how to hook a tcp connection of another program and listen them. I dont need to manipulate the packets though.I just want to record for example chat messages.
View 1 Replies
Sep 9, 2009
I'm working on a tool that requires overlays ala X-Fire. I'm hoping to do it in C# or VB.NET rather than resorting to C++, but the only solutions i've found for .NET cause a large performance hit (~20FPS in games). Take a look here: [URL]
View 1 Replies
Feb 16, 2010
I have been working on a project for some time now and I am stuck. I am trying to sense when a navigation software speaks so i can mute the volume of everything else on the computer.
my problem is that i cant properly sense the audio of the software. i am using windows 7 and vb.net. i have done a good amount of research, but i have not come up with an answer.
i am almost positive that i need to intercept the win32api call of the software to trigger the mute that i will use. i dont know how to do this, all the information i can find that is even close to this subject is for 98, nt and 2k.
does anyone know of any books (or websites) that contain information on this subject?
View 1 Replies
Jul 15, 2009
What are the possible handshaking protocol available using COMM-DRV for communication through MODEM
View 5 Replies
Jun 18, 2011
How can I disable Alt-F4 and Ctrl-Alt-Del?Can I lock all combinations of a key with the Alt key? I got a sample from the internet, it only can disable Alt+Tab, Alt+Esc, Ctrl+Esc, Windows Key
Select Case wParam
Case 256, 257, 260, 261
'Alt+Tab, Alt+Esc, Ctrl+Esc, Windows Key
blnEat = ((lParam.vkCode = 9) AndAlso (lParam.flags = 32)) Or _
[code]....
Where can I see the button code list in lParam.vkCode = ?How can I make it able to disable Alt-F4 and Ctrl-Alt-Del or disable all combinations of a key with the Alt key?
View 3 Replies
Mar 9, 2009
I have been writing a COM callable assembly for my current solution allowing unmanaged code some access. I have just been told that I can now start using 3.5 of the framework having used 2.0 for some time.I then came across WCF and was wondering if I could use any of this to create my application api and allow access from anmanaged code.
View 1 Replies
Oct 7, 2008
Is there a way in vb.net to subclass/hooking in to any controls scroll bar and change it is colours etc (I saw this once in C++ but lost it). It�s ok for MS giving us user owner drawn controls, or at the very least allowing us to draw the controls information but it looks dam write awful if the scroll bar does not fit into the GUI.
View 8 Replies
Aug 17, 2011
I play a midi file using this simple win32 api call:
MidiMsg = "open " & c_midiFile & " type sequencer alias mid1 notify"
ret = mciSendString(MidiMsg, "", 0, Form1.Handle)
MidiMsg = "play mid1"
ret = mciSendString("play mid1", "", 0, Form1.Handle)
Callback message MM_MCINOTIFY has a value of &H3B9 (found it using "spy++")I have to know when this message (MM_MCINOTIFY) is fired and read his parameters. In an old version of code I've written years ago in VB6 i had to use CallWindowProc and SetWindowLong win32 api, but now in VS2005 i cannot get it to work.Still I have to try with unmanaged code or are there any other ways to do this in vb .net?
View 3 Replies