With our continuing roll-out of support and features for GNU Radio on Android, we are looking to handle all command-and-control between the app and the flowgraph through ControlPort. While I've had the ControlPort server side working on GNU Radio apps for a while, we didn't have the mechanism in place for client-side ControlPort apps, which will be necessary for getting and setting parameters in the radio. I've now added two new projects to help us with this.
The first project is GrControlPort -- this is an Android library (not an application) that is meant to provide a simple abstraction layer for using ControlPort in Java. This is very similar to our Python-based RPCConnection class that we use to make getting and setting knobs easier in that language. You use this library to make the connection to the ControlPort app and then use the returned object to get and set the knobs of the radio. There's an abstracted class to make the user code agnostic to the backend service, like Thrift. The README file explains more about how to use this, and it includes a simple Java class that shows the basic modes of getting and setting knobs of a flowgraph.
https://github.com/trondeau/GrControlPort
The second project is GrPerfMon, which is an Android app that uses GrControlPort to manage the ControlPort connection. This app reads the "work time" Performance Counter and displays this info as a percent of the total time for all blocks in a flowgraph. This is very similar in nature to our gr-perf-monitorx application we use on a desktop. You give it the hostname/IP address and port number of the running flowgraph along with the update interval (defaults to 1 second) and connect. When connected, it will show a bar graph of the percentages for each block. The code is on Github here:
https://github.com/trondeau/GrPerfMon
Because ControlPort is handled over a TCP/IP connection, the flowgraph and the app don't have to run on the same device, although part of the motivation for this work is to provide the experience and knowledge to make this the default communications between an Android flowgraph and app layer. But more on that to come. For right now, the image below shows me profiling from a Nexus 7 tablet a flowgraph running on my desktop machine: