Device Bus Monitor
The HP webOS SDK, beginning with 2.0, comes with a tool - ls-monitor (luna service monitor) - that lets you see traffic going over the webOS service bus, similar to a network sniffer that lets you observe HTTP traffic.
You can run this tool from a device shell.
See webOS Service APIs for a list of services available to 3rd party apps.
Another useful tool for testing services is luna-send, which lets you access services at a device command-line.
Usage
ls-monitor [OPTION...]
Options
Help Options: -?, --help Show help options Application Options: -f, --filter=com.palm.foo Filter by service name (or unique name) -l, --list List all entities (apps) connected to the hub -d, --debug Print extra output for debugging monitor but with UNBOUNDED MEMORY GROWTH
Usage Notes
With no switch, ls-monitor runs in monitor mode and outputs requests and responses to and from services.
The -l option returns a list of apps connected to the bus.
There are two system buses:
-
Public bus - Used for all 3rd party apps.
-
Private bus - Lists more services than the public bus, services that have access to sensitive systems.
Though the list shows service names and processes, not all of them actually accept incoming connections. Connecting to the bus is a two-way interface, so this also shows apps that just have an active subscription.
The -f option allows you to filter on requests to and from a particular service. Alternatively, you could pipe the output through tools like grep to do more sophisticated searches.
Example
A typical output line from ls-monitor might look like this:
6663.549 [PRV] return 41 com.palm.hidd (/var/run/ls2/VDVKHT) (/var/run/ls2/GnoMz4) {"returnValue":true}
-
6663.549= Time message was sent in seconds since the device was booted. -
[PRV]= Private bus. -
return= The message was sent in response to a request. -
41= Serial number. The serial number is used to match a call with its response. The numbers are assigned sequentially for each caller. -
com.palm.hidd= Message sender (our system service that talks to the raw user interface devices). The destination is unnamed. -
Paths in parenthesis = Locations of raw UNIX domain sockets used to implement the IPC.
-
{"returnValue":true}= The actual message.