Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Serial Ports


Hi all,

Is there a way to get a list of the available open serial ports ( without using the mscomm control). Specifically I am trying to determine which ports have a bluetooth device associated with it. Any help would be greatly appreaciated.

Thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Serial Communication On Serial Ports
I am currently trying to let the computer's serial port to communicate with a device with a serial port too. But this device uses a line feed function. Does anyone knows how to send a string with the line feed function?

For example, i want to send the string "DIAP<connect>E01D" How do i send this along with the line feed function?

COM Ports And Serial Ports
Is there way to tell how many available COM ports and how many available Serial ports a PC has?

Serial Ports
I know it can be done I just dont know how!!


How do you read and write to/from the serial ports Comm 1,2 3 etc using VB????


I have searched (maybe not in the right places) and I cant find out how!!


Anyone?????

Serial Ports
heya gang...

I have been trying to access certain ports on my pc...com1 and ltp1 is there even a way to this in vb?? If so, how do i send and recieve data to these things?

Thx eh
Elon

Available Serial Ports
How can I determine the available serial ports? How to retrieve the
defined serial ports which appear in windows configuration/system ? Which
API function is suited for this purpose ?

Thanks

Serial Ports
I am trying to write a program that will open a serial port. Then the user can type a message and push send and the program will serve as a network protocol, sending the information to another computer that the serial port is connected to.

Any information you can give me would be greatly appreciated. I'm sure this isn't very hard, but I'm not aware of how to do it.

Need Help With Serial Ports
I'm new to programming and I am wondering the best way to use the serial port to recieve inputs from 3 simple circuits. All I have to do is to know which circuits have been completed and in what order they where completed in. This is for a knowledge bowl type of situation with three teams. Also can we recieve the inputs through the different pins of the serial port or do I have to make some hardware that gives each strip a different binary number. Any help would be much appreciated. thank you in advance.

Serial Ports And +5v
howdy,, i'm workin on a little project readin some serial data from an IR device,, what i need to know is a good way to get +5v outta a pin on the serial port,, anyhelp you got is great! (i relize this isn't much of a vb question, but i am using vb for the coding =) ) thanks for any help,,

Controlling USB Serial Ports
Hello,

I've created an application in which I've utilized the MSComm contorl
to allow access to the serial ports. Unfortunately my customer would like
to use USB Serial ports. I've found in Microsofts stuff that MSComm does not support USB Serial Ports.

Does anyone know how to control USB serial ports in VB 6.0.

Thanks in advance for any assistance.

Control Serial Ports
How do I control the serial ports through VB?

MSCOMM With More Than 16 Serial Ports
MSCOMM can adress up to COM16. I am using higher comport-numbers.
Do anyone have a solution with MSCOMM?

Virtual Serial Ports
Suppose your PC has 2 serial ports: COM1, COM2. Suppose you need to let your program user see a COM3 which you want to redirect (e.g. you want to send the output strings of this virtual COM3 through the Ethernet card and to to read in the COM3 receive buffer what is coming from the Ethernet card). Does anyone know how to provide such an "illusion" (COM3 does not physically exist but a serial communication program can use it)???
Thanks in advance!

VB6, MSComm, Serial Ports?
Has anybody used COM ports, MSComm1, and detecting serial ports????

Does anybody know how to find out what COM ports are available on a computer using VB6. I found out that the WIN.INI file on my computer lists COM ports 1 throu 4 but that doesn't mean that they are available does it. For example when I look under Control Panel/System/DeviceManager/Ports all that is listed is COM1 and LPT1.

I have also tried openeing them with MSComm1 and catching the error if it is already oppened. My end result was 1, and 2 are not used and 3 and 4 are being used. The unusual thing is when I send 2 bytes to port 2 I get two bytes back in my input buffer.I only have COM1 in device manager though. COM1 works fine.

Basically I am trying to find an INI file or someway to find out what COM ports are availlable on a computer. Any ideas?

High Serial Ports
High serial ports ...?

Virtual Serial Ports
Hi Guy's

I need to include a means of creating virtual serial ports in my program.
A realy good example is the program "Virtual Serial Ports Kit". (here)

This neat little app can create a pair (2) serial ports that are bridged together, so what is outputted on one port is inputted to the other,
as if you had 2 real serial ports bridged with a serial cable.

Is there a free ActiveX or .dll that can do this ?

Thanks
Oly

Serial Ports Not Being Released
From time to time my VBasic application is not properly releasing the serial ports. Even after closing the program Windows says that the port is being used by another program (Port already open Err Code 8005).

