Windows 10: error in opening serial port with Powershell

Discus and support error in opening serial port with Powershell in Windows 10 Drivers and Hardware to solve the problem; Hello, I have installed a plug-and-play measurement instrument, with a USB terminal, and it appears as a serial COM port. In windows device... Discussion in 'Windows 10 Drivers and Hardware' started by Francois Bondu, Apr 1, 2021.

  1. error in opening serial port with Powershell


    Hello,


    I have installed a plug-and-play measurement instrument, with a USB terminal, and it appears as a serial COM port.


    In windows device manager, COM3 is the only port.

    with properties / main tab, the status says that the device works properly.


    I want exchange API commands via powershell. There is an error at the open step.

    Could you help?


    Thanks


    >> $port= new-Object System.IO.Ports.SerialPort COM3,9600,None,8,One
    >> $port.NewLine = '\r'
    >> $port.ReadTimeout = 100
    >> $port.WriteTimeout = 100
    >> Start-Sleep -Milliseconds 100
    >> $port.open
    >> Start-Sleep -Milliseconds 100
    >> $port
    COM3
    Exception lors de l'appel de « Open » avec « 0 » arguments : « Paramètre incorrect.
    »
    Au caractère Ligne:7 : 1
    + $port.open
    + ~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: : [], MethodInvocationException
    + FullyQualifiedErrorId : IOException



    BaseStream :
    BaudRate : 9600
    BreakState :
    BytesToWrite :
    BytesToRead :
    CDHolding :
    CtsHolding :
    DataBits : 8
    DiscardNull : False
    DsrHolding :
    DtrEnable : False
    Encoding : System.Text.ASCIIEncoding
    Handshake : None
    IsOpen : False
    NewLine : \r
    Parity : None
    ParityReplace : 63
    PortName : COM3
    ReadBufferSize : 4096
    ReadTimeout : 100
    ReceivedBytesThreshold : 1
    RtsEnable : False
    StopBits : One
    WriteBufferSize : 2048
    WriteTimeout : 100
    Site :

    :)
     
    Francois Bondu, Apr 1, 2021
    #1
  2. Naresh_K Win User

    Changing the Port settings for Serial-USB.

    Hi,



    Thank you for writing to Microsoft Community Forums.

    If you want to change the port settings, please follow the steps mentioned below:

    1. Open Device manager (right click on start button
      and then on Device manager).
    2. Then expand port (COMS & LPT).
    3. Then right click on Prolific USB-to Serial Comm Port and then on properties.
    4. Go to port settings and click on Advanced.
    5. You will be able to make the changes on this screen.


    Hope this helps.
     
    Naresh_K, Apr 1, 2021
    #2
  3. Change serial port defaults, Windows 10

    Thanks for helping. I have done the steps but still unable to connect the serial to this router. Devices and Printers only ever shows generic PnP monitor. PuTTy just shows unable to open the serial port.
     
    BJ Richards, Apr 1, 2021
    #3
  4. Drone Win User

    error in opening serial port with Powershell

    Drone, Apr 1, 2021
    #4
Thema:

error in opening serial port with Powershell

Loading...
  1. error in opening serial port with Powershell - Similar Threads - error opening serial

  2. Serial Port Driver

    in Windows 10 Drivers and Hardware
    Serial Port Driver: I need to install a serial port driver. Where can I find such a driver? https://answers.microsoft.com/en-us/windows/forum/all/serial-port-driver/4a31f06a-0c90-4c1d-9379-6e1b6d982898
  3. USB serial port driver

    in Windows 10 Drivers and Hardware
    USB serial port driver: Need a serial port driver fir Windies 10 https://answers.microsoft.com/en-us/windows/forum/all/usb-serial-port-driver/92feaf39-367d-48ad-abf8-fe3a1c148ae8
  4. Hyper-V serial port

    in User Accounts and Family Safety
    Hyper-V serial port: Hi We have Hyper-V Manager version: 10.0.18362.1 installed on Windows 10. We need to use serial port on victual machine, but could not get correct configuration. We tried some suggestions from internet, such as remote logon the virtual machine and use the serial port on...
  5. Clashing devices on serial COM ports

    in Windows 10 Drivers and Hardware
    Clashing devices on serial COM ports: I am using a Windows 10 Enterprise x64 PC. I have an Adafruit Feather M0 Express board and a Kortek touchscreen. I can use either of these devices individually on the PC. They work over serial communications. However, when I install the drivers for the touchscreen, the...
  6. what is a PCI Serial Port do

    in Windows 10 Drivers and Hardware
    what is a PCI Serial Port do: what does a PCI Serial Port do is it ok if there is no driver https://answers.microsoft.com/en-us/windows/forum/all/what-is-a-pci-serial-port-do/c6f6c860-578c-4873-aa6c-84b7b5fc9e08
  7. physical serial ports (Not USB connected)

    in Windows 10 Drivers and Hardware
    physical serial ports (Not USB connected): My tower has two physical (old school) serial ports which I need to use for a Kenwood CAT radio interface (TS-850) and a RigBlaster PRO soundcard digital interface at the same time. I have tried everything that google has found for me without any luck. I have tried 2 USB to...
  8. Serial com ports.

    in Windows 10 Drivers and Hardware
    Serial com ports.: I am trying to use a USB-RS232 lead on my laptop. I cannot create any COM ports and none are there by default. If I try this on my desktop it works perfectly. When trying to create a COM port I get an invalid parameter error and the creation fails Windows 10 Home...
  9. BSOD serial-port

    in Windows 10 BSOD Crashes and Debugging
    BSOD serial-port: BSOD when the program Siemens STARTER using the serial-port. 77830
  10. Are Serial Ports Available ?

    in Windows 10 Drivers and Hardware
    Are Serial Ports Available ?: I have a Shuttle (SH67) Computer running WIN10, 64 bit, for an O/S. Are there cards available to give me Serial Ports ? A Google search was useless !! Thanks, Richard S. 31197