Using Serial on Python / Win7

后端 未结 3 1116
遇见更好的自我
遇见更好的自我 2020-12-22 04:54

I am trying to interface with a serial WWAN modem (for diagnostics /signal strength measurement purposes). This is via the onboard COM1 (115200-8-n-1) on my desktop, the con

相关标签:
3条回答
  • 2020-12-22 05:29

    You need to be running python.exe in elevated mode. Right click and click Run as administrator

    0 讨论(0)
  • 2020-12-22 05:35

    You don't need to call open. The constructor already does that, and on Windows whoever opens a COM port has exclusive access to it until they close it.

    As to the second problem, take a look at How can I fix "[Error 6] The handle is invalid." with PySerial

    0 讨论(0)
  • 2020-12-22 05:52

    Here is what I do to eliminate Access Denied Error:

    1. Press Ctrl + Alt + Del

    2. Select pythonw.exe and press End Process

    3. Re-Run your application in IDLE

    It should be run without any access denied error.

    0 讨论(0)
提交回复
热议问题