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] Serial error: FileNotFoundError

See original GitHub issue

Hi. I am trying to subscribe to the GATT data of the MAXREFDES103 eval product from Maxim/ADI. I am able to connect through the native GUI but I receive an error when attempting to connect to the device via ble-serial v. 2.6. I am on Windows 10 and have onboard bluetooth.

`Started deep scan of 80:6F:B0:DA:24:C5`

`Found device 80:6F:B0:DA:24:C5: HSP2SPO2_3_4.6 (out of 1)`
`SERVICE 00001800-0000-1000-8000-00805f9b34fb (Handle: 1): Generic Access Profile`
    ` CHARACTERISTIC 00002a00-0000-1000-8000-00805f9b34fb (Handle: 2):  ['read']`
    ` CHARACTERISTIC 00002a01-0000-1000-8000-00805f9b34fb (Handle: 4):  ['read']`
     `CHARACTERISTIC 00002a04-0000-1000-8000-00805f9b34fb (Handle: 6):  ['read']`
`SERVICE 00001801-0000-1000-8000-00805f9b34fb (Handle: 8): Generic Attribute Profile`
    ` CHARACTERISTIC 00002a05-0000-1000-8000-00805f9b34fb (Handle: 9):  ['indicate']`
`SERVICE 00001523-1212-efde-1523-785feabcd123 (Handle: 11): Nordic LED Button Service`
    ` CHARACTERISTIC 00001027-1212-efde-1523-785feabcd123 (Handle: 12):  ['read', 'write']`
     `CHARACTERISTIC 00001011-1212-efde-1523-785feabcd123 (Handle: 14):  ['notify']`
         `DESCRIPTOR 00002902-0000-1000-8000-00805f9b34fb (Handle: 16): Client Characteristic Configuration`
`SERVICE 0000180d-0000-1000-8000-00805f9b34fb (Handle: 17): Heart Rate`
     `CHARACTERISTIC 00002a37-0000-1000-8000-00805f9b34fb (Handle: 18):  ['notify']`
        ` DESCRIPTOR 00002902-0000-1000-8000-00805f9b34fb (Handle: 20): Client Characteristic Configuration`

`Completed deep scan of 80:6F:B0:DA:24:C5`

`Finished BLE scan`
`C:\Users\...>ble-serial -d 80:6F:B0:DA:24:C5`
`23:11:29.175 | INFO | ble_interface.py: Receiver set up`
`23:11:29.176 | ERROR | main.py: Unexpected Error: SerialException("could not open port '\\\\\\\\.\\\\BLE': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)")`
`23:11:29.177 | WARNING | main.py: Shutdown initiated`
`23:11:29.178 | INFO | main.py: Shutdown complete.`

I am not sure what causes this error in the third to last line. Can someone help me out?

Also, when I attempt to install the BLE tools as specified at https://github.com/Jakeler/ble-serial/blob/master/README.md I only get to the part where the prompt responds with “Ok.” A new window quickly opens and closes but I don’t see anything. I do have the com0com utility installed in Program Files (x86).

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Jakelercommented, Jul 3, 2022

See the README, especially the section about finding an connecting a device, there is also a list. Only option for writing on this device is the LED Button Service. I am not sure if that is what you want to do with it. For just reading the heart rate or something you might also disable writing with --permit ro, note that you anyway have to specify the read characteristic, as this is non standard profile.

I am closing this again, since it is getting off topic and the original issue is solved. Feel free to open a new discussion thread if you still have questions about characteristics etc.

0reactions
earubincommented, Jul 2, 2022

No I did not, That got rid of the weird path issue with \\.\BLE. Unfortunately, I now have an issue with the device not having a write characteristic. Do you have the link to the file with all the BLE characteristics?

Error for reference: 18:26:16.759 | ERROR | main.py: Unexpected Error: AssertionError("No characteristic in builtin write list ['0000ff01-0000-1000-8000-00805f9b34fb', '0000ff02-0000-1000-8000-00805f9b34fb', '0000ffe1-0000-1000-8000-00805f9b34fb'] found!\n Please specify one with -w/--write-uuid, see also --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 >
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 ... Only I'm on Windows, so...
Read more >
File Not Found Error In Preview but the File IS There
Win 10 Preview Pane. I get an error that says "File Not Found Error It may have been moved, edited, or deleted" ERR_FILE_NOT_FOUND...
Read more >
SerialException: could not open port '/dev/tty.usbmodem1421 ...
I'm trying this project on Windows 10 and I've trained my model with 68% and ... DEPLOY the rc_driver.py because of the Serial...
Read more >
python - File not found error : Unable to access serial port ...
The reason for your error seems to be that the device ( cu.serial-110 ) in /dev no longer exists (whereas it did previously)....
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