- DirectGateway.kt: bidirectional WebSocket to ws://100.123.216.65:9878
- No auth, no restrictions - full control
- Sends notifications and calls
- Receives commands: notification.action, call.answer/reject/hangup
- App sets up command handlers and auto-connects
- NotificationListener & CallScreener now send to both debug + gateway
Server: /home/johan/dev/clawdnode-gateway/server.js
HTTP API: http://100.123.216.65:9877
WebSocket: ws://100.123.216.65:9878
- Add DebugClient that POSTs directly to debug server (100.123.216.65:9876)
- NotificationListener: POST all events directly, full lifecycle logging
- CallScreener: POST all calls directly, full lifecycle logging
- App: Log startup and initialization
- Bypass WebSocket complexity for debugging visibility
Debug server: node /home/johan/dev/clawdnode-debug-server/server.js
Tail: tail -f /tmp/clawdnode-debug.log
The signature payload was incorrect. Changed from:
$nonce:$signedAt
To gateway's expected v2 format:
v2|deviceId|clientId|clientMode|role|scopes|signedAtMs|token|nonce
This matches the buildDeviceAuthPayload() function in Clawdbot's
gateway/device-auth.js module.
The i2p eddsa library produces non-standard Ed25519 signatures that
Node.js crypto doesn't accept. Bouncy Castle is more widely tested
and should produce standard-compliant signatures.
- Add net.i2p.crypto:eddsa library for pure-Java Ed25519
- Rewrite DeviceIdentity to use Ed25519 (matches gateway protocol)
- Keys stored in EncryptedSharedPreferences instead of Android Keystore
- Public key format: 32 bytes raw, base64url-encoded
- Device ID: SHA-256 hash of raw public key
- Improved error handling in GatewayClient challenge flow