"Day 29/30: Patterns I've Noticed While Debugging Bring-Up on the Bench"

a magnifying glass over a circuit board, labeled debug

Not a single-topic day today — more of a running list. I've spent enough hours on the bench now, flashing, configuring, and poking at nodes, that I've started noticing patterns in how I get stuck and how I get unstuck. None of these are stories about a specific broken thing at Siliqs; they're just habits I've noticed myself forming, and Wei confirmed most of them are pretty universal in embedded/RF bring-up, not Siliqs-specific.

Check power and ground before assuming it's a code bug. My default instinct, coming from a software background, is to suspect the code first — a wrong register value, a logic error, a bad state transition. But a surprising number of "the firmware isn't doing what I expect" situations turn out to be a power rail that's not actually at the voltage I assumed, a ground loop, or a connector that's not fully seated. Code is deterministic; it does exactly what it's told. If behavior looks inconsistent or nonsensical, that's actually a hint to check the physical layer before the logical one, not after.

A weak or flaky RF link is often an antenna or connector problem, not a firmware problem. This one connects back to what I learned in the antenna and VNA weeks — a loose SMA connector, a cable that's not fully seated, or an antenna that isn't well matched to the frequency can produce symptoms that look exactly like "the mesh routing logic is broken" or "the range is worse than it should be." My instinct used to be to go digging through logs for a routing bug. Now the first thing I check is whether the physical RF path is actually solid, because that's a five-minute check versus potentially hours of chasing a software explanation for a hardware symptom.

Don't trust a single reading — take a few and look for consistency. Especially with RSSI/SNR values, ADC readings, anything with noise in it. One bad or unusual reading could be a real problem, or it could just be one noisy sample. I've started defaulting to taking three or four readings before drawing any conclusion, and specifically looking at whether they cluster together or scatter — a cluster with one outlier is a different situation than four wildly different numbers.

Read the actual error or log output before guessing. This sounds obvious written down, but I've caught myself skipping it more than once — jumping straight to "I bet it's X" based on a vague symptom, when the device or tool was already printing a specific error message that named the actual problem. Guessing feels faster in the moment but it isn't, once you count the time spent chasing a wrong guess.

Change one thing at a time. If I adjust three things between one attempt and the next — a config value, a physical connection, and a firmware version — and it suddenly works, I've learned nothing about which of the three actually mattered. I've gotten better at forcing myself to be patient here, even when I'm tempted to just get the thing working and move on.

None of this is sophisticated. It's closer to "be systematic instead of impatient," which is a less exciting lesson than I expected to be writing about at this point in the internship, but it's the one that's actually saved me the most time on the bench.

放大鏡對著電路板,標示 debug

今天不是單一主題,比較像是一份持續累積的清單。我在 bench 上燒錄、設定、戳弄 node 已經累積了不少小時,開始注意到自己卡住的方式跟脫困的方式其實有些固定模式。這些都不是「Siliqs 某次具體故障」的事故紀錄,只是我發現自己漸漸養成的習慣,Wei 也確認這幾條大多是 embedded/RF bring-up 通用的道理,不是 Siliqs 特有的。

先檢查電源跟接地,再假設是程式碼問題。 我出身軟體背景,預設反應是先懷疑程式碼——某個 register 值錯了、邏輯錯了、狀態轉換錯了。但意外地有不少「韌體表現跟我預期不一樣」的情況,最後查出來是電源軌其實根本不在我以為的電壓上、有 ground loop,或是接頭沒插到底。程式碼是決定性的,它就是照著被告知的去做。如果行為看起來不一致或不合理,那其實是個提示,應該先查實體層,再查邏輯層,而不是反過來。

RF 連線不穩或斷斷續續,通常是天線或接頭問題,不是韌體問題。 這點接回我在天線跟 VNA 那幾週學到的東西——一顆沒鎖緊的 SMA 接頭、一條沒插到底的線、或是跟頻率沒對好的天線,都可能產生看起來完全像「mesh routing 邏輯壞了」或「range 比預期差」的症狀。我以前的直覺是一頭栽進 log 裡找 routing bug。現在我第一件事是先檢查實體 RF 路徑是不是真的沒問題,因為這是五分鐘的檢查,跟花好幾個小時追一個其實是硬體問題的軟體解釋,差很多。

不要只信一筆讀數——多量幾次,看有沒有一致性。 特別是 RSSI/SNR 值、ADC 讀數,任何本來就帶雜訊的量測。一筆異常或不好的讀數,可能是真的問題,也可能只是一個雜訊樣本。我現在養成習慣,下結論前先量三、四筆,特別去看這些數字是不是聚在一起——一群聚在一起、只有一個離群值,跟四個完全不同的數字,是完全不同的兩種情況。

先讀實際的錯誤或 log 輸出,再猜測。 這句話寫出來聽起來很理所當然,但我不只一次抓到自己跳過這一步——看到一個模糊的症狀就直接跳到「我猜是 X」,而裝置或工具其實早就印出了明確指出真正問題的錯誤訊息。當下猜測感覺比較快,但把追錯誤猜測所花的時間也算進去,其實不然。

一次只改一個變數。 如果我在兩次嘗試之間同時改了三件事——一個 config 值、一個實體連線、一個韌體版本——結果突然就成功了,那我其實什麼都沒學到,不知道三個裡面到底是哪個真正起作用。我現在比較能逼自己在這件事上有耐心,即使有時候很想直接讓東西動起來就好、不管那麼多。

這些都不算什麼精妙的道理,比較接近「系統化一點、別急」,比我以為在實習到這個階段會寫的東西還要不刺激,但這確實是目前為止在 bench 上幫我省下最多時間的一條。