|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
System.IO.Ports.SerialPort.GetPortNames return wrog names above COMY CASE: I'm using VB.net 2005 express on a Dell Laptop with an USB Bluetooth key. I'm trying to send data to a pocketPC. COM numbers changes each time i've got a new bluetooh "connection" with my PDA. I need 2 ports, one for ingoing data, one for outgoing data (that's how serial port profile in bluetooth is made) Sometime it's COM 5 and 6, some time 11 and 12. I'm using this code to get the port names, display them in a combobox to let the user choosing the right one: in the Form load event: Dim ports As String() = System.IO.Ports.SerialPort.GetPortNames Dim port As String For Each port In ports PortIn_List.Add(port) PortOut_List.Add(port) Next port 'CMB_xxxx are combobox CMB_PortNumIn.DataSource = PortIn_List CMB_PortNumOut.DataSource = PortOut_List In the OK button: SerialPortIn.PortName = CMB_PortNumIn.Text SerialPortOut.PortName = CMB_PortNumOut.Text MY PROBLEM: with all COM numbers under 10, no problem, but with COM number above 9 (11 and 12 in my case), getportnames return "COM11c" and "COM12c"! Is anybody can "duplicate" this error? Is it a bug? Hi Sam,
>> "COM11c" and "COM12c"!<< When you use these values to set the port, do they work, or is there an error? I don't have any BT hardware to test right now, but I don't see this with some other virtual serial port drivers for hardware that I do have installed. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. See www.hardandsoftware.net for details and contact information. No, it doesn't work with those names. I have to write "COM11" and "COM12" in
the comboboxes! Are you able to test this function with a high numbuer next to COM? Show quoteHide quote "Dick Grier" wrote: > Hi Sam, > > >> > "COM11c" and "COM12c"! > << > > When you use these values to set the port, do they work, or is there an > error? I don't have any BT hardware to test right now, but I don't see this > with some other virtual serial port drivers for hardware that I do have > installed. > > Dick > > -- > Richard Grier, MVP > Hard & Software > Author of Visual Basic Programmer's Guide to Serial Communications, Fourth > Edition, > ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. > See www.hardandsoftware.net for details and contact information. > > > Hello Dick, i have download VSterm from your pages and the problem is the same!
I can email you a capture of my screen with "COM14c" and "COM13c" in your settings form of VSTerm! When I select them, no problem, but when I try to open it, nothing happen, and the port open item in the menu is not checked! It seems that when I move my usb dongle from Usb port to Usb Hub, COM number change, that's why today, number are 13 and 14. My Usb dongle is a "Top suxess" one, The chipset came from CSR, the driver from Microsoft, V 5.1.2600.2180 Show quoteHide quote "Dick Grier" wrote: > Hi Sam, > > >> > "COM11c" and "COM12c"! > << > > When you use these values to set the port, do they work, or is there an > error? I don't have any BT hardware to test right now, but I don't see this > with some other virtual serial port drivers for hardware that I do have > installed. > > Dick > > -- > Richard Grier, MVP > Hard & Software > Author of Visual Basic Programmer's Guide to Serial Communications, Fourth > Edition, > ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. > See www.hardandsoftware.net for details and contact information. > > >
DateTimePicker + DataBinding + Null-Value: THE solution?
Is there a simple way to email? What is Instrumentation? ptr to string ? How to remove Volume Name on removable drive? Help please Creating web page of links and content Unit Testing and Test Cases NEWBIE question multi threading error Printing a bar code |
|||||||||||||||||||||||