Between PC (win 7) and Cerberus

GHI guys,

   I just start a new project which will setup a comunication between  PC (win 7) and FEZ Cerberus (Ethernet ENC28 Module).

I test Valkyrie-MT’s sample (mIP - A 100% Managed TCP/IP Stack for .NET MF) and it works very well. Thanks Valkyrie-MT!

I also downloaded Ethernet firmware and the new release SDK (GHI OSHW NETMF v4.2 SDK), I already try the other TCP sockets and WebServer.StartLocalServer

sample. None of them works. Could you provide any piece of sample codes? Our ideal approach is to use WCF.

One more problem. Use MicroSB Card Module. the program hang on forever. Codes as following

public partial class Program : Gadgeteer.Program
{
// GTM.Module definitions
Gadgeteer.Modules.GHIElectronics.SDCard sdCard;

    public static void Main()
    {
        //Important to initialize the Mainboard first
        Mainboard = new GHIElectronics.Gadgeteer.FEZCerberus();			

        Program program = new Program();
        program.InitializeModules();
        program.ProgramStarted();
        program.Run(); // Starts Dispatcher
    }

    private void InitializeModules()
    {   
        // Initialize GTM.Modules and event handlers here.		

        sdCard = new GTM.GHIElectronics.SDCard(7);
    }
}

The program will running at “sdCard = new GTM.GHIElectronics.SDCard(7);” and can’t continue.

But, when I take out the SD module from the motherboard. The program can go through.

Using code tags will make your post more readable. This can be done in two ways:[ol]
Click the “101010” icon and paste your code between the

 tags or...
Select the code within your post and click the "101010" icon.[/ol]
(Generated by QuickReply)

I take out the MicroSD card from the module. The program can continue.
Do I need do something with MicroSD card?


public partial class Program : Gadgeteer.Program
 {
 // GTM.Module definitions
 Gadgeteer.Modules.GHIElectronics.SDCard sdCard;

 public static void Main()
 {
 //Important to initialize the Mainboard first
 Mainboard = new GHIElectronics.Gadgeteer.FEZCerberus(); 

Program program = new Program();
 program.InitializeModules();
 program.ProgramStarted();
 program.Run(); // Starts Dispatcher
 }
 
private void InitializeModules()
 { 
// Initialize GTM.Modules and event handlers here. 

sdCard = new GTM.GHIElectronics.SDCard(7);
 }
 }

Do you get any error messages in the output window when you say the program stops?

I plugged an SDCard module into my Cerberus, added the SDCard on the Program.Gadgeteer designer as you appear to have done, hit F5 and get the following as the last three lines in my debug window:


 Using mainboard GHI Electronics FEZCerberus version 1.1
Program Started
The thread '<No Name>' (0x3) has exited with code 0 (0x0).

I get the same behavior whether or not the card is seated in the SDCard reader.

Have you tried it the Ethernet firmware, I think that’s with what he gets the lockup…

@ stevepresley - I didn’t get any error messages. The debug stop at line “sdCard = new GTM.GHIElectronics.SDCard(7);” , ht F10 won’t continue.

When I take out the MicroSD card, the debug can pass the line. But Insert the card, it dead.

@ Jay Jay - I tried Ethernet and No Ethernet firmware. Both have the same behavior.

Hang on, there may be a bit of confusion that we should make sure everyone is on the same page.

Do you get an error debugging or do you get an error when running ? Make sure you’re doing as everyone else says, hit F5 to deploy and debug, not with breakpoints; does your app still “stop” at the SD Card constructor line? If so, that is not what Steve’s experience shows, and the chances are that your SD card is somewhat different. Can you please try another card and see if you get the same behaviour? What format does the card have, FAT? It’s probably also worth creating a new project to make sure there’s no leftovers from old projects; do as Steve does and just drag the SD card module onto the designer and deploy that.

Can you also report back what SDK you have installed and what the device capabilities report from MFDeploy shows?

@ Brett - I didn’t get any error since the program stoped (lock up) at line “sdCard = new GTM.GHIElectronics.SDCard(7);”
Is there any special requirements about the MicroSD card? I already try three different cards. I also draged the SD card module onto the designer and deploy it.

I use the latest 4.2 version SDK (GHI OSHW NETMF v4.2 SDK). Here is the MFDeply display:

DeviceInfo:
HAL build info: 4.2.0.0, Copyright Oberon microsystems, Inc.
OEM Product codes (vendor, model, SKU): 255, 0, 65535
Serial Numbers (module, system):
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Solution Build Info: 4.2.2.0, Copyright (C) GHI Electronics, LLC
AppDomains:
default, id=1
Assemblies:
mscorlib,4.2.0.0
Microsoft.SPOT.Native,4.2.0.0
Microsoft.SPOT.Hardware,4.2.0.0
Microsoft.SPOT.Graphics,4.2.0.0
Microsoft.SPOT.TinyCore,4.2.0.0
Microsoft.SPOT.Hardware.SerialPort,4.2.0.0
Microsoft.SPOT.IO,4.2.0.0
System.IO,4.2.0.0
Microsoft.SPOT.Hardware.OneWire,4.2.0.0
Microsoft.SPOT.Hardware.Usb,4.2.0.0
Microsoft.SPOT.Hardware.PWM,4.2.0.1
Microsoft.SPOT.Net,4.2.0.0
System,4.2.0.0
GHI.OSHW.Hardware,4.2.2.0
Gadgeteer,2.42.0.0
System.Http,4.2.0.0
GTM.GHIElectronics.SDCard,1.0.0.0
Microsoft.SPOT.Net.Security,4.2.0.0
GHIElectronics.Gadgeteer.FEZCerberus,1.0.5.0
Microsoft.SPOT.Touch,4.2.0.0
System.Net.Security,4.2.0.0
GHISDCard,1.0.0.0

You need to tell us the SDK version in the readme file…

OK, next question, how do you know it stops at that point? Do you have it doing something else, flashing a LED for example, and that stops?

What happens if you do this without a uSD card in place?

Are there “requirements” on SD cards? No, but there have been reports of some that don’t work in older devices, not sure about newer devices, but it’s always a possibility that similar things could occur. Most issues were identified as cards that had a large power requirement that the board couldn’t cope with and adding additional filtering capacitors resolved most of that. What brands are the 3 cards you tried?

@ Brett -

SDK Version v0.0.5 (BETA)
July 23, 2012

I put debug lines before and after “sdCard = new GTM.GHIElectronics.SDCard(7);” . The before lines show up and after not.

I also debug step by step. When the program run at this line and never get over (F10 or F5).

If without SD card (the module still connected), the debug lines can show up before and after line “sdCard = new GTM.GHIElectronics.SDCard(7);” , also works with step by step debug.

The SD card I use : kingston MicroSDHC 4GB class 4 and 2GB class 4. I forgot the other one brand I got from my cowork cellphone.

I only have the SD module and USB hub connected. The power shouldn’t be issue since I use USB hub.

So thanks for clarifying most of the SDK questions. The xpecific version mismatch I was trying to ensure you didn’t have was the version of the HI build on your device (from MFDeploy that is the line that says “Solution Build Info: 4.2.2.0”, and then the comparative section in the SDK readme that says:

[quote]• FEZ Hydra v4.2.2.0, TinyBooter v4.2.2.0
• FEZ Cerberus v4.2.2.0, TinyBooter v4.2.2.0
• GHI OSHW NETMF Library v4.2.2.0
[/quote]

So you have those matching. Thats one key problem eliminated.

So now the problem comes back to the use of the SD card. I assume you checked the release notes that showed that the 0.0.5 beta SDK build is the first build that had the SD card support for the Cerberus family added. So now we have a couple of potential options. First possibility, there’s a bug that’s causing your situation. Second, there’s something wrong with your SD card or module. Given that things work if you don’t have the card installed, you can progress with testing your card in the Cerberus and report if the Cerb can see the card and read/write it as expected. That will help eliminate the SD card as a potential source of problems, and show that your module is operable. It might also help GHI on what they can look at from their end.