Changes for page DMT01

Last modified by Xiaoling on 2025/08/15 17:26

From version 52.1
edited by Mengting Qiu
on 2025/08/04 19:01
Change comment: Uploaded new attachment "1754305290140-806.jpg", version {1}
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  
... ... @@ -414,8 +414,6 @@
414 414  
415 415  == 2.4 Bluetoothe Broadcast Payload ==
416 416  
417 -=== 2.4.1 Scanning Tools ===
418 -
419 419  Scan and obtain DMT01 device broadcast data through a third-party mobile phone app (such as nRF Connect)
420 420  
421 421  Example:
... ... @@ -422,11 +422,245 @@
422 422  
423 423  Note: The following data is obtained through the **nRF Connect tool**.
424 424  
408 +[[image:1754305290140-806.jpg||height="680" width="432"]]
425 425  
426 426  
411 +If the scanned payload is 0x0201060609444D5430310EFF  **01C12309250F1AD100CD006446   **0512E001E001
427 427  
413 +(% style="color:red" %)**Note**(%%):
428 428  
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.
429 429  
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 +
439 +**Example**:
440 +
441 +If the payload is C12309250F1A, the MACaddr is C12309250F1A
442 +
443 +
444 +==== (% style="color:#4472c4" %)**ProbeBat**(%%) ====
445 +
446 +**Example:**
447 +
448 +If payload is 0x64 = 100%
449 +
450 +
451 +==== (% style="color:#4472c4" %)**BoxBat**(%%) ====
452 +
453 +**Example:**
454 +
455 +If payload is 0x46 = 70%
456 +
457 +
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 +
430 430  = 3. Configure DMT01  ~-~- 需要修改 =
431 431  
432 432  == 3.1 Configure Methods ==
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