Can't run app on FEZ Hydra from VS2012

We gave our son a Gadgeteer kit for Christmas but we have been struggling to get it going. I think we have installed everything correctly but can’t run a simple app from Visual Studio. We have tried it on both VS2012 and VS2013 from different Windows 7 computers but have had the same problem. The app builds correctly but the output on VS indicates it can’t run the code on the board.

Device Deployment Output

Looking for a device on transport ‘USB’
Starting device deployment…
Iteration 0
Opening port \?\usb#vid_1b9f&pid_0102#0000000001#{d32d1d64-963d-463e-874a-8ec8c8082cbf}
Attaching debugger engine…
… cannot attach debugger engine!

I read there may be problems with VS2013 and we had lots of other things installed on Windows 7 so we decided to do a fresh install on a clean system. Here are the steps we followed most recently:

Created a new 120GB partition for this test
Installed Windows 7 Professional SP1 (32 bit)
Computer has 8GB RAM and AMD Athlon II X4 640 CPU
Installed a few programs - AMD video drivers, Chrome etc
Followed the install instructions at https://www.ghielectronics.com/support/netmf

  • installed Visual Studio 2012 for WIndows Desktop
  • installed Microsoft .NET Micro Framework 4.3 (QFE1)
  • installed .NET Gadgeteer Core 2.43.900
  • installed NETMF and Gadgeteer Package 2014 R5
    Connected the FEZ Hydra with USB Client SP module in socket 2
    FEZ Hydra appeared in Device Manager
    Once the drivers loaded in because GHI NETMF Interface
    Started VS 2012 and created a C# Gadgeteer project
    Added FEZ Hydra from VS Toolbox
    Added USB Client SP module from VS Toolbox
    Connected the module to the FEZ Hydra on the Program.gadgeteer diagram in VS
    No changes made to the template code
    Client Start in VS 2012
    Program built correctly - output shown below
    Program failed to deploy - output shown above

I have seen posts here about running FEZ Config, MFDeploy and the SAM-BA Updater. I have tried these on the previous Windows environments, but could not connect successfully and I did not find a COM port for the FEZ in Device Manager.

I’m hoping someone can help. Thanks in advance,
Scott and Aidan

VS Build Output

1>------ Build started: Project: GadgeteerApp1, Configuration: Debug Any CPU ------
1> GadgeteerApp1 → g:\users\scott\documents\visual studio 2012\Projects\GadgeteerApp1\GadgeteerApp1\bin\Debug\GadgeteerApp1.exe
2>------ Deploy started: Project: GadgeteerApp1, Configuration: Debug Any CPU ------
2>Unable to communicate with device USB:Gadgeteer========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

@ scott.kirkman - You might need to update the loader and firmware on the board. Check out this document:

https://www.ghielectronics.com/docs/39/fez-hydra-developers-guide

The last section covers updating the loader, and links to docs for the FEZ Config utility (included with the GHI SDK) for updating the firmware once the loader is updated.

Thanks devhammer

I have tried following those instructions to erase the device, but the COM device does not appear after I ground pin 8 on socket 3 or 4 as per the instructions. So I am not able to successfully run the Update.bat script as I don’t know what the COM port is.

When the device powers up with the pin grounded are the lights on the FEZ Hydra meant to do anything different? For me, they light in the exactly the same way as if the board was powered on normally.

Scott

@ scott.kirkman - For the COM port, open up Device Manager and look for it there. I forget what exactly is showed up as, and I’m away from my PC at the moment. Can check tomorrow.

if the COM port never appears, it’s not going in to bootloader properly. I think you’re not grounding the pins long enough when you reset the device.

I always hold the Hydra down with my left hand (I’m right handed) with a finger on the reset button. Then I touch the pins with a paperclip, press and release reset, and watch Device Manager to see if the COM port pops up. If not, repeat until it does.

Thanks Brett

It’s meant to be grounded for 5 sec right? I counted the 5 sec and then waited a few more seconds, so I am confident it was more than 5 seconds. I didn’t do it with the reset button, I got someone to help me and they plugged in the USB to provide power. Should that work the same way? I can try again with the reset button tonight and will wait for 10 sec.

What are the lights supposed to do when you ground the pin? For me, it does exactly the same as a restart with the reset button or plugging in the USB. The red power light comes on as does the green LED and the green LED goes off after a second or two. Is that normal for a device erase?

There’s no real issue if you leave it for 10 seconds. It should work the same with connecting the USB or reset, but the reason I use reset is that it’s so much easier to do solo and the device won’t move while you do it, so you can’t accidentally un-ground the pin. As GND is pin 10, and pin 8 is the pin physically next to it, so they’re reasonably easy to connect together in the small Gadgeteer socket, but sometimes I will use a breakout or a g-plug as that makes it easier. The only other thing I can think of is if you’re perhaps not on the right pins, https://www.ghielectronics.com/docs/305/gadgeteer-sockets-quick-reference has a quick pic of the socket, the pins you need are away from the polarity notch.

Brett

I am confident I have the right pins but I might try using some different metal probes in case the one I used last wasn’t especially conductive.

Thanks
Scott

then you’re not holding your tongue right when you’re doing it :slight_smile: (watch eevblog videos to get that)

Probes. Paperclip. Yeah, same thing :slight_smile:

