
Something that bugged me after yesterday's flood routing post: if every node just broadcasts and every neighbor rebroadcasts, what stops a random person's mesh node from picking up our traffic if they're physically nearby and on the same frequency band? Today I looked into channels and pre-shared keys (PSK), which turned out to be the answer.
A "channel" in this kind of mesh isn't a frequency — that threw me at first, since in LoRaWAN and just general radio terminology "channel" usually means a specific slice of spectrum. Here it's closer to a named, encrypted group. A channel is defined by a name plus a PSK (pre-shared key). Any node configured with that same name and key can decrypt and understand traffic sent on that channel; anyone else's radio can still physically receive the RF energy (it's an open medium, nothing stops that), but without the matching key the payload just looks like noise to them.
The crypto itself is symmetric encryption — the same key is used to both encrypt and decrypt, as opposed to public-key/asymmetric schemes where you have separate public and private keys. That means both ends of a link need to already possess the identical shared secret before they can talk, which has to be provisioned somehow ahead of time — configured into each device, shared over a QR code, whatever the tooling supports. I'm keeping the actual cipher details vague here on purpose since I haven't dug into the specific algorithm yet — the concept that matters today is just "one shared secret, symmetric, both sides need it."
The practical reason this matters, and the thing that actually made this topic click for me: Meshtastic-based devices out of the box typically ship configured to a default, public channel that anyone running stock firmware nearby would also be on — useful for interoperability between strangers' devices, bad for anything that's supposed to be private. If a company deploys mesh nodes on the same band in a region where hobbyists or other Meshtastic users are also active, and everyone stays on the default channel/PSK, all that traffic is mutually readable (or at least receivable and potentially replayable) by anyone else on the same default config.
For an industrial deployment like what Siliqs builds — RS485 sensor data, control traffic — that's clearly not acceptable, so the mesh needs its own channel name and its own PSK, distinct from the default, configured only onto the customer's own nodes. That keeps the traffic cryptographically separated from any public or default mesh activity sharing the same physical band, even though both sets of radios might be sitting in range of each other and both broadcasting on the same frequencies.
What I still need to nail down: how key provisioning actually happens for a fleet of nodes in the field — is it done once at manufacturing/flashing time, or is there a per-site config step, and how do you rotate a PSK across a deployed fleet if you ever needed to. That feels like a Wei question for tomorrow, though tomorrow's actual topic is SNR and RSSI, so it might have to wait.

昨天寫完 flood routing 之後有個問題一直卡在腦子裡:如果每個節點都直接廣播、每個鄰居都轉播,那要是附近剛好有別人的 mesh 節點、又用同一個頻段,是不是就能收到我們的流量?今天去查了 channel 跟 pre-shared key (PSK),結果發現答案就在這裡。
這種 mesh 裡的「channel」不是頻率——一開始這點讓我卡住了,因為在 LoRaWAN 跟一般無線電術語裡,「channel」通常指某一段特定的頻譜。這裡的 channel 比較接近一個「有名字、有加密」的群組。一個 channel 是由一個名字加上一把 PSK(pre-shared key)定義的。任何設定成相同名字跟 key 的節點都能解密、理解在這個 channel 上傳送的流量;別人的無線電還是能實體收到那段 RF 能量(開放媒介本來就擋不住這件事),但沒有對應的 key,payload 對他們來說就只是雜訊。
加密本身是對稱式加密(symmetric encryption)——加密跟解密用同一把 key,跟公鑰/私鑰分開的非對稱式(asymmetric)方案不一樣。這代表連結兩端在能講話之前,就得先各自持有完全相同的共享密鑰,而這個密鑰得靠某種方式事先配置好——燒錄進裝置、透過 QR code 分享,或工具鏈支援的其他方式。我這邊故意把實際用的加密演算法細節寫得比較模糊,因為我還沒去深入研究具體是哪個演算法——今天要抓住的概念就是「一把共享密鑰、對稱式、兩端都要有」。
這件事實際重要的原因,也是真正讓我搞懂這個題目的關鍵:Meshtastic 系裝置出廠通常預設接到一個公開的 default channel,附近任何用原廠韌體的人也都會在這個 channel 上——這對陌生人裝置之間互通有無很有用,但對任何需要保密的用途來說就很糟。如果一家公司在某個地區的同一頻段上部署 mesh 節點,而那個地區剛好也有 hobbyist 或其他 Meshtastic 使用者在活動,大家都停留在 default channel/PSK,所有流量對用同一份預設設定的任何人來說都是可以互相讀取的(至少是可以被接收、甚至可能被重放)。
對 Siliqs 這種工業部署(RS485 感測資料、控制流量)來說,這顯然不能接受,所以 mesh 得有自己專屬的 channel 名字跟自己的 PSK,跟 default 不一樣,只設定在客戶自己的節點上。這樣一來,就算兩組無線電實體上互相收得到訊號、也用同一組頻率廣播,流量在加密層面還是分開的,跟同一個實體頻段上任何公開或 default 的 mesh 活動互不相通。
我還需要搞清楚的是:對一批部署在現場的節點來說,key 的配置實際上是怎麼做的——是在製造/燒錄階段一次做好,還是有個 per-site 的設定步驟?如果之後真的需要,要怎麼幫已經部署出去的一整批節點輪換 PSK?這感覺是該問 Wei 的問題,不過明天的正題是 SNR 跟 RSSI,可能得先擱著。