Changes for page DMT01

Last modified by Xiaoling on 2025/08/16 17:21

From version 48.12
edited by Mengting Qiu
on 2025/08/04 18:12
Change comment: There is no comment for this version
To version 57.2
edited by Mengting Qiu
on 2025/08/05 08:48
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -189,21 +189,6 @@
189 189  )))
190 190  
191 191  
192 -== 2.2  How it works? ==
193 -
194 -(((
195 -(((
196 -
197 -)))
198 -
199 -The DMT01 is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class A**(%%) mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the DMT01. It will automatically join the network via OTAA and start to send the sensor value.
200 -
201 -(((
202 -On each uplink, DMT01 will get the temperature from the sensor and send it to the server.
203 -)))
204 -)))
205 -
206 -
207 207  == 2.3 ​Quick guide to connect to LoRaWAN server (OTAA) ==
208 208  
209 209  
... ... @@ -350,8 +350,7 @@
350 350  
351 351  
352 352  
353 -(% class="wikigeneratedid" id="HUnittimestamp" %)
354 -(% style="color:#4472c4" %)**Unit timestamp**
338 +==== (% style="color:#4472c4" %)**Unit timestamp**(%%) ====
355 355  
356 356  Unit TimeStamp Example: 689085D7(H) = 1754301911(D)
357 357  
... ... @@ -358,83 +358,308 @@
358 358  Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]])to get the time.
359 359  
360 360  
361 -(% class="wikigeneratedid" id="HDevMode" %)
362 -(% style="color:#4472c4" %)**DevMode**
345 +==== (% style="color:#4472c4" %)**DevMode**(%%) ====
363 363  
364 -Example:
347 +**Example**
365 365  
366 -if payload is 0x01: BLE_LoRa
349 +If payload is 0x01: BLE_LoRa
367 367  
368 -if payload is 0x02: LoRa
351 +If payload is 0x02: LoRa
369 369  
370 -if payload is 0x03: BLE
353 +If payload is 0x03: BLE
371 371  
372 372  
373 -(% class="wikigeneratedid" id="HMACaddr" %)
374 -(% style="color:#4472c4" %)**MACaddr**
356 +==== (% style="color:#4472c4" %)**MACaddr**(%%) ====
375 375  
376 -Example:
358 +**Example**:
377 377  
378 -If payload is 0xC12309250F1A =
360 +If the payload is C12309250F1A, the MACaddr is C12309250F1A
379 379  
380 380  
381 -(% class="wikigeneratedid" id="HProbeBat" %)
382 -(% style="color:#4472c4" %)**ProbeBat**
363 +==== (% style="color:#4472c4" %)**ProbeBat**(%%) ====
383 383  
384 384  **Example:**
385 385  
386 -If payload & 0x01 = 0x01  **~-~->** This is an Alarm Message.It means that the temperature and humidity exceed the alarm value or trigger an interrupt.
367 +If payload is 0x64 = 100%
387 387  
388 -If payload & 0x01 = 0x00  **~-~->** This is a normal uplink message, no alarm.
389 389  
390 -If payload & 0x80>>7 = 0x01  **~-~->** The PA8 is low level.
370 +==== (% style="color:#4472c4" %)**BoxBat**(%%) ====
391 391  
392 -If payload & 0x80>>7 =0x00  **~-~->** The PA8 is high level.
372 +**Example:**
393 393  
394 -If payload >> 2 = 0x00  **~-~->**  means MOD=1, This is a sampling uplink message.
374 +If payload is 0x46 = 70%
395 395  
396 -If payload >> 2 = 0x31  **~-~->**  means MOD=31, this message is a reply message for polling, this message contains the alarm settings. see [[this link>>path:#HPolltheAlarmsettings:]] for detail.
397 397  
377 +==== (% style="color:#4472c4" %)**Food temperature**(%%) ====
398 398  
399 -(% class="wikigeneratedid" id="HBoxBat" %)
400 -(% style="color:#4472c4" %)**BoxBat**
379 +Because the food temperature data is a little-endian sequence, the order of the front and back bytes needs to be swapped during decoding.
401 401  
402 -Sensor Battery Level.
381 +**Example**:
403 403  
404 -Ex1: 0x0B45 = 2885mV
383 +If payload is: D300H = 00D3H, temp = 00D3H /10 = 21.1 degree
405 405  
406 -Ex2: 0x0B49 = 2889mV
385 +If payload is: 3FFFH  = FF3F , temp = (FF3FH - 65536)/10 = -19.3 degrees.
407 407  
408 408  
409 -(% style="color:#4472c4" %)**Food temperature**
388 +==== (% style="color:#4472c4" %)**Ambient temperature**(%%) ====
410 410  
390 +Because the food temperature data is a little-endian sequence, the order of the front and back bytes needs to be swapped during decoding.
391 +
411 411  **Example**:
412 412  
413 -If payload is: 0105H (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
394 +If payload is: D200H = 00D2H, temp = 00D2H /10 = 21.0 degree
414 414  
415 -If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
396 +If payload is: 3FFFH  = FF3F , temp = (FF3FH - 65536)/10 = -19.3 degrees.
416 416  
417 -(FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
418 418  
419 419  
420 -(% style="color:#4472c4" %)**Ambient temperature**
400 +== 2.4 Bluetoothe Broadcast Payload ==
421 421  
402 +Scan and obtain DMT01 device broadcast data through a third-party mobile phone app (such as nRF Connect)
403 +
404 +Example:
405 +
406 +Note: The following data is obtained through the **nRF Connect tool**.
407 +
408 +[[image:1754305290140-806.jpg||height="680" width="432"]]
409 +
410 +
411 +If the scanned payload is 0x0201060609444D5430310EFF  **01C12309250F1AD100CD006446   **0512E001E001
412 +
413 +(% style="color:red" %)**Note**(%%):
414 +
415 +* The first 12 bytes in the payload are the Bluetooth packet header data and do not need to be decoded.
416 +* The last 6 bytes in the payload are the Bluetooth packet trailer data and do not need to be decoded.
417 +
418 +So the payload is:**01C12309250F1AD100CD006446**
419 +
420 +
421 +==== (% style="color:#4472c4" %)**Bluetooth data packet frame header**(%%) ====
422 +
423 +Example: 0x0201060609444D5430310EFF
424 +
425 +
426 +==== (% style="color:#4472c4" %)**DevMode**(%%) ====
427 +
428 +**Example**:
429 +
430 +If payload is 0x01: BLE_LoRa
431 +
432 +If payload is 0x02: LoRa
433 +
434 +If payload is 0x03: BLE
435 +
436 +
437 +==== (% style="color:#4472c4" %)**MACaddr**(%%) ====
438 +
422 422  **Example**:
423 423  
424 -If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
441 +If the payload is C12309250F1A, the MACaddr is C12309250F1A
425 425  
426 -If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
427 427  
428 -(FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
444 +==== (% style="color:#4472c4" %)**ProbeBat**(%%) ====
429 429  
446 +**Example:**
430 430  
448 +If payload is 0x64 = 100%
431 431  
432 -== 2.4 Bluetoothe Broadcast Payload ==
433 433  
451 +==== (% style="color:#4472c4" %)**BoxBat**(%%) ====
434 434  
453 +**Example:**
435 435  
455 +If payload is 0x46 = 70%
436 436  
437 437  
458 +==== (% style="color:#4472c4" %)**Food temperature**(%%) ====
459 +
460 +Because the food temperature data is a little-endian sequence, the order of the front and back bytes needs to be swapped during decoding.
461 +
462 +**Example**:
463 +
464 +If payload is: D300H = 00D3H, temp = 00D3H /10 = 21.1 degree
465 +
466 +If payload is: 3FFFH  = FF3F , temp = (FF3FH - 65536)/10 = -19.3 degrees.
467 +
468 +
469 +==== (% style="color:#4472c4" %)**Ambient temperature**(%%) ====
470 +
471 +Because the food temperature data is a little-endian sequence, the order of the front and back bytes needs to be swapped during decoding.
472 +
473 +**Example**:
474 +
475 +If payload is: D200H = 00D2H, temp = 00D2H /10 = 21.0 degree
476 +
477 +If payload is: 3FFFH  = FF3F , temp = (FF3FH - 65536)/10 = -19.3 degrees.
478 +
479 +
480 +==== (% style="color:#4472c4" %)**Bluetooth data packet frame tail**(%%) ====
481 +
482 +Example: 0x0512E001E001
483 +
484 +
485 +
486 +== 2.5 Datalog Feature ==
487 +
488 +
489 +Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, DMT01 will store the reading for future retrieving purposes.
490 +
491 +
492 +=== 2.5.1 How datalog works ===
493 +
494 +
495 +DMT01 will wait for ACK for every uplink, when there is no LoRaWAN network,DMT01 will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery.
496 +
497 +* (((
498 +a) DMT01 will do an ACK check for data records sending to make sure every data arrive server.
499 +)))
500 +* (((
501 +b) DMT01 will send data in **CONFIRMED Mode**, but DMT01 won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if DMT01 gets a ACK, DMT01 will consider there is a network connection and resend all NONE-ACK messages.
502 +
503 +
504 +)))
505 +
506 +=== 2.5.2 Enable Datalog ===
507 +
508 +Using the platform downlink** 07 01**, you can enable the device to automatically send **non-ACK** messages. Once enabled, the LC01 will wait for an acknowledgment (ACK) for every uplink. If there is no LoRaWAN network available, DMT01 will mark these records as non-ACK messages, store the sensor data, and continue checking for network availability (at 10-second intervals) to resend all stored messages once the network is restored.
509 +
510 +* (((
511 +a) DMT01 performs an ACK check for each data record to ensure it successfully reaches the server.
512 +)))
513 +* (((
514 +b) When automatic sending of non-ACK messages is enabled, the DMT01 transmits data in **CONFIRMED** mode. If an ACK is not received, it does not resend the packet; instead, it marks it as a **non-ACK** message. During subsequent uplinks, if the DMT01 receives an ACK, it considers the network restored and will resend all stored non-ACK messages.
515 +)))
516 +
517 +
518 +
519 +=== 2.5.3 Unix TimeStamp ===
520 +
521 +
522 +DMT01 uses Unix TimeStamp format based on
523 +
524 +[[image:1754354802681-163.jpeg]]
525 +
526 +User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
527 +
528 +Below is the converter example
529 +
530 +[[image:1754354818964-624.jpeg]]
531 +
532 +
533 +
534 +=== 2.5.4 Set Device Time ===
535 +
536 +
537 +You need to run downlink command 28 01 to enable time synchronization.
538 +
539 +Once the LC01 joins the LoRaWAN network, it will send the MAC command **DeviceTimeReq**, and the server will reply with **DeviceTimeAns** to provide the current time to the LC01. If the LC01 fails to receive the time from the server, it will use its internal time and wait for the next time request. //(By default, this occurs once every 10 days.)//
540 +
541 +{{info}}
542 +The LoRaWAN server must support LoRaWAN v1.0.3 (MAC v1.0.3) or higher to use this MAC command feature. ChirpStack, The Things Stack v3, and Loriot support it, but The Things Stack v2 does not. If the server does not support this command, it will discard the uplink packet containing it. As a result, the user will lose the time request packet when the automatic time synchronization function is enabled on TTN v2.
543 +{{/info}}
544 +
545 +(% style="color:#4f81bd" %)**Downlink Command: 0x28**
546 +
547 +* Example: 0x28 01  ~/~/ Automatic time synchronization Enabled
548 +* Example: 0x28 00  ~/~/  Automatic time synchronization Disable.
549 +
550 +=== 2.5.5 Datalog Uplink payload (FPORT~=3) ===
551 +
552 +
553 +The Datalog uplinks will use below payload format.
554 +
555 +**Retrieval data payload:**
556 +
557 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
558 +|=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
559 +**Size(bytes)**
560 +)))|=(% style="width: 40px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 55px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 65px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 180px; background-color:#4F81BD;color:white" %)**1**|=(% style="width: 100px; background-color:#4F81BD;color:white" %)**4**
561 +|(% style="width:103px" %)Value|(% style="width:68px" %)(((
562 +ignore
563 +)))|(% style="width:104px" %)(((
564 +(((
565 +Humidity
566 +)))
567 +)))|(% style="width:87px" %)(((
568 +Temperature
569 +)))|(% style="width:178px" %)(((
570 +Poll message flag & Alarm Flag& Level of PA8
571 +)))|(% style="width:137px" %)Unix Time Stamp
572 +
573 +**Poll message flag & Alarm Flag & Level of PA8:**
574 +
575 +[[image:image-20230524114302-1.png||height="115" width="736"]]
576 +
577 +
578 +**No ACK Message**:  1: This message means this payload is fromn Uplink Message which doesn't get ACK from the server before ( for **PNACKMD=1** feature)
579 +
580 +**Poll Message Flag**: 1: This message is a poll message reply.
581 +
582 +* Poll Message Flag is set to 1.
583 +
584 +* Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
585 +
586 +For example, in US915 band, the max payload for different DR is:
587 +
588 +**a) DR0:** max is 11 bytes so one entry of data
589 +
590 +**b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
591 +
592 +**c) DR2:** total payload includes 11 entries of data
593 +
594 +**d) DR3: **total payload includes 22 entries of data.
595 +
596 +If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
597 +
598 +**Example:**
599 +
600 +If DMT01 has below data inside Flash:
601 +
602 +[[image:image-20230524114654-2.png]]
603 +
604 +
605 +If user sends below downlink command: 31646D84E1646D856C05
606 +
607 +Where : Start time: 646D84E1 = time 23/5/24 03:30:41
608 +
609 + Stop time: 646D856C= time 23/5/24 03:33:00
610 +
611 +
612 +DMT01 **will uplink this payload.**
613 +
614 +[[image:image-20230524114826-3.png||height="448" width="1244"]]
615 +
616 +(((
617 +00 00 02 36 01 10 40 64 6D 84 E1 00 00 02 37 01 10 40 64 6D 84 F8 00 00 02 37 01 0F 40 64 6D 85 04 00 00 02 3A 01 0F 40 64 6D 85 18 00 00 02 3C 01 0F 40 64 6D 85 36 00 00 02 3D 01 0E 40 64 6D 85 3F 00 00 02 3F 01 0E 40 64 6D 85 60 00 00 02 40 01 0E 40 64 6D 85 6A
618 +)))
619 +
620 +(((
621 +Where the first 11 bytes is for the first entry:
622 +)))
623 +
624 +(((
625 +00 00 02 36 01 10 40 64 6D 84 E1
626 +)))
627 +
628 +(((
629 +**Hum**=0x0236/10=56.6
630 +)))
631 +
632 +(((
633 +**Temp**=0x0110/10=27.2
634 +)))
635 +
636 +(((
637 +**poll message flag & Alarm Flag & Level of PA8**=0x40,means reply data,sampling uplink message,the PA8 is low level.
638 +)))
639 +
640 +(((
641 +**Unix time** is 0x646D84E1=1684899041s=23/5/24 03:30:41
642 +)))
643 +
644 +
645 +
646 +
438 438  = 3. Configure DMT01  ~-~- 需要修改 =
439 439  
440 440  == 3.1 Configure Methods ==
1754305091443-355.jpg
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.ting
Size
... ... @@ -1,0 +1,1 @@
1 +408.8 KB
Content
1754305290140-806.jpg
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.ting
Size
... ... @@ -1,0 +1,1 @@
1 +133.1 KB
Content
1754354802681-163.jpeg
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.ting
Size
... ... @@ -1,0 +1,1 @@
1 +18.9 KB
Content
1754354818964-624.jpeg
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.ting
Size
... ... @@ -1,0 +1,1 @@
1 +67.4 KB
Content