Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NordicSemiException: Serial port could not be opened...solution found #1671

Open
butchalline opened this issue Sep 12, 2024 · 1 comment
Open

Comments

@butchalline
Copy link

Following this page[ https://wiki.seeedstudio.com/XIAO-BLE-Sense-Bluetooth_Usage/#tech-support--product-discussion] which is titled "Bluetooth Usage (Seeed nRF52 Boards Library)"

Using Arduino IDE 2.3.2, XIAO nRF52840, Example sketch Files>Examples>Adafruit Bluefruit nRF52 libraries>peripheral>
blehid_keyboar.ino

Trying to upload this sketch produces these errors:


_Library Adafruit nRFCrypto has been declared precompiled:
Using precompiled library in c:\Users\occam\Documents\Arduino\libraries\Adafruit_nRFCrypto\src\cortex-m4\fpv4-sp-d16-hard
Sketch uses 125524 bytes (15%) of program storage space. Maximum is 811008 bytes.
Global variables use 14880 bytes (6%) of dynamic memory, leaving 222688 bytes for local variables. Maximum is 237568 bytes.
Upgrading target on COM18 with DFU package C:\Users\occam\AppData\Local\Temp\arduino\sketches\9F5A3A7B965D41E83025B90A6720C1ED\blehid_keyboard.ino.zip. Flow control is disabled, Single bank, Touch disabled

Failed to upgrade target. Error is: Serial port could not be opened on COM18. Reason: could not open port 'COM18': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
Traceback (most recent call last):
File "dfu\dfu_transport_serial.py", line 113, in open
File "serial\serialwin32.py", line 33, in init
File "serial\serialutil.py", line 244, in init
File "serial\serialwin32.py", line 64, in open
serial.serialutil.SerialException: could not open port 'COM18': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 296, in serial
File "dfu\dfu.py", line 235, in dfu_send_images
File "dfu\dfu.py", line 157, in _dfu_send_image
File "dfu\dfu_transport_serial.py", line 115, in open
nordicsemi.exceptions.NordicSemiException: Serial port could not be opened on COM18. Reason: could not open port 'COM18': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

Possible causes:

  • Selected Bootloader version does not match the one on Bluefruit device.
    Please upgrade the Bootloader or select correct version in Tools->Bootloader.
  • Baud rate must be 115200, Flow control must be off.
  • Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode._

Solution is to select: Tools>programmer>Bootloader DFU for Bluefruit nRF52

You should now see this:
....######
Activating new firmware
Device programmed.

Dear Seeed support: Please review and update webpage to prevent more grey hair :-)

Copy link

👋 @butchalline

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant