Main Site Documentation

G400-D module


#1

Hello,

I’m looking for some guidance on what the issue might be, I’m a first time user of GHI products and first time trying to setup a G400-D module.

Here is what I have:

  • G400-D module
  • G400HDR Breakout board
  • USB Client DP Module

I’m on Windows 7 machine and have installed the following software in this order:

  • .NET Micro Framework SDK v4.3 RTM (QFE1)
  • NETMF and Gadgeteer Package 2014 R2

After installing the above, I plugged in the USB and it recognized the G400 and so far things look good.

I then used MFDeploy and did a ping and it responded with TinyCLR. Checking the device capabilities shows ClrInfo.clrVersion: 4.2.0.0.

So at this point I wanted to see if I could blink the on board led using the example @ https://www.ghielectronics.com/docs/112/developersguide-g400-module

So using Visual Studio 2012 professional I created a Micro Framework Console Application project. I then went to the project properties -> .NET Micro Framework tab and selected Transport as USB and Device “G400_G400”. Then I set the target framework to “.NET Micro Framework 4.2”. I added the “GHI.Hardware.G400” and “Microsoft.SPOT.Hardware” assemblies.

At this point when I deploy the project I get the following:

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…
… debugger engine attached!
Querying device assemblies…
Found Assembly mscorlib 4.2.0.0
Found Assembly Microsoft.SPOT.Native 4.2.0.0
Found Assembly Microsoft.SPOT.Security.PKCS11 4.2.0.0
Found Assembly System.Security 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware 4.2.0.0
Found Assembly Microsoft.SPOT.Graphics 4.2.0.0
Found Assembly Microsoft.SPOT.TinyCore 4.2.0.0
Found Assembly Microsoft.SPOT.IO 4.2.0.0
Found Assembly System.IO 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware.Usb 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.2.0.0
Found Assembly Microsoft.SPOT.Touch 4.2.0.0
Found Assembly Microsoft.SPOT.Ink 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware.PWM 4.2.0.1
Adding pe file C:\NETMF\MFConsoleApplication1\MFConsoleApplication1\bin\Debug\le\MFConsoleApplication1.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.2 SDK\Libraries\le\ghi.hardware.g400.pe to deployment bundle
Attempting deployment…
Incrementally deploying assemblies to device
Assemblies not successfully deployed to device.
Deployment to the device was not successful.

Not sure where to go from here, any suggestions on what I need to do or where I went wrong?

Thanks


#2

You missed one important step: Updating the Firmware.
The firmware on the board must match the installed SDK.
The 2014 R2 contains the latest (and final) 4.2 version and the 4.3.3.
According to your deploy output you created a 4.2 program.

What you need to do now is to update firmware of the G400D.
This is relatively easi to do with FEZ config.
But currently the Boot loader changes with the firmware, which should (or even must) match the firmware.
Now comes the nasty part: You can’t use FEZConfig to update the boot loader on G400 based boards. You have to use the Atmel tools.
Check out the documentation how to do that:
https://www.ghielectronics.com/docs/236/loader-tinybooter-update-g400
Then use FEZConfig to update the firmware.

btw. : Why do you use the 4.2 SDK? If there is no special reason, you should use the latest firmware, which is 4.3.3.
To do so deploy the 4.3.3 firmware to the G400D and choose NETMF 4.3 in your application settings.


#3

Thanks for the quick reply, I appreciate the help. I was using version 4.2 because that version of the firmware was loaded on the device or so I thought. Ok, so you are saying that the loader and firmware on the device is not the same version that shipped with package 2014 R2, so here is what I did.

At this point I unplugged the device from USB and plugged it back in and it was recognized by USB once again. So things looked good so far.

I then launched Fez Config and it recognized it via USB showing “G400_G400”. I then clicked the “Firmware Updater” button.

On the “The device’s firmware version” line it showed “Please wait…”. After a while it changed to “The device is not ready for update!”. At this point I don’t have a way to continue. Any suggestions what to do next?

Thanks


#4

Most likly all GHIO modules have a 4.2 Firmware on them, but the exact Versions is important: 4.2.9, 4.2.11, …

for FW update:
have you tried to reset the G400, disconnect from power.
Do you have an additional power supply connected?


#5

Most likly all GHIO modules have a 4.2 Firmware on them, but the exact Versions is important: 4.2.9, 4.2.11, …

Gotcha, so that would explain why it didn’t work before, I’m with ya.

have you tried to reset the G400, disconnect from power.

I hit the reset button and disconnected from power.

Do you have an additional power supply connected?

Nope, just using the USB cable.

Thanks.


#6

