MF Version for a 2010 FEZ Cobra with VS 2012

I have an old FEZ Cobra with a SoftwareVersion.BuildDate of “Aug 9 2010”. The last time I developed on this hardware I was using VS 2010 with a .NET MF version of 4.1. My new machine has VS 2012.

Which version of the MF should I use with this old FEZ Cobra and VS 2012?

You can use netmf 4.1 if you insist. You have VS2012 which can use the most recent 4.3 SDKs, so just install everything that this post tells you to and update the firmware to 4.3.

On this FEZ Cobra can I use the Gadgeteer.Networking.HttpHelper? If not, what else is available to call a REST service from the device?

The old FEZ Cobra is not a Gadgeteer device. There are several ways to proceed.

The old FEZ Cobra and the Gadgeteer Spider both use the EMX module. So, you could setup a Spider project, and load the code to the Cobra. Of course, you would have to convert Gadgeteer sockets and pins to the Cobra’s pins.

You could also get the Gadgeteer code you need (Web Client? ) and modify it to run under a regular MF console application. I recently did this with the Gadgeteer web server, and it took under a half hour to do.

Thanks,

I’m going to make it easy on myself and purchase a Gadgeteer device for this effort. Before I do so, I wanted to verify that the Gadgeteer can send IO state / sensor data to a REST service? I think I will need to use the Gadgeteer.Networking.HttpHelper. Is this correct? In your note you mentioned that I may “need (Web Client? )”?

@ Nicholas - I was saying that if you did not want to use Gadgeteer, you could still “borrow” the Gadgeteer HTTP code and run it on a non-Gadgeteer board.

But, you made the right decision in getting a Gadgeteer board. :clap:

Just to verify, I will use the Gadgeteer.Networking.HttpHelper to make my rest call? You mentioned I may “need (Web Client? )”, is this different?

nothing you need to do requires Gadgeteer, and nothing you need to do can’t be done on a Cobra.

Understood, what software component will I use to make my REST call?

standard HTTP calls. There are many examples in codeshare - here’s one that I don’t think relies on Gadgeteer even though the app is a Gadgeteer app https://www.ghielectronics.com/community/codeshare/entry/727

Thanks again,
I read this Sending .NET Gadgeteer Sensor Data to a REST Web Service | Integral Design
And it has the following:

    public void SendPulseOximeterData(string name, string pulse, string oxg)
    {
        led.BlinkRepeatedly(GT.Color.White);

        POSTContent emptyPost = new POSTContent();
        var req =
            HttpHelper.CreateHttpPostRequest("http://integral-data.com/PulseOxData/reading/" +
                       name + "/" + pulse + "/" + oxg, emptyPost, null);

        req.ResponseReceived += new HttpRequest.ResponseHandler(req_ResponseReceived);
        req.SendRequest();
    }

    void req_ResponseReceived(HttpRequest sender, HttpResponse response)
    {
        if (response.StatusCode != "200")
        {
            Debug.Print(response.StatusCode);
            IsNetworkUp = false;
        }

        led.TurnOff();
    }

The HttpHelper seems to cut out some of the coding. What are the pros and cons compared to the “Open.Sen.se.DataFeed” example?

ultimately they use similar calls. This uses HTTPHelper… which just wraps some of the underlying calls. Pick one. In fact, you are free to try em all ! :slight_smile:

I’ve got the HTTP Rest example working on the emulator (thanks) but when I try to update the firmware of my FEZ Cobra I get a “Signature FAIL” message on the device. The FEZ Config app says “EMX Updating Failed!”.
Any ideas?