zeroconf_android: zeroconf_android_jmdns | zeroconf_android_jmdns_demos | zeroconf_android_master_browser

Package Summary

Android packages for zeroconf testing/demo purposes.

zeroconf_android_demo.png

Overview

Demo program to test/illustrate usage of

See zeroconf_android_master_browser for an example that does discovery via callbacks.

Functionality

This runs a demo of the android jmdns publishing/discovering functionalities and prints output in a simple scrolling textview.

  • Publishes a fake ros master on zeroconf [DudeMaster][_ros-master._tcp][local][8888]

  • Discovers ros masters on the lan [ros-master._tcp] and prints master ip information.
    • Uses the polling method rather than the callback method for discovery.

Compile/Install

  • Install the ros zeroconf stacks.

  • Setup the adk and your device to work with this ros install.

  • Compile zeroconf_android_jmdns_demos.

> rosmake zeroconf_android_jmdns_demos
  • Connect your device

# Check your device is listed
> adb devices             
  • Install to your device.

# Ros method
> roscd zeroconf_android_jmdns_demos
> ant installd
# Android Method
> roscd zeroconf_android_jmdns_demos/bin
> adb install zeroconf_android_jmdns_demos-debug.apk
> adb uninstall ros.zeroconf.android.jmdns.demos

To uninstall:

> ant uninstall
# OR
> adb uninstall ros.zeroconf.android.jmdns.demos

Usage

For testing you could publish a real ros master with discovery using zeroconf_avahi, but to quickly get things going with the demo, we'll use the avahi command line tools. Fire up two shells. In the first shell, fire up a fake master with avahi-publish:

> avahi-publish -s FooMaster _ros-master._tcp 8888

In the second shell, start discovering with avahi-browse:

> avahi-browse -r _ros-master._tcp

On the android, start the demo app (screenshot below).

For more detailed debugging, connect your device to the pc and run

> adb logcat zeroconf:I *:S

Wiki: zeroconf_android_jmdns_demos (last edited 2012-01-04 14:00:47 by DanielStonier)