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.
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:
1 |
/alljoyn_objc/samples/OSX/AllJoynChat |
Once you press the “Start” button a router should be running.
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.
2) Upgrade to latest Linino
4) Add swap space
1 2 3 |
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:
1 2 |
config swap option device /swapfile |
And enable fstab autostart at boot time:
1 |
/etc/init.d/fstab enable |
5) Grab AllJoyn Samples and run simple daemon.
1 |
opkg install alljoyn-samples alljoyn-sample_apps |
What options do I have to run a router on OS X? I’m stuck trying to get the Cordova lighting demo to connect to bus…