For FW Update you should not rely on USB power.
I would disconnect everything but USB Client DP and connect an extra power supply to it.
May be try the loader update again with external power.
Also switching the USB Port might help. USB 2.0 ports are preferable.


#7

Still no luck.

I connected a 12 VDC adapter @ 1A, along with the USB cable and USB Client DP.

I update the loader the log file shows “Loader Update Complete”.

I then did a reset and USB recognized it (extra adapter still attached). Then I launched Fez Config which recognized it on USB as “G400_G400”. However when I select the “Firmware Update” button I get the same as before. On the “The device’s firmware version” line it showed “Please wait…”. After a while it changed to “The device is not ready for update!”.

Any suggestions what to do next?

Thanks.


#8

manual loader update is very specific about needing write access to the directory that the update runs in (in my view the methodology is flawed and unnecessarily requires admin rights - I’ll fix the script and repost it elsewhere for GHI to consider). Make sure you are running the command prompt as an elevated user

When you are going through the process, please make sure you delete the log file before you run so you know it has the content from the actual latest attempt to install.

Make sure you capture a screenshot of the device manager info showing the COM port that was detected.


#9

Still no luck per your suggestions Brett.

I deleted the loader log file. I launched the command prompt as “Administrator” and ran the update. It completed and the log file shows “Loader Update Complete”.

I hit the reset button and USB recognized it. I launched Fez Config under as “Administrator” and which recognized it on USB as “G400_G400”. However when I select the “Firmware Update” button I get the same as before. On the “The device’s firmware version” line it showed “Please wait…”. After a while it changed to “The device is not ready for update!”.

See attached screen shots.

Thanks.


#10

looking all good from my perspective !

Not knowing the mechanics of this all, I’m at a bit of a loss. I’ve a faint memory about people needing to reboot CLR (not that technically there is one loaded) or some other setting in FezConfig that helped. Can you open MFDeploy and ping the device now ? Maybe check in there for other settings you can look at.

Will try to dig out my G400 and see if I can repro any of this


#11

MFDeploy ping returns "TinyBooter’. Not sure what else to try in MFDeploy.

Thanks.


#12

Tinybooter = expected, and cool.
Will get G400 out now :slight_smile:


#13

Thanks for the help, looking forward to getting this to work.


#14

OK, so I am on an older PC with older SDK and potentially older drivers.

I plugged the raptor in to the PC, it was detected as the GHI netmf debug interface device. Didn’t care about what the current firmware was so just went to the tinybooter update instructions. Hotwired pin 8 and 10 on socket 3, and then applied power. Device came up as GPS Camera Detect on COM5. Opened an admin-rights command prompt. moved to my SDK’s directory:

C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\G400\Firmware\TinyBooter

For me, I ran ProgramG400.bat COM5

Results were: completed deployment of the tinybooter.

Restarted device; device shows up as GHI netmf device again. Open MFDeploy, set target to USB, and ping… results:
Pinging… TinyBooter

FezConfig - check device shows:

[quote]Loader (TinyBooter) version information:
4.2.11.2 on this computer.
4.2.11.2 on this device.

The Loader (TinyBooter) is up to date. <<<

Firmware (TinyCLR) version information:
4.2.11.2 on this computer.
Firmware (TinyCLR) Version: Not present on the device.
The device is in Loader mode.
Click on ‘Reboot CLR’ under the Advanced menu to reboot the device.[/quote]

When I go to firmware updater screen, the firmware is detected as expected (is in Tinybooter mode) and I can install the firmware correctly.

FezConfig rebooted the device and it appears again as the GHI netmf device; MFDeploy shows TinyCLR running.

So, end result: not the same as your experience :frowning:

I suspect this is related to USB drivers. If you have another PC that doesn’t have the GHI SDKs installed and hasn’t had a Fez device connected to it, then it might be worth grabbing an older SDK from https://www.ghielectronics.com/support/netmf/sdks and installing that, to see if the drivers (or PC) behave better.


#15

Thanks for trying that Brett.

Ok, so I got it working, but a very frustrating start.

I used a different computer, installed the latest per my first post (same as the first machine). Then just launched Fez Config and it recognized it with no issue and installed Firmware 4.3.3.0 (since I had the loader already on there from the first machine). Then opened up Visual Studio and tried the LED blinker program just as a test and it all went without a hitch. Almost too easy. :slight_smile:

So then I went back to the first machine, launched Visual Studio and it won’t deploy to the board. So first machine still can’t talk to the G400 but second machine has no issue.

Since I installed the exact same drivers, software, same USB cable, etc, on the second machine and it is working my conclusion is hardware wise everything is fine but somehow some driver is not compatible with the first machine (don’t know what).

Thanks for the help, it helped a lot knowing that I was on the right track.

Hope from here onward it’s not as frustrating.