Meadow deployment issues

I’ve had many successful deployments to my Meadow F7 over the past couple of days, but it’s recently stopped working.

I now get either:

1>------ Deploy started: Project: HelloMeadow, Configuration: Debug Any CPU ------
1>Deploying to Meadow on COM3...
1>Initializing Meadow
1>SerialPort cannot be null
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

or

1>------ Deploy started: Project: HelloMeadow, Configuration: Debug Any CPU ------
1>Deploying to Meadow on COM3...
1>Initializing Meadow
1>Checking files on device (may take several seconds)
1>Writing App.exe
1>The semaphore timeout period has expired.
1>
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Sometimes it fails quickly, but other times Visual Studio will hang for a considerable amount of time first.

I’ve just tried re-flashing the Meadow.OS kernel / runtime but this hasn’t improved the situation. I’ve rebooted my PC and the Meadow. Currently looking for another USB micro cable just in case (edit: cable seems good - different cable hasn’t helped).

Is there anything else I should try?

EDIT: just tried deploying from a different PC - same issue (The semaphore timeout period has expired.). Makes me think it might be an issue with the Meadow itself. Is there any way to “factory reset” beyond re-flashing the firmware?

Another intermittent error message:

1>------ Deploy started: Project: HelloMeadow, Configuration: Debug Any CPU ------
1>Deploying to Meadow on COM3...
1>Initializing Meadow
1>Can't read Meadow device
1>Failed to initialize Meadow. Trying reconnecting the device.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I’ve now tried from 3 different PCs, with 3 different cables - ruling out hardware.

I’ve tried unplugging all external connections from the Meadow board - ruling out peripherals.

I’ve tried to flash the template “blinky” application with no customisations - ruling out my software.

Tried re-flashing an earlier firmware (downloaded 8th November, not sure what version as the release notes don’t seem to include a date) - still no luck.

I seem to be getting the same issues, however I have only just got my Meadow so haven’t successfully deployed at all yet.
I’ve updated the OS kernel and runtime as per the instructions. The device is appearing in VS in the Meadow Device Explorer.

I am trying to deploy the vanilla blinky app template. VS hangs for a long time and I get either:

2>------ Deploy started: Project: MeadowApplication1, Configuration: Debug Any CPU ------
2>Deploying to Meadow on COM5...
2>Initializing Meadow
2>SerialPort cannot be null

or

1>------ Deploy started: Project: MeadowApplication1, Configuration: Debug Any CPU ------
1>Deploying to Meadow on COM5...
1>Initializing Meadow
1>Can't read Meadow device
1>Failed to initialize Meadow. Trying reconnecting the device.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Running

Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description

will sometimes list the device as being connected and other times the command just freezes until I unplug the device at which point the device gets listed.

Name                     DeviceID Description
----                     -------- -----------
USB Serial Device (COM5) COM5     USB Serial Device

Any ideas?

I get the same result, I believe this is OK though:

Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description

Name                                               DeviceID Description
----                                               -------- -----------
USB Serial Device (COM3)                           COM3     USB Serial Device

The reason I mention it is because the command should return pretty much straight away and not hang, which is what is occurring with my board plugged in.

If I have a LoRa or an MxChip plugged in, it is returning instantly.

It’s take a while, but I think I understand what happened to me now.

The Meadow only supports running an assembly called App.exe - I changed the AssemblyName and that’s when the semaphore timeout error started.

The only thing that fixed it for me was using the CLI to erase the flash (Meadow.CLI.exe --EraseFlash, wait 3 minutes, reboot board).

Note that I was unsuccessful using the CLI version I downloaded from the developer site, but it worked using CLI binaries provided by @Nevyn.

Have you ever deployed with an AssemblyName other than App.exe?

Ah, just spotted this - unlikely to be the same issue then, sorry!

Hello,

I too am experiencing this issue as presented when deploying a vanilla application on 1 of 3 boards. Here, you have indicated that your were able to resolve your issue by erasing the flash with the CLI provided by @Nevyn. I guess my question here is how would one go about acquiring said binaries to resolve this issue? I am sure this is going to happen again for other.

1>------ Deploy started: Project: HelloMeadow, Configuration: Debug Any CPU ------
1>Deploying to Meadow on COM3...
1>Initializing Meadow
1>Can't read Meadow device
1>Failed to initialize Meadow. Trying reconnecting the device.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

This error I found can occur if the computer puts the usb port in question to sleep. I disabled that from the s3 sleep power management settings. For some reason, once the PC puts that port to sleep, you have to re-discover it in visual studio, and it will show up as another device with the same port name. I have found that the device at the top of the list is always the most current one.

I’ve the same problem. Just received the board and updated the firmware as suggested in the guide.
The board always shows the flashing led loop, but I never was able to deploy.

1>------ Deploy started: Project: MeadowApplication2, Configuration: Debug Any CPU ------
1>Deploying to Meadow on COM4...
1>Initializing Meadow
1>Checking files on device (may take several seconds)
1>Writing App.exe
1>De time-outperiode van de semafoor is verlopen.
1>
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

When you go to the meadow device window in visual studio, do you have multiple instances of the COM4 port listed? @Wootah

@nrobitsch No, just one. Unplugging the meadow makes com4 disappear as well, so it should be good.

  1. UPDATE USB Driver with Zadig (I had to try twice + restart)
  2. FLASH
  3. DEPLOY
  4. Sometimes VS cannot deploy stuck in the deploy (The semaphore timeout period has expired.) you will need to press RST button then re-deploy. That does the trick.

Hey guys, just to add another possibility and solution - I consistently get the same semaphore timeout message because apparently the LED pulsing test app freezes on my Meadows shortly after it’s fully loaded.

For me the trick is to press the RST button on the device and then redeploy right within the first few seconds after via Visual Studio. Didn’t mess with the CLI so far and works every time, unless I wait too long (~10+ seconds).


EDIT: In this case it was caused by the call to StartPulse() in the sample project. Call StartBlink() instead and deployment & LED work as expected.

1 Like