Only thing I can do to release the ports is to restart the PC.

Number Of Serial Ports
Can anyone tell me if there is an api call that can get the number of available serial ports on the machine that the software is running on. There has to be something because the device manager knows. I had a good link to all of the api calls on the M$ web site but lost it. Now I can't find it. if someone knows that to I would appreciate that information also.

thanks for your help.

Jason

Does Anyone Know How To Program Serial Ports?
I'm new to programming and I am wondering the best way to use the serial port to recieve inputs from 3 simple circuits. All I have to do is to know which circuits have been completed and in what order they where completed in. This is for a knowledge bowl type of situation with three teams. Also can we recieve the inputs through the different pins of the serial port or do I have to make some hardware that gives each strip a different binary number. Any help would be much appreciated. thank you in advance.

Show All Serial Ports And Modems
Hello !!

I need to show in the combo box all serial ports and modems installed in the PC... I see HKEY_LOCAL_MACHINEHARDWAREDEVICEMAPSERIALCOMM in the windows registers but ... How i can to get that information with VB? Any Clue?

Thanks for your help and your time!!

woman in love

Probably A Stupid Question On Serial Ports
how can i verify if in a loopback cable (the TD pin with the RD one, RTS with CTS and DTR with DSR and CD in the same cable) the various connections between the pins are ok? i hope you understand my horrible english... thanks for your answer.

MSComm And Bluetooth Serial Ports
Hi,

I'm working on a VB6 app. that uses the MSComm contro to connect to a Bluetooth serial port. Hower, when I attempt to open the port using COM 17 or 18 (the automatically assigned port number from the BT hardware), the control returns an error of "Invalid Port Number".

I assume this is a limitation of the control, but I'm not sure. Has anyone run into this or know of a solution/work-around? I would be willing to utilize another .OCX/.DLL if needed.

TIA!

Working With Multiples Serial Ports
hi
i have a system that will work with 30 serial ports on PC. How is the performance of VB working with so much serials?

The machine is a Dell Pentium 4 with 128 MB RAM.

thanks
daniel

Question About Serial Ports And 2 Files In One....
Hey guys!

Plz, anyone know if this 2 things are possible to do with VB....
I need to do some stuff for a client and I will need do something like it...

1- Vb can send/receive information trought serial port as com 1,com 2 or usb... etc.. any port? =-)

2- Theres a way to put 2 or more files (any kind) in one? Like Can you create a proccess that gets 2 exe and put in a file with a new extension and them make the opposite.. Get this one file, and extract both exe from it?

Thanks in advance

Elminster

Quickie Please - Scanning Serial Ports
Is there some routine/object for doing this, as in the case of drives?

TIA

Reading Serial Ports From Browser
Is it possible to read a serial port from a browser based application? Maybe using JScript?

Access Control &amp; Serial Ports
I do hope this type of request has not been posted in the past but if so, I apologize.

I have developed a security access control keypad. The keypad memory will store the last 100 transactions through the keypad. A small hand held printer (Seiko) can be connected to my keypad's controller to enable the printing of these transactions (Audit Trail). As the software for the keypad was written by my pc board manufacturer, I am told the ASCII characters in the keypad memory could instead be uploaded to a pc hard drive and printed to a txt file. My keypad's controller connects to the hand held printer via a 9 pin serial cable.

I have recently had a request to connect directly to a pc to store via text file, instead of the printed thermol paper. The current configuration allows that once the printer has been connected, the internal print command commences immediately and repeats every 3 minutes as long as the printer is connected to the controller. If any of you wonderful programmers know of code that would enable me to resolve this issue, I would greatly appreciate any assistance.

Regards and happy coding

Paul

Serial Comm Ports... Silly Question.
I like very much this subject and i am already reading some guides, the problem is, the xplanations always assume so much sttuff and it is definetely not sth easy to swallow... i was thinkng... YOU the people who actually work with this sttuff in their daily routine, do you use special controls or dll components with VB to access ports and so on or you go all by yourselves... also, IF SO, (i suppose) what controls are preffered and how much do i need to know to use it (just the basics)

Opening Serial Ports With The MSComm Control.
Opening serial ports using the MSComm control takes around .5 seconds. Closing the port also takes around the same time.

I have a program that needs to open 2 ports, print something, and then close both port before starting the program.

So far I have just disabled the main form and had a timer take care of it, and reenabling the main form, but I don't feel this is a good solution.

Is there a better way to handle serial communications?
Is there an API designed for just this task?

Thanks.

