0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

暑さ指数(WBGT)を簡易計算するシステムをWio Tracker1110で作る

Last updated at Posted at 2025-12-23

(修正版)

以下のようなシステムを作ります

a1.png
ttn_w1110.png

デバイスで計測した温度、湿度をペイロードとしてLoRaWANでTTNを経由してTago.IOにデータを集めてグラフ化します。
WBGTはTTN上のuplinkデコーダースクリプトで温度、湿度から簡易計算してJSONデータに追加しTago.IOに送信してます。

Wio Tracker1110をTTNにつなぐとtime syncから先に進まない

さて、早速接続を試しましたがデータが上がってきません。 Seeed-StudioのWio Tracker1110 のデフォルトファームウェアは、同社のSenseCAPサーバに接続するためのものです。Wio Tracker1110はTTNにJoinしてすぐにSenseCAPサーバに時刻取得要求のuplink (payload例"17011f00000010")を投げ、該当するdownlinkが受信できるまで繰り返し要求し続け、センサーデータのuplinkを行いません。

<console log>
[2024-07-27 00:00:06.536] ----- Reset LR1110 to start Join the network -----
[2024-07-27 00:00:06.536] Request for Join the LoRaWAN network
[2024-07-27 00:00:19.525] ----- JOINED -----
[2024-07-27 00:00:19.525] Send uplink packet to request current time from Cloud.
      :
[2024-07-27 00:03:09.256] ----- Timer for 10s -----
[2024-07-27 00:03:09.256] ReSend uplink packet to request current time from Cloud.
<TTN Live Data>
      :
00:03:12 アップリンクデータメッセージの転送 err 0 messages[…] payload"17011f00000010" valid true 17011F00000010 FPort 199

time sync無しで状態を進めるようファームウェアを書き換え

今回のシステムは、温度・湿度だけが必要で位置情報は必要ないため、おそらく時刻同期は不要と判断(この点、問題あればご指摘くださると助かります)。時刻同期できるまで待たせているコードを書き換えます。

・"wm1110_geolocation.time_sync_flag== true"の処理を外します

これだけだと、時刻取得要求のuplink (payload例"17011f00000010")を投げ続ける処理は止らないので、行儀が悪いですがWM1110_Geolocationライブラリを書き換えて使います。

また、TTNのペイロードフォーマッター>アップリンク>デコーダーを書きましたので共有。

<デコード例>

// test data : 18000000000000000114328000008000800080008000002fffb103c4
//{
//  "0": {
//    "data": {
//      "accelerometer": {
//        "x": 0.47,
//        "y": -0.79,
//        "z": 9.64
//      },
//      "air": {
//        "humidity": 50,
//        "temperature": 27.6,
//        "wbgt": 24.6889
//      }
//    }
//  }
//}

以上

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?