v1.6.19 — 無線機が黙って切ったセッション(受信無音・CAT 全滅)を検出して自動再接続 / Detect a session the radio silently dropped and reconnect
v1.6.19 — 無線機が黙って切ったセッション(受信無音・CAT 全滅)を検出して自動再接続 / Detect a session the radio silently dropped and reconnect
v1.6.18 のフィールドレポート(IC-7300MK2、LTE+VPN)の診断ログへの対応です。インストールは app-debug.apk をご利用ください。
日本語
ログから分かったこと
「受信音声が出ない」ログの 1 本目のセッションでは、18:19:07 以降 audio link: rx pkts=4493 と serial link: rx pkts=1622 がまったく増えず、一方で両ストリームの pings は 5 秒ごとに +51 で増え続けていました。つまり無線機は ping の送受信だけ続け、CI-V の idle・CI-V 応答・受信音声を全部止めていた状態が 2.5 分(手動 Disconnect まで)続いていました。この間:
- CAT コマンドはすべてタイムアウト(「CAT responding again」の行は rigctld 自身が返した
RPRT -5で、無線機の応答ではありません)。 - 18:20:52 の送信操作は PTT が無線機に届かず、変調も出ません(=報告の「TX audio problem」)。
- 受信音声も来ないため RX は無音。エラー表示はなし。
アプリ側の 15 秒リンク監視は「何かパケットが来ているか」しか見ておらず、ping が来続ける限りこの「半死状態」を検出できませんでした。v1.6.17 で fail() を「接続済みなら接続を維持」に変えたため、無線機からの「切断しました」状態パケット(0x50)も単なるエラー文字になっていました。
再接続後(18:29:41)は reattachNetworkRx が動き、受信音声は即座に復活、送信の PTT も 181 ms で確認されており、v1.6.18 の再接続まわりの修正は機能しています。
修正
- セッション死活監視を追加:無線機はログイン中なら CI-V ストリームに約 30 ms ごとに idle パケットを送り続けます(送信中も、CI-V 応答が 7 秒遅れた場面でも止まりませんでした)。CI-V ストリームでトラッキング付きパケット(idle/データ)が 6 秒来なければ、無線機がセッションを捨てたと判断してセッションを破棄し、自動再接続(既存の再接続処理)に入ります。受信中なら受信も自動再開します。
- **無線機からの切断通知(0x50, b64=1)**を接続中に受け取った場合も、同様にセッションを破棄して自動再接続します。
- 診断:無線機からの認証応答(0x40)・状態パケット(0x50)の主要バイトと、60 秒ごとの再認証送信をログに残します。次に同じ現象が起きたときに、無線機がセッションを捨てる直前に何があったか(再認証の失敗など)を突き止めるためです。
確認のお願い
受信が無音になったら、そのまま 10 秒ほど待ってください。「Radio dropped the session (CI-V silent) — reconnecting…」と表示され、数十秒以内に自動で再接続・受信再開するはずです。再現したときの CAT ログ(設定 → 診断 → Capture CAT log)を送っていただければ、reauth sent / control 0x40 / control 0x50 の行から無線機側の理由を特定します。
English
From the v1.6.18 diagnostic log (IC-7300MK2 over LTE+VPN): in the first session, from 18:19:07 on, audio link: rx pkts=4493 and serial link: rx pkts=1622 never increased again while the pings counters kept growing (+51 every 5 s on both streams). The radio kept exchanging pings but had stopped sending CI-V idles, CI-V replies and RX audio — for 2.5 minutes until the manual Disconnect. Every CAT command timed out ("CAT responding again" lines were rigctld's own RPRT -5, not radio replies), the 18:20:52 TX never keyed the rig (the reported "TX audio problem"), RX stayed silent, and no error was shown. The 15 s link watchdog only looks for any packet, so the pings kept it happy; and since v1.6.17 the radio's own "disconnected" status packet (0x50) only produced an error text instead of a teardown.
After the reconnect at 18:29:41, reattachNetworkRx ran, RX audio was back immediately and the PTT key-on was acknowledged in 181 ms — the v1.6.18 reconnect fixes work.
Fixed: a session-liveness watchdog — while the radio considers us logged in it sends a CI-V idle every ~30 ms (it kept doing so during TX and during a 7 s CI-V reply delay); 6 s without any tracked packet on the CI-V stream now tears the session down and triggers the existing automatic reconnect (RX resumes by itself). A radio-reported disconnect (0x50, byte 64 = 1) received mid-session does the same. Diagnostics: the radio's auth replies (0x40) and status packets (0x50) are logged with their key bytes, and each 60 s re-auth send is logged, so the next capture shows what happened right before the radio dropped the session.
Please test: when RX goes silent, wait ~10 s — you should see "Radio dropped the session (CI-V silent) — reconnecting…" and RX should come back within a minute. A CAT-log capture of such an event (reauth sent, control 0x40, control 0x50 lines) will tell us why the radio drops the session.
繁體中文
從 v1.6.18 的 log 發現:第一段 session 從 18:19:07 起電台只剩 ping 有來往,CI-V idle、CI-V 回覆與 RX 音訊全部停止 2.5 分鐘(直到手動 Disconnect),所以 CAT 全部逾時、TX 沒 key 到電台、RX 無聲且沒有任何錯誤提示;15 秒看門狗只看「有沒有封包」,被 ping 餵飽了。新增 session 活性看門狗:CI-V 串流 6 秒沒有 tracked 封包就判定電台已丟棄 session,拆除並自動重連(接收自動恢復);電台送來的斷線狀態(0x50)在連線中也會觸發重連;並記錄 0x40/0x50 與每 60 秒的 reauth,以便下次找出電台丟棄 session 的原因。重連後的 RX 掛勾修正已在 log 中驗證有效。
Validation
./gradlew testDebugUnitTest assembleDebug --offline: BUILD SUCCESSFUL; 48 unit tests pass. Debug APKversionCode 10619,1.6.19-session-liveness.- Not verified on radio hardware.
Full Changelog: v1.6.18...v1.6.19