Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey all
I can get the port number like "COM10" without any problems using this code
VB
'When the form loads
'Enumerate available Com ports and add to ComboBox1
comPorts = IO.Ports.SerialPort.GetPortNames()
For i = 0 To UBound(comPorts)
    ComboBox1.Items.Add(comPorts(i))
Next
'Set ComboBox1 text to first available port
ComboBox1.Text = ComboBox1.Items.Item(0)
'Set SerialPort1 portname to first available port
SerialPort1.PortName = ComboBox1.Text
'Set remaining port attributes
SerialPort1.BaudRate = 19200
SerialPort1.Parity = IO.Ports.Parity.None
SerialPort1.StopBits = IO.Ports.StopBits.One
SerialPort1.DataBits = 8

But i want to get it like "COM10 HUAWEI MOBILE CONNECT"
Thanks in Advance
Posted

1 solution

Try
SerialPort.PortName[^]
Getting Serial Port Information [^]


SerialPort.PortName Property
Gets or sets the port for communications, including but not limited to all available COM ports.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900