The next release of the community beaglebone BSP gets a Windows Embedded Compact 2013 image along with an Internet of Things (IoT) sample code using the M2MQTT library. The WEC2013 demo image on Codeplex now includes the M2MQTT client library built in. To show a real world IoT working example I have included a Visual Studio 2013 sample project.
The Internet of Things has been getting a lot of press lately, but at its core it just remote communication with a network enabled device. Something we in the embedded world have been doing for years. It seems the marketing people just love to invent new terms for the same old things (SoT). I say this tongue-in-cheek of course, IoT can be much more and I am sure we will be hearing more in the months and years to come.
So to use the sample do the following:
Several things to note. First, the client side M2MQTT library is already preinstalled (see MQTT Client library component for Windows Embedded Compact) in the demo image so you only need a reference to the assembly in the device’s project. I have included the assembly (M2Mqtt.dll) in a subdirectory under the SDK’s install path. This is typically C:\Program Files\Windows CE Tools\SDKs\WEC2013 Beaglebone SDK\Managedreference but may be slightly different on your machine. You should set the “Copy Local” property for this reference to False, again, because it is already installed.
Second, you may need to tweak the configuration files (M2MQTT_test.cfg.xml in the device project and/or the App.config in the desktop project) to point to the M2MQTT’s network “broker”. The broker code is included (see https://mqttbroker.codeplex.com/) and can be run locally on the device, the desktop or any other node on the network. To keep it simple I would suggest running the broker on the device along with the sample app. I have included both projects to build the broker targeting the desktop using the full framework or the device using the Compact Framework 3.9.
Third, to debug on the device side you need to initially run the “conmanclient3.exe” app on the device to allow Visual Studio’s debugger to attach to the device over Ethernet and to allow download.
After everything is debugged you can actually place the M2MQTT_test.cfg.xml,M2MQTT_test.exe,GnatMQ.dll and MqttBrokerServerNetCf39.exe files in a \Startup folder on the uSD card to have everything execute on power up. Any .exe or .bat file found in the StartUp folder will automatically launch on start up.
Now lets break down the application. The goal was to show how the M2MQTT messaging protocol uses the TCP/IP transport to transfer data. To that end I selected several data types that simulate various sensor data from the device and commands sent from the PC host. The commands I use control the leds on the Beaglebone so we have immediate visual feedback. We can command the leds to turn on, off or to blink.remotely. In the real world the same I/O could be used to control relays, turning fans on or off, or what ever you can dream of. To simulate sensor data produced by the device and consumed by the PC, I use a simple elapsed timer. The timer starts running at program start up and can be reset at any time ether locally or remotely.
The device’s UI and the controlling PC’s UI is designed to look the same so it doesn’t matter if the user is interacting with the device locally, remotely from the other side of the building or on the other side of the world, the experience is the same.
Please contact me regarding a full installation of this BSP for WINCE2013, and what is necessary for purchasing. Aaron
Of course, I meant the WEC2013 SDK ... see what happens when you work with too many bits at the same time?
Hi David. First, thank you for what must have been a huge amount of work. I have been trying to install the WEC7 SDK, but is always complains that the XML Embedded Tools have to be installed. I've rebuilt my VM with VS2012 and WEC7 many times (most recently using the WEC7 update 5 CD image) and I select the XAML Embedded option in the installer. I get no install errors, but that message always appears when installing the SDK. I wonder if you have any ideas why that may be, or exactly what the installer is looking for with that dependency? Thank you, Phil
Re: Windows Embedded Compact 2013 on Beaglebone gets IoT sample
Please contact me regarding a full installation of this BSP for WINCE2013, and what is necessary for...
-- Aaron Peterson
Re: BeagleBone BSP code clean up
Hi David, Interest in the fully version of the image. Please let me know the commercials. I need clarification...
Re: BeagleBone BSP gets several improvements
Hi David, How can I get a full version (without reboot) of your image available for demonstration?
-- Marco Aurélio Braun
Re: Low power operation on the community IoT Beaglebone BSP (Part 1)
Hello , dvescovi . Because of Job , I use your Beaglebone black BSP which is helpful for me . I want...
Re: Yet Another Gotcha: Compact 7 Update
Hi David, Would you please contact me regarding the wince7 BSP for the BBB? I have a few LCD Capes...
Seems MS may have posed a new updated ISO on MSDN. For those without a subscription, you are still out...
Re: Power management on the Beaglebone part 2–Battery
Hi David, First of all thanks for this, blog it's been very useful. Before I go ahead and solder anything...
Re: More improvements for Beaglebone BSP
Thank you for the fixes. The latest version builds under WEC7! Yay! Next .. have to try deploying it...
Of course, I meant the WEC2013 SDK ... see what happens when you work with too many bits at the same...
Hi David. First, thank you for what must have been a huge amount of work. I have been trying to install...