Connection overview
ASR Android Runtime manages phone sensors and lets you enable two independent data paths. Pick the one that matches the tool you want to receive the data.
Android Runtime
Reads enabled sensors and publishes their available data.
DDS or TCP
DDS carries ROS 2 topics; TCP carries ASR telemetry to Studio.
Robot or Studio
A ROS 2 subscriber receives topics, or Studio visualizes telemetry.
| Path | Destination | Network setup |
|---|---|---|
| ROS 2 DDS | ROS 2 node, robot, or host subscriber | Wi-Fi network or Android USB tethering |
| Studio TCP | ASR Studio desktop application | Wi-Fi, or USB with ADB reverse |
These paths are separate. ASR Studio is a TCP diagnostics client, not a DDS bridge. ADB reverse forwards Studio's TCP connection; it does not turn on USB-tether DDS.
ROS 2 and DDS
ROS 2 uses DDS-based middleware for its publish/subscribe communication. In ASR, the Android Runtime participates in the ROS 2 graph and publishes enabled sensor data as topics. A ROS 2 subscriber or robot node can discover and receive those topics without routing them through ASR Studio.
Topics use a device-specific namespace such as /asr_android_168. The device ID varies. These are examples from the runtime; topic availability depends on the phone hardware, permissions, and enabled modules.
| Topic suffix | ROS 2 message type | Notes |
|---|---|---|
imu | sensor_msgs/msg/Imu | Inertial and orientation data, when available. |
gps | sensor_msgs/msg/NavSatFix | Location requires permission and a usable location source. |
battery | sensor_msgs/msg/BatteryState | Battery state updates. |
camera/image/compressed | sensor_msgs/msg/CompressedImage | Compressed camera frames, when supported and enabled. |
status | std_msgs/msg/String | Runtime status heartbeat. |
The primary Android flavor uses Cyclone DDS; a Fast DDS comparison flavor is also available. The documented and tested host setup uses ROS 2 Lyrical with rmw_fastrtps_cpp. Both sides must use the same ROS_DOMAIN_ID (default 0) and be able to discover each other on the selected network. This describes the tested setup, not guaranteed interoperability for every middleware, network, or ROS 2 distribution.
Start the Android Runtime, enable the matching DDS transport, and enable the sensors you need. A publisher may show that it is waiting for discovery until another ROS 2 participant is present on the network.
View ROS 2 data in Foxglove
Foxglove connects to a Foxglove Bridge WebSocket. The ASR USB Link Monitor is a separate ROS 2 participant: it can activate discovery and report sensor flow, but it does not start the WebSocket server Foxglove needs.
- Start the ASR Android Runtime, enable USB tethering and USB DDS. The USB Link Monitor is optional.
- In a second terminal, use the same sourced ROS 2 environment,
ROS_DOMAIN_ID, and host RMW as the monitor. Launch the bridge:ros2 launch foxglove_bridge foxglove_bridge_launch.xml - In Foxglove, choose Open a new connection → Foxglove WebSocket and enter
ws://localhost:8765when Foxglove runs on that same computer. - Check the Data source topic list. To confirm data flow, select a live topic such as
/asr_android_<device-id>/imuor/asr_android_<device-id>/camera/image/compressed.
Foxglove Bridge is the only process needed: it exposes the ROS 2 graph over WebSocket. If the bridge launch reports that foxglove_bridge is unavailable, build or install that ROS package in the sourced host environment first. See the Foxglove ROS 2 guide.
Wi-Fi DDS
- Connect the phone and ROS 2 host or robot to the same reachable Wi-Fi network. The network must permit peer DDS discovery.
- Configure the same
ROS_DOMAIN_IDon the phone and host; the default is0. Usermw_fastrtps_cppfor the documented host configuration. - Start the phone runtime, enable Wi-Fi DDS, and enable the desired sensor modules.
- Use
ros2 topic listto inspect discovered topics. To confirm messages, echo a topic such as/asr_android_168/imu, replacing168with the device ID shown by the runtime.
The ASR USB Link Monitor is not needed to find the phone. It is an optional USB-only diagnostic; Wi-Fi can be checked with an ordinary ROS 2 subscriber or the robot's existing node.
USB-tether DDS
USB DDS uses Android's USB tethering to create an IP network path between the phone and host. DDS discovery and topic traffic then travel over that network interface. It is not a USB serial or UART transport.
- Connect the phone to the ROS 2 host and enable USB tethering in Android system settings.
- Start the phone runtime and enable USB DDS. For an isolated check, leave Wi-Fi DDS disabled.
- On the host, use the same ROS domain and the documented
rmw_fastrtps_cppsetup. A subscriber or robot node can receive the topics. - Optionally run the ASR ROS 2 USB Link Monitor for persistent USB discovery and sensor-flow diagnostics:
ros2 launch asr_ros2 connect.launch.py transport:=usb
The monitor is optional and USB-only; it reports graph visibility separately from received sensor callbacks. If automatic interface selection is ambiguous, the monitor supports an explicit interface argument. See the USB Link Monitor guide for setup and diagnostics.
Remote configuration
Turn on REMOTE CONFIG under ADVANCED on the phone. It is off by default, and it also controls the flashlight and speaker/speech topics.
ros2 topic echo --qos-durability transient_local /asr_android_250/config/state
ros2 topic pub --once /asr_android_250/config/set std_msgs/msg/String "{data: camera.resolution=640x480}"
camera.resolution:320x240,640x480(default),1280x960,640x360,1280x720camera.id:auto, or an ID fromcamera.availableinconfig/stateimu.rate_hz:0to1000;0publishes every samplesensors.<name>:trueorfalse
ros2 param can't reach the phone directly from a Fast DDS host, because in testing a Fast DDS client got no reply from a Cyclone DDS service. Topics work across both.
Wi-Fi that blocks multicast
Some routers don't pass multicast between devices, and a firewall on the computer can block it too. Ping works, but ros2 node list doesn't show the phone. Set ROS_STATIC_PEERS on both sides: under ADVANCED on the phone, enter the computer's IP. On the computer, export the phone's IP:
export ROS_STATIC_PEERS=192.168.1.5
Cameras
Select any camera the phone exposes to apps with camera.id. One camera streams at a time. The tested phones refused to open front and back together, so use two phones, each as its own node, when you need both directions at once. camera.concurrent in config/state lists pairs a phone says it supports.
Stale frames are dropped rather than delivered late, and camera_info uses the lens values the phone reports. If a phone reports none, it publishes K[0] = 0, which means uncalibrated.
SROS2 security
SROS2 encrypts traffic and only allows nodes holding keys from your keystore. It is off by default. In testing, a client without keys received nothing from a secured phone, and a client with keys streamed normally. If keys are missing while ROS_SECURITY_ENABLE is on, the node doesn't start, and it never falls back to an unsecured connection.
The host must use an RMW built with security. The tested Fast DDS host wasn't, so it used rmw_cyclonedds_cpp. See the README for key setup.
Mounting on a robot
- The node keeps publishing while the phone is locked.
- Turn off battery optimization for the app. The app warns you when it's on.
- START ON BOOT varies by phone maker. Some phones, such as Xiaomi, also need Autostart turned on.
- The node restarts by itself when the selected network comes back.
TCP to ASR Studio
ASR Studio connects directly to the phone over TCP and displays camera, sensor, audio, and runtime telemetry. The default port is 4242. This connection is independent of ROS 2 DDS; enabling TCP does not enable ROS 2 publishing.
Wi-Fi TCP
- Connect the phone and computer to the same reachable network.
- In ASR Studio, open Devices, choose Wi-Fi, enter the computer's local IP address, then choose Listen (Server).
- In the Android app's TCP section, enable the connection and enter the computer IP address with port
4242.
What Studio does—and does not do
Studio decodes ASR's TCP telemetry for live diagnostics and visualization. It does not join the ROS 2 graph as a DDS subscriber and does not forward or bridge DDS topics. For ROS 2 data, connect a ROS 2 subscriber or robot node directly to the phone's DDS participant.
For installers and complete Studio setup details, visit the ASR Studio overview.
USB / ADB TCP
For Studio over USB, Android Debug Bridge (ADB) can reverse-forward the Studio TCP port. The phone's TCP client then connects to its own loopback address, and ADB carries that connection to Studio on the computer.
- Connect the phone over USB, enable USB debugging, and authorize the computer.
- In Studio, open Devices, select USB / ADB, and choose Auto-Configure USB / ADB (1-Click Setup). Studio runs:
adb reverse tcp:4242 tcp:4242 - Choose Listen (Server) in Studio.
- Enable TCP in the Android app and use host
127.0.0.1and port4242.
ADB reverse is not USB tethering. It forwards a TCP port for Studio. To use ROS 2 DDS over USB, enable Android USB tethering and the app's USB DDS transport separately.
Troubleshooting
No ROS 2 peer or topics appear
- Confirm the Android Runtime is running, the intended DDS toggle is on, and the needed sensor modules are enabled.
- Check that phone and host use the same
ROS_DOMAIN_IDand that the host uses the documentedrmw_fastrtps_cppconfiguration. - Check the selected Wi-Fi or USB-tether interface and whether the network or firewall allows peer discovery.
- For USB diagnostics, check the Link Monitor's interface selection and distinguish a visible topic from actual message callbacks.
Studio does not connect
- Make sure Studio is listening on port
4242before enabling the phone's TCP connection. - For Wi-Fi, verify the phone can reach the computer's local IP and that the entered address and port are correct.
- For USB / ADB, confirm the device is authorized and the reverse rule is configured; the phone should connect to
127.0.0.1:4242. - Remember that Studio TCP and ROS 2 DDS are independent; enabling one does not start the other.
For Android installation, complete topic definitions, and build details, consult the Android Runtime README. Recorded backend tests and known limits are in the DDS backend comparison.
Network note: The current TCP telemetry path does not use TLS, and SROS2 for DDS is optional and off by default. Unless SROS2 is on, data may be visible to parties able to inspect traffic on the route.Privacy Policy for more information.