Something On Webcams And Serial Ports... (and Voice Ctrls)
Hi everyone,
i have a pair of questions for you! Help me please!
1) How can i manage my webcam in a VB program? Is there a control for this?
2) And for the serial(or parralel) port?
3) Does anybody know how to make my directSS speak in italian? It speaks only in english or with english pronunciation!
4) Can you explain me how to use voice recognition in VB?

Thanks a lot!

REgarding Serial Port Communication With Greater Ports
Hi,
Actually i have to set serial ports greater than 16 for communication.
for that i used
There was a hack that came around about modifying the MsComm control to
access greater than 16 ports:
"In the code there is a unique sequence of three bytes, 3d 10 00. Pick a hex
editor and change the value 10 to say 7f. Now you have changed the default
value of a variable MAX_PORTS to 127. The name of the variable is arbitrary.
Save the changed file and off you go." the problem in using this was when some one reinstall the setup the ocx which we created is getting replaced by the old ocx so is there any way to replace an ocx(Mscomm32.ocx) which is being used by the project by another ocx which i has made by hacking the existing ocx and stored in the system file ,this has to replace the system ocx which is used by it at runtime .

give me other ways also for setting up communication with the higher ports

How To Get The Number Of Serial Ports In A Computer For Mscomm Application
Hi,Gurus.How to get the Number of serial ports in a computer for mscomm application.my project is in lagging without it.plz help me

Communicating To Serial Ports With Comm Port Number Greater Than 16
I want to connect to the serial port with comm port number greather than 16, im able to connect to ports with comm port number less than 17 using MSCOMM control in visual basic, but i need to communicate to ports till 256, can anyone please help me out on this.

