Topical administrative note: please be wary of Windows 7 SP1! I innocently went to install it on my main machine, it rebooted and on the Windows Logo screen, it said like access-denied for a registry key. I couldn’t boot into safe mode or anything. I could only boot into a command-prompt, copy my data off to a drive and re-installed Windows 7! I am a fan of re-installing every once in a while anyway, but it was unexpected and gave me quick a bit of down-time. Once I did bring up Win7 on this machine, I did try to install SP1 again before going further, and this time it did go fine.
OK – so when we last left off, I had done some basics with the GHI Electronics “Panda” board. However, I quickly discovered that a bare-bones board can’t really do much on it’s own. It had no network connectivity, no display, no sound, no storage, etc. To do anything effective with these NETMF devices, you do need at least some peripherals. So, I ended up getting a Cobra board, a 3.5” display, and a WiFi extension – here they are:
First, the Cobra came with a touchscreen UI app for the screen. So, when I first booted it up, it sort of showcased the WPF-ish interface and the touch capabilities, cool! However, I was more interested in deploying my own code to this thing, so I started digging in…
If you do get a setup like this, here are some time-savers of what you will almost definitely need, regardless of what you are working on (some of this is documented here):
- .NET Micro Framework SDK v4.1 (includes API’s and VS2010 project templates/items)
- GHI NETMF SDK v4.1 (has board-specific API’s – applies to ALL GHI hardware)
- TeraTerm (you need their version specifically to update firmware)
- GHI USB Drivers (32-bit | 64-bit) (so you can can both debug and deploy to GHI hardware)
- Video of how to update the firmware (you really should do this before trying to deploy)
- An excellent/complete network code sample of how to enable onboard ethernet or wifi, how to configure the hardware, then how to use DHCP to get an IP, then display the network settings.
- An excellent/complete display code sample that lets you write to the display, and where it scrolls once the screen fills up. You could create a window, and make a whole UI – but this is fast-n-easy “Console” analog, like a Console.WriteLine.
Lastly, there are two other notable resources – YouTube and google – type “fez” and “cobra” and you’ll find plenty of information. Also, the forums on TinyClr/GHI are really great:
Really helpful group, lots of code samples, lots of valuable information. If you search there, you are likely to find your answer right away. I had probably 15 questions – and they were already answered in previous posts. For the new questions I had, people responded pretty quickly.
What Have I Learned?
So what have I learned so far? Well probably the biggest thing about this whole embedded initiative, is it’s all about the support structure. GHIElectronics.com has a pretty great offering of NETMF hardware – but some other vendors do to. However, TinyClr.com (where they do their support) has a boatload of information and an active community. This is extremely important. If I got some other board, with no documentation, no API, no real information on how to update the firmware – this would be a very different experience for me.
So at this point, I’m highly recommending GHI if you want to do any Micro Framework stuff. They really have the whole thing dialed in from turnkey hardware, solid API’s, and an active community.
As of now, I can write to the screen, I was able to turn on WiFi, connect to my WAP (I used WPA, and it worked fine). The WiFi adapter gets an IP address, but doesn’t respond to a ping. This is supposed to be a full TCP/IP stack – so I would sort of assume that it would respect ICMP requests.
No matter, my next step is to try to host a WCF server on this, and see if I can connect from my computer with a different project. The .NET Micro Framework SDK comes with a couple of WCF samples, so hopefully that will work.
If I can get past that, then the next step beyond is to hook up a sensor (like, I have a couple of light and temperature sensors) and see if I can efficiently/effectively offer that real-time data via the service. In reality, I should really store the in-flight analog data, and have the WCF service read the data store. This Cobra board has a regular-sized SD slot, so I will pick up an SD card and see if I can access it. So the end-state would be monitoring these analog sensors, writing the values to SD-card storage, then offer a WCF service to allow my computer to connect and gather that data that was stored.
…I have a ton of other interesting things going on too, I will try to put up a few more posts in the coming days. 5.5 more weeks of school left!!