Options For Setting Up an AllJoyn Router

12 Feb

The AllJoyn framework for device communication is increasingly gaining traction, but it is still not broadly installed on consumer devices.  This can pose a problem for developers working in the space, as an AllJoyn Router is required on the network for AllJoyn devices to communicate.

alljoyn-bubble-diagram

The AllJoyn Router works on the local network to connect bus segments and facilitate discovery of services.  Some devices might run their own router, but increasingly developers are shifting to lightweight AllJoyn clients which require an existing router on the LAN.

Don’t Worry, This Is Only Temporary

The problem of typical consumer networks not containing an AllJoyn router is a very short-term challenge for several reasons:

1) Windows 10 contains a native AllJoyn Router running as a Windows Service, once this OS is released it will mean all new Windows machines provide this service automatically on the network.  This alone provides very high consumer saturation.  (This is publicly released as part of the Windows 10 preview, see details below).

2) AllJoyn support is currently included in OpenWRT, an embedded linux platform used heavily for consumer routers and networking equipment.  It is likely we’ll start seeing consumer routers enabling AllJoyn routers by default soon.

3) Always-Powered devices, such as Televisions, can run their own AllJoyn routers.  We can expect to see more and more of these devices doing so, reducing the need for other routers on the network.

Options To Run a Router Now

Windows 10

If you are running Windows, perhaps the easiest option is to upgrade to the Windows 10 Technical Preview.  Then launch the “Services” control panel, and enable the “AllJoyn Router Service”.

OpenWRT

Another great option is to setup an OpenWRT device.  Numerous inexpensive routers are compatible.  Check out the instructions.

Run AllJoyn Core Sample App

One option is to simply run one of the Windows or iOS AllJoyn sample apps, based on the Core SDK which includes the Router service.  For example, you can grab the Windows binaries and run the chat or daemon sample binary to get a router.  Find binaries for all platforms here.

For OS X, grab the iOS source here, and run the chat sample from:

/alljoyn_objc/samples/OSX/AllJoynChat

Once you press the “Start” button a router should be running.

chatsample

 

 

Arduino Yun

The Arduino makes a great little AllJoyn Router that can also act as a Wireless Access Point for developing against AllJoyn where a suitable network is not available.  This is based on OpenWRT as well.

1) Configure onboard WIFI 

2) Upgrade to latest Linino

3) Expand onto SD

4) Add swap space

dd if=/dev/zero of=/swapfile count=65536 bs=1k
mkswap /swapfile
swapon /swapfile

To activate the swap file at boot time, we need to add the following directives in /etc/config/fstab:

config swap
    option device    /swapfile

And enable fstab autostart at boot time:

/etc/init.d/fstab enable

5) Grab AllJoyn Samples and run simple daemon.

opkg install alljoyn-samples alljoyn-sample_apps
Tweet about this on TwitterShare on Google+Share on FacebookShare on RedditEmail this to someoneShare on LinkedInShare on StumbleUpon

One thought on “Options For Setting Up an AllJoyn Router

Leave a Reply

Your email address will not be published. Required fields are marked *