1

On my Windows PC I have 5 serial ports, but the Device Explorer of nanoframework is only scanning one of them. All serial ports work fine in other applications. I have connected an ESP32 device with a usb cable. (This one: https://www.dfrobot.com/product-1798.html). The device work fine with Arduino (Blink sketch). I have also installed nanoframework on this device:

C:\>nanoff --platform esp32 --serialport COM2 --update --preview
.NET nanoFramework Firmware Flasher v2.0.9+947a088d7c
Copyright (C) 2019 .NET Foundation and nanoFramework project contributors


Using COM2 @ 1500000 baud to connect to ESP32.
Reading details from chip...
OK

Connected to:
ESP32 (ESP32-D0WDQ6 (revision 1))
Features WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Flash size 8MB W25Q64_V from WINBOND_NEX (manufacturer 0x239 device 0x16407)
PSRAM: not available
Crystal 40MHz
MAC **:**:**:**:**:**


No target name was provided! Using 'ESP32_REV0' based on the device characteristics.

Trying to find ESP32_REV0 in development repository...OK
Extracting ESP32_REV0-1.7.3-preview.243.zip...OK

Updating to 1.7.3-preview.243

Erasing flash...
OK
Flashing firmware...
Wrote 24192 bytes (15087 compressed) at 0x00001000 in 0.5 seconds (effective 416.9 kbit/s)...
Hash of data verified.
Wrote 1070432 bytes (704348 compressed) at 0x00010000 in 10.9 seconds (effective 783.4 kbit/s)...
Hash of data verified.
Wrote 3072 bytes (136 compressed) at 0x00008000 in 0.1 seconds (effective 463.2 kbit/s)...
Hash of data verified.
OK 

Here is a list of my serial ports:

My serial ports

And here is the output of Device Explorer scan:

13:56:41.233 [Starting device watchers]
13:56:41.233 [PortSerial device watcher started @ Thread 105 [ProcessID: 12456]]
13:56:41.233 [PortTcpIp network watcher started @ Thread 27 [ProcessID: 12456]]
13:56:41.234 [NanoDevices: new device arrival COM10]
13:56:41.234 [NanoDevices: candidate nano device COM10]
13:56:41.335 [NanoDevices: quitting device COM10]
13:56:41.335 [NanoDevices: Serial device enumeration completed. Found 0 devices]

There are no ports blacklisted in Device Explorer.

Hneel
  • 95
  • 10

2 Answers2

1

Can you enable the output of detailed progress messages in Device Explorer by clicking the Warning icon there?

You'll see that Device Explorer is actually trying to communicate with all the COM ports that you have there. The thing is that it's probably getting locked on one of those virtual ports. From the above picture, if you add COM8 and COM9 to the exclusion list the detection will go through successfully.

José Simões
  • 606
  • 1
  • 5
  • 12
  • The output I included is already with the warning icon active. The device is connected to COM2, so that should come before the others. Also, how do I include COM ports to the blacklist? Something like "COM8, COM9"? seperated by what? Spaces, commas, semicolons? I can't find information about that. – Hneel Jan 27 '22 at 08:43
  • When I enumerate the serial ports on my computer with own software I notice that COM10 is the first. This one is some internal PCI based port. COM8 and COM9 are virtual ports. COM1 and COM2 are USB based ports. Perhaps this helps in understanding what's going on? – Hneel Jan 28 '22 at 08:52
  • 1. Open the Settings dialog in Device Explorer (cog wheel icon). 2. Go to General tab. 3. Add to the COM port exclusion list the COM port(s) to exclude, separated by a semi-column, no spaces. (in your case, that would be "COM8;COM9;COM10") – José Simões Jan 28 '22 at 09:50
  • 1
    I changed my ESP32 port from COM8 to COM1 and got detected almost inmediately. @JoséSimões you were right that some port in the list gets the scanner stuck (my computer has 8 bluetooth ports, don't know why :-) – Julian Maza Apr 01 '23 at 17:28
0

Fixed it by completely removing Visual Studio and everything related and reinstalling it. Now it sees my device on COM2.

Hneel
  • 95
  • 10