Using A DataReceviedHandler With Multiple Com Ports?
Apr 19, 2011
I Need to be able to read an unknown number of serial ports (I plan to limit the number to 10). I'd like to use a datareceived handeler for all of them. This is what I came up with, that seems to work with my test ports. However I'm wondering if thiscould cause any problems if more data is received than I'm currently testing with. It is possible that one or two ports will be transmitting 16 records per second each. Here is the code I'm testing with:
[code]...
View 2 Replies
ADVERTISEMENT
Feb 24, 2011
Have several USB RFID readers that use keyboard wedge to pass info to MS Excel. That works ok. However I want to have the ID of the USB reader (port) that it came from for each read.
Need to intercept the 'read' going to the keyboard wedge and insert a USB ID number. Any reference ok as long as unique to each USB RFID reader .
View 11 Replies
Oct 28, 2010
There are a lot of USB devices that collect data and setting them up as a keyboard wedge is one of the easiest ways to do it. That said, I really do not want them set up as active all the time. So is there a way to set up multiple keyboard
wedge USB devices and then through code turn them on or off. For instance, using a scanner I want to read an ID card. However once the ID has been read, I want to turn off the ID scanner so that it will not be used in the wrong field on a
different screen. Perhaps on a different screen I want to read a Credit Card set up as a wedge input device but only when I am in the correct field for the input. So in this case i would have two wedge devices
Perhaps a different way to phrase the question is, "can I set up multiple USB keyboards and through VB.net turn them off and on?
View 4 Replies
Jun 3, 2010
How can I make multiple instances of System.IO.Ports.SerialPort and declare them on the fly? I need to monitor multiple RS232 ports based on the EU's selection. EU will select ports e.g. 1,2,6,9,11 and rename them as necessary. Selections will then be stored in a settings file.I would like to declare these at runtime e.g
Com1 is renamed LabelPrinter
Dim comLabelPrinter As New System.IO.Ports.SerialPort
With comLabelPrinter
[code]....
Or if not, make multiple instances based on the number of ports selected and renamed.The declaration based on the rename would just make it easier to work with but can be committed?
View 1 Replies
Aug 24, 2010
I am creating an application to configure some modems through the serial port. I have no problem sending a single string of data to the serial port and displaying the immediate response to a rich text box. I have 2 problems
1st: how to update the rich text box for any delayed response from the modem
2nd: how to react to the response from the modem, in other words I want to send the next command based on the response from the modem witch is usually "OK"
This is what my code looks like currently to send ans receive data from the serial port. (sport1 is my serial port and display is my rich text box)
sPort1.Write("AT+WOPEN=1" + Environment.NewLine)
With Display
.AppendText(sPort1.ReadExisting())
[Code].....
View 1 Replies
Jan 25, 2011
I've got my serial/com port code working ok using the standard Port.DataReceived handler:
AddHandler Port.DataReceived, AddressOf port_DataReceived I now want to be able to handle multiple COM ports. Do I have to create multiple copies of the handler sub or is there a way the handler sub can tell which COM port it was called for?
View 3 Replies
Jun 8, 2011
I am trying to set up a program that allows you to open multiple COM ports and then select which COM port you send data down. The computer i am using has 18 COM ports. Also on the first code it shows the ports are open they just wont receive anything.
[Code]...
View 1 Replies
Jul 21, 2008
I'm working on a project and would like to know how i can add the list of avabilable serial ports to the combobox[code]...
View 5 Replies
Feb 21, 2012
Anyone here has an idea where I can get the ports name listed in my PC? [code]I could get COM26 and etc. if any, but that's not what I want. Instead of retrieving COM26, I want USB-SERIAL CH340 or USB-SERIAL CH340 (COM26). How could I do that?
View 3 Replies
Apr 10, 2012
I will explain first what kind of program we are talking about: The program that I made works togehter with my PIC Microcontroller to control 2 stepper motors. One for the rotating motion and the second for a tilting motion. With this system I want to make a airplaine pointing and tracking system.
[Code]...
View 1 Replies
Feb 19, 2009
What is the best way of communicating with Serial ports and TCP/IP communcation using vb.net?Using visual studio .net can we make it easier?? Can anyone send me sample application of communications?If I write a program communicating with my hardware using Searial port or TCP/IP, will the program be slow?? Are there any programming techniques working with communication ports?
View 1 Replies
Dec 1, 2011
We need to put a firewall in between our servers and a couple of clients. To do this we need to limit the number DCOM ports available so that we know what ports to open on the firewall.The question I have is do we need to limit the number of ports on all the machines inside the firewall as well as outside. This would cause an issue as we have lots of machines which would need to be modified.If DCOM has the intelligence to negotiate on port 135 which port is available on both machines which need to communicate, we will only need to modify the 2 machines on the outside of the firewall.
View 2 Replies
Jun 6, 2011
I am creating a USB "cookie dispenser" (long story) and I plan on programming it by, when cookie.exe starts, it disables the port, you plug the USB in and press a button and it enables the port (thus powering the device). What I need to know is, is this at all possible? And if so, can you help me get it to work? I know I should put in an effort but it's late for me (UK) and I want to post this overnight so that you guys (in the USA may
View 8 Replies
Sep 22, 2009
how do i detect for open ports? if the server close the port, the client will have to respond with msg("PORT IS OPEN")
View 5 Replies
Apr 6, 2009
I am trying load a text file that contains ips and ports in the format of Ip:Port
this is the code i have so far...its gives me an error of.... Is operator does not accept operands of type 'Boolean'. Operands must be reference or nullable types.
[Code]...
View 2 Replies
Jan 5, 2010
i want to open and close com ports in vb.net and send data through ports.
View 2 Replies
Mar 4, 2010
I want to experiment with COM ports but I'm stuck trying to figure out the COM port on my laptop. When I run the following program:
[code]...
PCI expansion card with my wireless internet card in there the hp manuals also say that my laptop should have a PS/2 mouse or keyboard slot but i dont see it anywhere. what ports could "COM3" be refering to?
View 6 Replies
Nov 13, 2009
I want to get the details of a com port on my machine. To be more precise the com port presents itself in the device manager as:
MyPort(COM3)
I know how to get the name of the port i.e. COM3. Is there a way to get the rest of its description i.e. "MyPort".
View 1 Replies
Jul 29, 2009
i saw Anti virus auto run when usb enable but i don't how to check port usb? my idea.i want to run my program when have port usb open
View 8 Replies
Dec 20, 2010
is there any other way to access a serial port using visual basic.net 2010? i followed the steps in this site, How to access serial and parallel ports by using Visual Basic .NET but i just got this output Open the serial port. Send the attention command to the modem. Wait for data to come back to the serial port...
[Code]...
View 2 Replies
Apr 28, 2010
I have written a program that will gather data from several different COM ports and reformat the data before sending it to a web site. This program is intended to run 24/7, but only send the information at user specified intervals. I have the routines to gahter data, but I only need it to perform this task at the specified time (5 minutes to each hour). At startup the dialog minimizes to the system tray. I would like a balloon message notifiy anyone watching that the data is about to be sent, and allow them to add additional comments if they choose (by clicking on the balloon). The system tray icon has several context menu items that the user may need. Is this the proper use of a background thread? I would also like opinions on the best method for pausing execution until the specified time.
View 4 Replies
Jul 7, 2011
I am making a VB .NET application using Visual Studio 2010. I want to know how to open/close ports of the computer. The application will be running in Windows XP only.Actually the thing I want is to close all ports but 80 but also have the ability to open a few more if I need them. Any ideas?
View 16 Replies
Feb 15, 2009
I want to know which ip and ports are supported by webproxy class.. i used 127.123.123.124:2690 format.. only few ips are working out of 1000.. is there any way to get working one?
View 11 Replies
Jun 6, 2011
I'm fairly new to Visual Basic (VB), but I've already got running code to access all my serial port. The problem is I want to load multiple serial ports into an array and loop through them in my functions. The program allows me to create ports(), but fails when I try to populate it.
Dim ports As IO.Ports.SerialPorts()
ports(0) = SerialPort1
Where SerialPort1 is an object I draged from the Visual Studio toolbox.
View 2 Replies
Nov 15, 2009
I'm currently working on a little software for my GPS and i havent touched VB in about 10 years so I'm trying to figure this out from scratch again pretty much. Anyway, I have this code to get the information from the GPS and parse it, the only problem is that It isn't getting all the code at once and then parsing, it is getting bits and pieces and only getting the RIGHT code from time to time..
Private Sub timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles timer1.Tick
[Code]....
View 6 Replies
Oct 19, 2011
I would like to know if there is a way that I can read what a program sends to a device when connected to a comport.
I work with cell phones. I use a few programs like CDMA Workshop, QPST, QXDM, and Many more to communicate with these devices and program them as I need for each cellular carrier. We call this flashing or provisioning.
I would like to create my own program that I can have it send the commands and write to the device what I need to write.
Obviously I know exactly what I need to write to it but I have no idea what commands to use other than using the programs that already have those commands for me.
So for example when I click READ for the NAM on the program, the program automatically reads the name for me. I just want to know how do I read what commands are being sent. Is there a way to listen to the ports?
View 3 Replies
May 17, 2012
How do I find the number of USB ports available, and what their references are. Example there are 6 USB ports on my motherboard what code would I use to find their reference like, port 1 is called 0 and port 2 is called 1. I want a user to select a designated port and save the selection to a config file so that whenever the user plugs in a removable diskdrive into that specific port a dialogue box will popup asking the user if they want to backup their designated folder (path will also be saved in config file) to that removable diskdrive. I know how to do everything like copying the folder to the diskdrive and all that I just need a code snippet to find the system reference to the USB ports.
View 4 Replies
Apr 27, 2006
How Can send And receive File with SerialPort in vb.net 2005 i use this sample code for sending string , and now i will know how can send any File by serialport click here there are no sample code in microsoft site i Use "Virtual Serial Ports Driver XP " to Test my sample how can use the Zmodem , Ymodem ,Xmodem , etc in vb.net by serialport ?
View 5 Replies
Sep 26, 2011
I am currently making an app in visual basic that I plan to make a chat server. I know that somehow I'm going to get the program to send and recieve data across ports on a certain ip address with variables such as maximum connections, etc.
The part I am mostly stuck on is firstly the code that you would need, or how to make a function to interact with ports across an ip.
Secondly, would it be a good idea to make a backround service to run for it to work on a host, and also how the other computers are going to find a host.
View 2 Replies
Apr 24, 2010
I'm learning the serial port programming. So, I study the code samples from MSDN - VB101SamplesBCL2 http:[url].....While ran the solution of "UsingTheSerialPort", It shows error: It highlights one sentence textBox2.Text = SerialPort1.ReadLine() -- Line 40 ,and says :
"InvalidOperationException was unhandled - Cross-thread operation not valid: Control 'textBox2' accessed from a thread other than the thread it was created on."
View 1 Replies