Link test: UDP echo sweep, soak and TCP each way, driven by the app
The tablet's app sockets are the only ones bound to the USB link, so the measurement has to run in the app. tool/linktest_server.py serves the Orin end and logs every result with its own TCP_INFO. Startable without touching the screen: am start ... --es linktest <label>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
@@ -13,6 +13,9 @@ class UsbLink extends ChangeNotifier {
|
||||
bool up = false;
|
||||
bool bound = false;
|
||||
|
||||
/// Development hook: a link test requested by launch intent (see MainActivity.kt).
|
||||
void Function(String label)? onLinkTest;
|
||||
|
||||
UsbLink() {
|
||||
if (!supported) return;
|
||||
_ch.setMethodCallHandler((call) async {
|
||||
@@ -21,10 +24,15 @@ class UsbLink extends ChangeNotifier {
|
||||
up = a['up'] == true;
|
||||
bound = a['bound'] == true;
|
||||
notifyListeners();
|
||||
} else if (call.method == 'linktest') {
|
||||
onLinkTest?.call(call.arguments as String);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// A link test requested by the intent that launched the app, once.
|
||||
Future<String?> takeLinkTest() async => supported ? _ch.invokeMethod<String>('takeLinkTest') : null;
|
||||
|
||||
/// Bind only when the target is on the USB link; a workstation over WiFi must stay reachable.
|
||||
Future<void> bindFor(Uri target) async {
|
||||
if (!supported) return;
|
||||
|
||||
Reference in New Issue
Block a user