Problem Of Data Sending Using Two Serial Com Ports</title> <script Type="text/javascript"> <!-- Function PrintTags() { Var Curr=document.getElementById('vB_Editor_QR_textarea').value; Newval=curr.repl
Hi everyone,

Im facing some problem in data sending using two serial com port(RS232).

here is my VB code,

Code:
Private Sub MSComm1_OnComm()
Dim bytToSend1(0) As Byte
Dim strData As String
Select Case MSComm1.CommEvent
Case comEvReceive
'
' The Pic has sent us something notification to allow next data'
'
If boFinished = False Then
strData = MSComm1.Input
'
' Send the next byte
' and increment the next byte pointer
'
bytToSend1(0) = send_L(intNextByte1)
MSComm1.Output = bytToSend1()
intNextByte1 = intNextByte1 + 1

'
' When we've sent 10 bytes we've finished
' so set the finished flag
'
If (intNextByte1 = 10) Then
boFinished = True
MsgBox "All data1 has been sent"
intNextByte1 = 0
boFinished = False

End If
End If

End Select
End Sub

Private Sub MSComm2_OnComm()
Dim bytToSend2(0) As Byte
Dim strData2 As String
Select Case MSComm2.CommEvent
Case comEvReceive
'
' The Pic has sent us something notification to allow next data'
'
If boFinished2 = False Then
strData2 = MSComm2.Input

'
' Send the next byte
' and increment the next byte pointer
'
bytToSend2(0) = send_R(intNextByte2)
MSComm2.Output = bytToSend2()
intNextByte2 = intNextByte2 + 1

'
' When we've sent 10 bytes we've finished
' so set the finished flag
'
If (intNextByte2 = 10) Then
boFinished2 = True
MsgBox "All data2 has been sent"

intNextByte2 = 0
boFinished2 = False

End If
End If

End Select
End Sub


Im using two com ports in the serial communication which connect to two independent PIC circuits.

im have ten pair of data (send_L() and send_R() which are in one byte each) that need to send out to two of my PIC circuits. lets say that, data of send_L() is for PIC circuit 1 and data of send_R() is for PIC circuit 2.
the first pair of data is send out automatically and after my PIC have finished process the first data, it will send a notification to VB to allow the next data come in.

my problem is, this code is sending data independently to each of the PIC without synchronize with the other.
the first pair is working fine but when it come to the next data,VB send the
data whenever which of the PIC send the notification 1st (because the time for the data to process in PIC is different), so this cause the data that send out is not synchronize with the other.

Can i make my VB to send the data in pair, in other word VB will send out the next pair of data when VB receive two notification from each of the PIC.

can anyone help me? what should i write in the VB code? thanks.

Not The Volume Serial Number But Hard Disk Serial?
I try to read the hard disk serial number, not the volume serial number through GetVolume..... api (cos the vol ser num changed when format disk and can be changed in many different ways). Is there any way to do it in VB6? PLS Help!

Hard Drive Serial Number Or CPU Serial Number
Dear Sir,

I want to got the hard drive serial number ,not volume number. If it is not possible than how can i got the Processor Serial Number.


Thanks
Annu

Ports
Hi every one

Is there any way when scanning ports on my computer is there any way to see what the ports are being used by i.e application and other stuff like that.

Thanks Luke

Ports
Hi!
I keep making my chat network program. Now I've got a (simple?) question. Is ANY port valid for sending/receiving data with WinSock or are there restrictions with them? How many ports are available?
I'm using UDP protocol.

Thanks in advance!

Looking For Available Ports Of The PC
Hi:

is there any way i can determinate wich ports (numbers, for example com1, com2...) are available in the PC?

In the program i am making I want the user to select the comm port he wants to use from a list of all the available ports. That's because some USB devices are asigned arbitrary to a comm port when they are connected.

Thanks in advance

Used COM - Ports
If COM Port is in use, how i can find out, which program uses this COM port on WIN2000 / XP

IE OCX Ports?
Hi,
Is there a way to change which port the Internet Explorer OCX Control, runs from i.e. runs on port other than the defult IE one?

Thanks,
Sam

Ports
hi i would like to make a program that will allow me to open a port while i use a certain program then close it when i stop using it i have had to close the port because i kept getting backdoor sub7 comeing thru so i dont want the hassle of opening it then going in and closing it after that. so possibly a program that would load on the form load event and when you close the app in closes the port again if you need the port number i will have to check my logs tonight.

-Thanks For reading

How To Get All The COM Ports
any way to get what are all the COM ports connected to the system through VB

PORTS PORTS PORTS!!! Come One Come All
Yo, i got a quick question it may be simple it may not be. Anywayz how exactly would i go about making a port monitor ?
well thats everything told u itd be quick.

Ports
how can i control ports, so lets say i wanted to eceive a file through port 4900 or something? How would i do that?

Thanks alot
magicbeans14

Ports
Hi,

I'm running my home computer on a network of about 6 computers. I was just curious, am I able to block the ports so that I can not send nor recieve type of deal. So basically I believe I am looking for a way to close the ports, I fairly new to this stuff.

Is there a way to turn off all of them, or select ones etc.

Thanx

EC

TCP Ports
Well, I'd like to monitor TCP Port connections (kinda firewall).

If a use a Winsock control (or WSAPis...) I can set a socket in listen state, and I can handle the connection request. But I'd create an array of 65536 WinSocks to control All the ports, and this could block all other apps... since no more ports left free...

Then I though the right question was:

what does the system do when someone tries to connect to a certain port and no application is listening on that port? We could hook there and see...

But another solution would be monitoring when an application sets listen state for a port, since no connection from outside will happen on a certain port if it is not listening...

then for example, if I execute an app that will listen on port 23000 my program should warn me that AppName is listening on that port, and eventually allow me to deny... this should be the working structure of most common firewalls... if I'm not wrong (which happens pretty often) .

Any Idea how to do this in vb?

If you got any Idea of how to do it in C++ / VC++ ecc ecc... then please reply anyway (a link is more than enough).

Overflow - Too many fingers on the keyboard.

Get Available Com Ports
Hi there

i need to get a list of all available com ports.

ive seen that there already exist 2 threads about this but
one also get out other ports like LPT's and so on and the other
just read like 16 ports but i think there could be much more.

Is there an API function that handles that or does anybody have
any other ideas to solve this??

thx

Getting PCI And AGP Ports
Right people

I am currently getting system information using WMI, i need to be able to get how many PCI, AGP and PCI-exoress ports the user has, does anyone know how to do this?

I have asked before, but with no response, dont let me down VBF

ILMV

Ports!!!
When I first posted a thread like this one months ago, it caused bad arguments. First, I am sorry for being so childish in my first thread about ports. Then I want to ask those questions again with a few different ones:

1. I suspect(no, I know) my MSN Messenger has been hacked. I can still login to gmail and passport.net but I can not log in to MSN Messenger. I'd like to know if somebody can use TFTP and MSN Messenger(he didn't even talked to me in MSN) to hack my MSN Messenger?
2.If so, are there certain ports TFTP use? Can they be detected and listened(code of freeware please...)? Can I refuse incoming data from the listened ports(code or freeware please...)?
3.My father told me MSN Messenger would have caused some security problems.
4.I don't want to use ZoneAlarm(it would interrupt me too much).
5.Can somebody teach me how this port stuff works?

Copyright © 2005-08 www.BigResource.com, All rights reserved