@ scott.kirkman - Which hardware revision of the Hydra do you have? Newer versions have a small button near the middle of the board that you can press to enter samba loader mode.

@ scott.kirkman - As a follow-up to my earlier post. I just connected my FEZ Hydra (rev 1.1) to my PC (Windows 8.1 pro, most recent non-Beta GHI SDK), with an extender module on socket 3 with pin 8 connected to ground. On my PC, Device Manager shows “Bossa Program Port (COM11)”.

One caveat is that my Hydra is currently running a custom firmware created by @ taylorza which added support for SignalGenerator functionality, so I’m going to flash to latest 4.3 firmware and double-check the result.

Ran the loader batch file, took a minute or two, but updated successfully on the first try, then reset the board, and it showed in Device Manager as “FEZ Hydra (non-commercial use)”.

Ran FEZ Config, which immediately recognized the board, and used the ping command which returned “Pinging… TinyBooter” as expected.

Switched to the Firmware Updater page in FEZ Config, and ran the update for 4.3, switched back to the “Connection” page. Had problems connecting to the board, and appeared the first firmware update may not have been successful (though I didn’t get any error messages), so I tried the update a second time, with the same result on the connection page.

BUT…it looks like the issue is that FEZ Config is setting the board into loader mode when I click the “Check device for update” button. If I go into the Advanced menu and select the RebootCLR command, and then click the “Ping” button, it responds “Pinging… TinyCLR”.

Next, I created a new Gadgeteer 4.3 project, added the FEZ Hydra mainboard, and set up a timer to blink the debug LED on the board. All works as expected.

Last, but not least, I unplugged the board, grounded pin 8 on the extender again, and plugged the board back in. Once again, the board shows up in Device Manager as “Bossa Program Port (COM11)”.

As @ Brett notes in this thread:

https://www.ghielectronics.com/community/forum/topic?id=17788&page=2

the device may show up under a different name, but the key is checking for the COM port and using that number to run the loader.

If at all possible, using an Extender or similar module to make the connection will be much easier and more reliable than trying to use a paperclip or jumper.

Just to be thorough, I ran through the entire update process again, from grounding pin 8 on socket 3, through deploying the test program. Same results, although when I went to deploy the program, I did have to manually reset the board using the reset button to get the debugger to attach.

Hope that’s helpful…my guess would be that you’re still not getting into booter mode, so a breakout or extender module would be a big help there.

@ John
The board is a FEZ Hydra Rev 1.2. There is no button above socket 9.

I ended up contacting the supplier I bought the board from for suggestions. They offered a refund or a replacement board. I really want to get this going so chose the replacement board. So after many weeks, we are back on this and are experiencing exactly the same problems.

All I have done so far with this new board is to use FEZ Config to ping and check device for update. Neither of these will work. Screenshot attached. I have tried several USB cables with the same result. GHI NETMF Interface appears in Device Manager with no errors.

Any ideas please?
Thanks
Scott

@ scott.kirkman - the new replacement board you received, what hardware revision is it? Is it still 1.2?

@ john, sorry for the delay in responding.

Yes it is an identical board v1.2. Any suggestions of what to try next?

@ scott.kirkman - Check device for update has some issues with Hydra in the current SDK, so I wouldn’t rely on it. When you put the board in loader mode, does an unknown device appear in the device manager? If you have the device manager open, does it refresh when you reset the board into loader mode?

@ john - Here is a screen shot of Device Manager. I have tried to put the board in to loader mode. Device Manager refreshes but this device just comes back again. Here is how I did it.

I have tried following the instructions in the Fez Hydra Developers Guide, but the COM device does not appear after I ground pin 8 on socket 3 or 4 as per the instructions. So I am not able to successfully run the Update.bat script as I don’t know what the COM port is.

When the device powers up with the pin grounded are the lights on the FEZ Hydra meant to do anything different? For me, they light in the exactly the same way as if the board was powered on normally.

If the COM port doesn’t show up, it’s not going into loader mode but it’s just booting normally. You need to keep trying until you get it to appear as a COM port.

Here’s my tip. Open device manager so you can see the COM ports that are visible. Plug in the device normally, you should get the GHI device appear (that’s ok). Using a pair of tweezers or something in your natural hand, with the other hand hold the board down and position your finger on the reset button so you can easily press it. With the tweezers, bridge and HOLD pin 8 and 10 (that’s the pin + GND), then hit reset. When the board starts up, if you had the pins connected it will come up in loader mode and a COM port appears. If it doesn’t, try bridging the pins again and then hit reset. You only need to remove the pin 8 bridge once the board is running.

@ brett - thanks for the reply.
Not sure what happened before but it was going in to loader mode. Tried again and I think it is now. The Fez Hydra device is not present but there is an Unknown Device showing. It has location Port_#0006.Hub_#0003 if that helps. WIndows 7 tries to loader a driver but can’t find one. I searched manually in the GHI folder but it did not recognise any drivers.

Two steps forward and one back. Any advice?

Thanks
Scott

1 Like

@ scott - Update to 8.1 and VS2013 Community Edition is an option, however as far as I know the board should work for Win7 & Vs2012 as well.

Can you connect via MfDeploy, select the USB and board, press ping and choose Menu->Target->Device Capabilities and let us know what you see.

My Hydra+ is on 4.3.6 and is running from VS2013 so it must be possible !!!

Can’t be we all together can’t get this working for you …