How to make those RPi1's play in the AllJoyn world with Windows IoT

I have five RPi2’s which will end up running Windows 10 IoT core either as development nodes or as working nodes in my home, office and car. However, I also have nine RPi Model B units that cannot run Windows 10. Well, what to do with those? That’s a fair chunk of change and they are still pretty capable devices! But I don’t want to have to manage different programming environments and different tools just to preserve their value.

So my solution : Build AllJoyn from source with the Unity C# bindings so that they can interact with my Windows 10 IoT Core devices and my .Net Micro Framework and Windows 10 desktop and phone devices. There will still be some AllJoyn differences to abstract away, but at least I can use C# and Visual Studio and benefit from meaningful code and skills reuse.

Now I have not finished the whole process from end to end, but you can follow along here : http://myinternetthings.blogspot.com/

So far, I have succeeded in preparing two RPi Model B devices - one headed and one headless, and compiled AllJoyn for each. Today’s article (Part 1) is about preparing the RPi devices and tomorrow’s Part 2 will cover building AllJoyn with the C, C++ and C# bindings. That much is done.

Subsequent articles will cover creating simple AllJoyn provider and consumer services that interact with AllJoyn on Windows 10 IoT Core, Phone and Desktop, and each part will be posted as I conquer each milestone. I’ll also integrate NETMF devices as the AllJoyn Micro Framework Thin Client becomes available. Please feel free to comment and post questions on the individual articles, and if you have additional ideas or requests, maybe I will work them in too.

If this works out the way I hope it will, we will have a constellation of NETMF, Linux RPi1, and Windows UWP devices and services that are all able to interact with each other in a single seamless system of home/lifestyle automation.

7 Likes

@ mcalsyn - That sounds pretty good to me. I am fiddling around with node.js and RPI B+ using this node module:

Installing this package will automatically compile the required AllJoyn components on the PI and you can use the Raspian image. One thing is quite important. You need to use node 0.10.35 to successfully install this module.

When will the ThinClient be available for NetMF ? Do you have any information’s on this?

1 Like

I have been doing a project using the mono environment on RPi2 and B with Raspbian. I compile on VS2013 and use the full .NET library. There is monodevelop, which is a C# IDE, that runs on the Pi’s. It is actually quite usable on the Pi 2s, include debugging.

I like being able to test a program on the PC and then just copy it over to the Pi’s. I have a rdp server running on Pi’s, so I can see what is happening with Remote Desktop. I use a Samba server on the Pi’s for transferring files.

If it runs on .NET then most likely it will run with mono. WPF being the exception. I have used Windows Forms, with mixed results.

I am far far from a Unix expert, but have used Linux for a few years. A person with limited Linux experience may not be as happy as I have been in the environment.

3 Likes

@ Mike - That’s exactly what I am doing, with the exception that I am also throwing AllJoyn into the mix so that I have one message-bus model.

You might be interested in http://resin.io/ then. It uses docker to deploy containers to RPi1, RPi2 or Beaglebone devices and to monitor and control those devices from a single console. I posted a couple articles on how to deploy Mono-based apps using resin.io. Another advantage there is that you can deploy those same containers to Docker on Windows, OSX and the cloud.

The resin.io model allows you to push updates to ones, tens or hundreds of devices from a central console and never have to visit the deployed nodes, and it uses a secure channel to talk with the devices. It’s currently a free service (and will stay as such until September) and it’s extremely easy to work with.

I am not affiliated with the resin.io folks in any way. I’ve just had a lot of success simplifying my life through their service.

Notes on using Mono and Resin.io for devops - The Internet of My Things: Notes on using Mono and Resin.io for devops
Resin.net …Net Examples - The Internet of My Things: Resin.io .net examples

2 Likes

Part 2 (Building AllJoyn) is online now : The Internet of My Things: AllJoyn for Raspberry Pi Model B, Part 2 of N - Build AllJoyn for Raspberry Pi Linux

Fair warning : this compile takes over an hour on an RPi Model B. I have not tried cross-compiling from another system.

4 Likes

Parts 3 and 4 are online now :
Build AllJoyn for Linux Desktop - The Internet of My Things: AllJoyn for Raspberry Pi Model B, Part 3 of N - Build AllJoyn for Linux Desktop
Inter-Node Communication - http://myinternetthings.blogspot.com/2015/05/alljoyn-for-raspberry-pi-model-b-part-4.html

The work for Part 5 is underway now, but technically well understood - Accessing AllJoyn on RPi and Linux from .Net (Mono). The code for that is a work in progress (it isn’t all there yet), but you can follow it at : GitHub - DotNetOpenAutomation/AllJoynDotNet: AllJoyn bindings for .Net/Mono

Part 6 is uncharted territory (i.e., I haven’t seen it work yet myself), but it’s where the rubber hits the Windows road - Interop with Windows 10 AllJoyn (which also implies future interop with the Tiny Core coming to NETMF).

3 Likes