question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows 10 Error: could not open port '\\\\.\\BLE': FileNotFoundError

See original GitHub issue

Hi!

I am really interested in this utility. It should be very useful. I try ble-serial on win10, but fail. Why? com0com_setup

Please help me… Thank you!

D:\WPy64-3880\scripts>ble-scan
Started BLE scan

C1:23:48:27:0A:32 (RSSI=-56): C_Watch
51:25:6E:D6:6F:62 (RSSI=-95):

Finished BLE scan
D:\WPy64-3880\scripts>ble-serial -d C1:23:48:27:0A:32
16:34:00.060 | INFO | ble_interface.py: Receiver set up
16:34:00.061 | ERROR | main.py: Unexpected Error: could not open port '\\\\.\\BLE': FileNotFoundError(2, '系統找不到指定的檔案。', None, 2)
16:34:00.061 | WARNING | main.py: Shutdown initiated
Traceback (most recent call last):
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\WPy64-3880\python-3.8.8.amd64\Scripts\ble-serial.exe\__main__.py", line 7, in <module>
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\site-packages\ble_serial\main.py", line 96, in launch
    m.start()
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\site-packages\ble_serial\main.py", line 13, in start
    asyncio.run(self._run())
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\site-packages\ble_serial\main.py", line 77, in _run
    self.uart.remove()
  File "d:\wpy64-3880\python-3.8.8.amd64\lib\site-packages\ble_serial\ports\windows_com0com.py", line 58, in remove
    self.serial.close()
AttributeError: 'COM' object has no attribute 'serial'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lautumn1990commented, Jul 7, 2021

Great, it took effect after disable the secure boot option. I also missed this note. I thought it was not relevant. When I changed the settings from the BIOS, everything was normal. @cjgu00 @Jakeler Thanks a million!

1reaction
cjgu00commented, Jul 7, 2021

Hi!

Finally, I found why I failed on the 1st computer but succeeded on the 2nd one! The 1st computer is a pretty new one of my friend. I missed the following note because I had no idea what is ‘secure boot’. Maybe some words about that could be helpful for newbies like me.

Image 001

After fixed, the new computer could run normally.

The 2nd computer is my old computer. It didn’t have ‘secure boot’ option. So it could run without changing any settings.

Hope this can help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - pyserial error - cannot open port - Stack Overflow
From this I receive a dialog box with the error "SerialException: could not open port 'COM2': FileNotFoundError(2,'The system cannot find ...
Read more >
could not open port 'COM2': FileNotFoundError(2, 'The system ...
I have installed all python libraries, when it comes to this line ser = serial.Serial('COM3', 9600, timeout = 0) it spits error. I...
Read more >
I need help with pySerial - Python Forum
I'm trying to write a program that reads from a serial port and writes to a file. But I can't make pySerial work....
Read more >
8 Easy Ways to Fix Unable to Open Serial Port
1. Make sure that you have the necessary drivers · 2. Verify that the port isn't open/disconnect the cable · 3. Stop the...
Read more >
python - File not found error : Unable to access serial port ...
usbserial-110 as one of the ports. Now, when I re-run the program after a month, I am unable to find this port and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found