LoRaWAN协议(七)–完整数据流程

以下的GW指Gateway

所用指令:

tcpdump -i lo -nn -x ‘length>100’

入网流程

OTAA入网流程,ABP方式入网则不需要

    GW -> NS join_request

16:38:10.426740 IP 127.0.0.1.49875 > 127.0.0.1.1680: UDP, length 208   
        0x0000:  4500 00ec 9d19 4000 4011 9ee5 7f00 0001
        0x0010:  7f00 0001 c2d3 0690 00d8 feeb 0154 9f00
        0x0020:  fffe b827 ebf2 1a07 7b22 7278 706b 223a
        0x0030:  5b7b 2274 6d73 7422 3a35 3332 3530 3536
        0x0040:  3230 2c22 6368 616e 223a 362c 2272 6663
        0x0050:  6822 3a30 2c22 6672 6571 223a 3437 312e
        0x0060:  3930 3030 3030 2c22 7374 6174 223a 312c
        0x0070:  226d 6f64 7522 3a22 4c4f 5241 222c 2264
        0x0080:  6174 7222 3a22 5346 3132 4257 3132 3522
        0x0090:  2c22 636f 6472 223a 2234 2f35 222c 226c
        0x00a0:  736e 7222 3a2d 3137 2e30 2c22 7273 7369
        0x00b0:  223a 2d38 312c 2273 697a 6522 3a32 332c
        0x00c0:  2264 6174 6122 3a22 4141 4541 4143 4141
        0x00d0:  7853 5973 4668 4157 4941 4233 5367 4255
        0x00e0:  6530 4174 345a 6f3d 227d 5d7d
        
7b22 7278 706b 223a
5b7b 2274 6d73 7422 3a35 3332 3530 3536
3230 2c22 6368 616e 223a 362c 2272 6663
6822 3a30 2c22 6672 6571 223a 3437 312e
3930 3030 3030 2c22 7374 6174 223a 312c
226d 6f64 7522 3a22 4c4f 5241 222c 2264
6174 7222 3a22 5346 3132 4257 3132 3522
2c22 636f 6472 223a 2234 2f35 222c 226c
736e 7222 3a2d 3137 2e30 2c22 7273 7369
223a 2d38 312c 2273 697a 6522 3a32 332c
2264 6174 6122 3a22 4141 4541 4143 4141
7853 5973 4668 4157 4941 4233 5367 4255
6530 4174 345a 6f3d 227d 5d7d

{
    "rxpk": [
        {
            "tmst": 532505620,
            "chan": 6,
            "rfch": 0,
            "freq": 471.9,
            "stat": 1,
            "modu": "LORA",
            "datr": "SF12BW125",
            "codr": "4/5",
            "lsnr": -17,
            "rssi": -81,
            "size": 23,
            "data": "AAEAACAAxSYsFhAWIAB3SgBUe0At4Zo="
        }
    ]
}

data base64 decode:
\x00 \x01 \x00 \x00 \x20 \x00 \xc5 \x26 
\x2c \x16 \x10 \x16 \x20 \x00 \x77 \x4a 
\x00 \x54 \x7b \x40 \x2d \xe1 \x9a 

NS -> AS

16:38:10.427560 IP 127.0.0.1.42189 > 127.0.0.1.4000: Flags [P.], seq 976281099:976281164, ack 424415867, win 350, options [nop,nop,TS val 457630 ecr 457618], length 65
        0x0000:  4500 0075 26ca 4000 4006 15b7 7f00 0001
        0x0010:  7f00 0001 a4cd 0fa0 3a30 de0b 194c 127b
        0x0020:  8018 015e fe69 0000 0101 080a 0006 fb9e
        0x0030:  0006 fb92 7b22 6a6f 696e 223a 7b22 7265
        0x0040:  7175 6573 7422 3a7b 2266 7261 6d65 223a
        0x0050:  2241 4145 4141 4341 4178 5359 7346 6841
        0x0060:  5749 4142 3353 6742 5565 3041 7434 5a6f
        0x0070:  227d 7d7d 00
        
7b22 6a6f 696e 223a 7b22 7265
7175 6573 7422 3a7b 2266 7261 6d65 223a
2241 4145 4141 4341 4178 5359 7346 6841
5749 4142 3353 6742 5565 3041 7434 5a6f
227d 7d7d 00

{
    "join": {
        "request": {
            "frame": "AAEAACAAxSYsFhAWIAB3SgBUe0At4Zo"
        }
    }
}

frame base64 decode:
\x00 \x01 \x00 \x00 \x20 \x00 \xc5 \x26 
\x2c \x16 \x10 \x16 \x20 \x00 \x77 \x4a 
\x00 \x54 \x7b \x40 \x2d \xe1 \x9a 

AS -> NS

16:38:10.439244 IP 127.0.0.1.4000 > 127.0.0.1.42189: Flags [P.], seq 1:53, ack 65, win 6146, options [nop,nop,TS val 457631 ecr 457630], length 52
        0x0000:  4500 0068 c4fa 4000 4006 7793 7f00 0001
        0x0010:  7f00 0001 0fa0 a4cd 194c 127b 3a30 de4c
        0x0020:  8018 1802 fe5c 0000 0101 080a 0006 fb9f
        0x0030:  0006 fb9e 7b22 6a6f 696e 223a 7b22 6d6f
        0x0040:  7465 6575 6922 3a22 3461 3737 3030 3230
        0x0050:  3136 3130 3136 222c 2261 6363 6570 7422
        0x0060:  3a74 7275 657d 7d00
        
7b22 6a6f 696e 223a 7b22 6d6f
7465 6575 6922 3a22 3461 3737 3030 3230
3136 3130 3136 222c 2261 6363 6570 7422
3a74 7275 657d 7d00

{
    "join": {
        "moteeui": "4a770020161016",
        "accept": true
    }
}

NS -> AS

16:38:10.440946 IP 127.0.0.1.42189 > 127.0.0.1.4000: Flags [P.], seq 65:185, ack 53, win 350, options [nop,nop,TS val 457631 ecr 457631], length 120
        0x0000:  4500 00ac 26cc 4000 4006 157e 7f00 0001
        0x0010:  7f00 0001 a4cd 0fa0 3a30 de4c 194c 12af
        0x0020:  8018 015e fea0 0000 0101 080a 0006 fb9f
        0x0030:  0006 fb9f 7b22 6a6f 696e 223a 7b22 6170
        0x0040:  7065 7569 223a 2232 6332 3663 3530 3032
        0x0050:  3030 3030 3030 3122 2c22 6d6f 7465 6575
        0x0060:  6922 3a22 3461 3737 3030 3230 3136 3130
        0x0070:  3136 222c 2264 6574 6169 6c73 223a 7b22
        0x0080:  6d6f 7465 6164 6472 223a 2234 3830 3030
        0x0090:  3030 3222 2c22 6465 7669 6365 6e6f 6e63
        0x00a0:  6522 3a33 3135 3732 7d7d 7d00

        
7b22 6a6f 696e 223a 7b22 6170
7065 7569 223a 2232 6332 3663 3530 3032
3030 3030 3030 3122 2c22 6d6f 7465 6575
6922 3a22 3461 3737 3030 3230 3136 3130
3136 222c 2264 6574 6169 6c73 223a 7b22
6d6f 7465 6164 6472 223a 2234 3830 3030
3030 3222 2c22 6465 7669 6365 6e6f 6e63
6522 3a33 3135 3732 7d7d 7d00

{
    "join": {
        "appeui": "2c26c50020000001",
        "moteeui": "4a770020161016",
        "details": {
            "moteaddr": "48000002",
            "devicenonce": 31572
        }
    }
}

AS -> NS


16:38:10.482046 IP 127.0.0.1.4000 > 127.0.0.1.42189: Flags [P.], seq 53:186, ack 185, win 6146, options [nop,nop,TS val 457636 ecr 457631], length 133
        0x0000:  4500 00b9 c4fc 4000 4006 7740 7f00 0001
        0x0010:  7f00 0001 0fa0 a4cd 194c 12af 3a30 dec4
        0x0020:  8018 1802 fead 0000 0101 080a 0006 fba4
        0x0030:  0006 fb9f 7b22 6a6f 696e 223a 7b22 6d6f
        0x0040:  7465 6575 6922 3a22 3461 3737 3030 3230
        0x0050:  3136 3130 3136 222c 2263 6f6d 706c 6574
        0x0060:  6522 3a7b 2266 7261 6d65 223a 2249 5071
        0x0070:  414b 5851 374c 532f 436d 5956 4344 7938
        0x0080:  4b33 6b34 222c 226e 6574 776f 726b 6b65
        0x0090:  7922 3a22 6465 3033 3333 3161 6562 3432
        0x00a0:  3534 6539 3732 3762 3666 6166 6266 3133
        0x00b0:  6462 3364 227d 7d7d 00
        

7b22 6a6f 696e 223a 7b22 6d6f
7465 6575 6922 3a22 3461 3737 3030 3230
3136 3130 3136 222c 2263 6f6d 706c 6574
6522 3a7b 2266 7261 6d65 223a 2249 5071
414b 5851 374c 532f 436d 5956 4344 7938
4b33 6b34 222c 226e 6574 776f 726b 6b65
7922 3a22 6465 3033 3333 3161 6562 3432
3534 6539 3732 3762 3666 6166 6266 3133
6462 3364 227d 7d7d 00      

{
    "join": {
        "moteeui": "4a770020161016",
        "complete": {
            "frame": "IPqAKXQ7LS/CmYVCDy8K3k4",
            "networkkey": "de03331aeb4254e9727b6fafbf13db3d"
        }
    }
}

frame base64 decode:
\x20 \xfa \x80 \x29 \x74 \x3b \x2d \x2f 
\xc2 \x99 \x85 \x42 \x0f \x2f \x0a \xde 
\x4e 

AS -> CS

16:38:10.482266 IP 127.0.0.1.37188 > 127.0.0.1.5000: Flags [P.], seq 3036262291:3036262362, ack 3069608558, win 342, options [nop,nop,TS val 457636 ecr 457633], length 71
        0x0000:  4500 007b 155e 4000 4006 271d 7f00 0001
        0x0010:  7f00 0001 9144 1388 b4f9 af93 b6f6 826e
        0x0020:  8018 0156 fe6f 0000 0101 080a 0006 fba4
        0x0030:  0006 fba1 7b22 6d6f 7465 223a 7b22 6575
        0x0040:  6922 3a22 3461 3737 3030 3230 3136 3130
        0x0050:  3136 222c 226a 6f69 6e22 3a7b 2261 7070
        0x0060:  6575 6922 3a22 3263 3236 6335 3030 3230
        0x0070:  3030 3030 3031 227d 7d7d 00

7b22 6d6f 7465 223a 7b22 6575
6922 3a22 3461 3737 3030 3230 3136 3130
3136 222c 226a 6f69 6e22 3a7b 2261 7070
6575 6922 3a22 3263 3236 6335 3030 3230
3030 3030 3031 227d 7d7d 00     

{
    "mote": {
        "eui": "4a770020161016",
        "join": {
            "appeui": "2c26c50020000001"
        }
    }
}

NS->GW Join_accept message

16:38:14.677344 IP 127.0.0.1.1680 > 127.0.0.1.48034: UDP, length 169
        0x0000:  4500 00c5 9d74 4000 4011 9eb1 7f00 0001
        0x0010:  7f00 0001 0690 bba2 00b1 fec4 0100 0003
        0x0020:  7b22 7478 706b 223a 7b22 746d 7374 223a
        0x0030:  3533 3735 3035 3632 302c 2266 7265 7122
        0x0040:  3a34 3731 2e39 3030 3030 302c 2272 6663
        0x0050:  6822 3a30 2c22 706f 7765 223a 3134 2c22
        0x0060:  6d6f 6475 223a 224c 4f52 4122 2c22 6461
        0x0070:  7472 223a 2253 4631 3242 5731 3235 222c
        0x0080:  2263 6f64 7222 3a22 342f 3522 2c22 6970
        0x0090:  6f6c 223a 7472 7565 2c22 7369 7a65 223a
        0x00a0:  3137 2c22 6461 7461 223a 2249 5071 414b
        0x00b0:  5851 374c 532f 436d 5956 4344 7938 4b33
        0x00c0:  6b34 227d 7d


7b22 7478 706b 223a 7b22 746d 7374 223a
3533 3735 3035 3632 302c 2266 7265 7122
3a34 3731 2e39 3030 3030 302c 2272 6663
6822 3a30 2c22 706f 7765 223a 3134 2c22
6d6f 6475 223a 224c 4f52 4122 2c22 6461
7472 223a 2253 4631 3242 5731 3235 222c
2263 6f64 7222 3a22 342f 3522 2c22 6970
6f6c 223a 7472 7565 2c22 7369 7a65 223a
3137 2c22 6461 7461 223a 2249 5071 414b
5851 374c 532f 436d 5956 4344 7938 4b33
6b34 227d 7d        
        
{
    "txpk": {
        "tmst": 537505620,
        "freq": 471.9,
        "rfch": 0,
        "powe": 14,
        "modu": "LORA",
        "datr": "SF12BW125",
        "codr": "4/5",
        "ipol": true,
        "size": 17,
        "data": "IPqAKXQ7LS/CmYVCDy8K3k4"
    }
}

data base64 decode:
\x20 \xfa \x80 \x29 \x74 \x3b \x2d \x2f 
\xc2 \x99 \x85 \x42 \x0f \x2f \x0a \xde 
\x4e 

GW -> NS

16:38:15.360678 IP 127.0.0.1.49875 > 127.0.0.1.1680: UDP, length 113
        0x0000:  4500 008d 9d77 4000 4011 9ee6 7f00 0001
        0x0010:  7f00 0001 c2d3 0690 0079 fe8c 014d 2900
        0x0020:  fffe b827 ebf2 1a07 7b22 7374 6174 223a
        0x0030:  7b22 7469 6d65 223a 2232 3031 362d 3131
        0x0040:  2d32 3420 3136 3a33 383a 3135 2047 4d54
        0x0050:  222c 2272 786e 6222 3a33 2c22 7278 6f6b
        0x0060:  223a 312c 2272 7866 7722 3a31 2c22 6163
        0x0070:  6b72 223a 3130 302e 302c 2264 776e 6222
        0x0080:  3a31 2c22 7478 6e62 223a 317d 7d

7b22 7374 6174 223a
7b22 7469 6d65 223a 2232 3031 362d 3131
2d32 3420 3136 3a33 383a 3135 2047 4d54
222c 2272 786e 6222 3a33 2c22 7278 6f6b
223a 312c 2272 7866 7722 3a31 2c22 6163
6b72 223a 3130 302e 302c 2264 776e 6222
3a31 2c22 7478 6e62 223a 317d 7d

{
    "stat": {
        "time": "2016-11-24 16:38:15 GMT",
        "rxnb": 3,
        "rxok": 1,
        "rxfw": 1,
        "ackr": 100,
        "dwnb": 1,
        "txnb": 1
    }
}

数据通讯流程

GW->NS

16:38:20.430581 IP 127.0.0.1.49875 > 127.0.0.1.1680: UDP, length 216
        0x0000:  4500 00f4 9e4d 4000 4011 9da9 7f00 0001
        0x0010:  7f00 0001 c2d3 0690 00e0 fef3 0116 b300
        0x0020:  fffe b827 ebf2 1a07 7b22 7278 706b 223a
        0x0030:  5b7b 2274 6d73 7422 3a35 3432 3531 3235
        0x0040:  3030 2c22 6368 616e 223a 312c 2272 6663
        0x0050:  6822 3a31 2c22 6672 6571 223a 3437 322e
        0x0060:  3530 3030 3030 2c22 7374 6174 223a 312c
        0x0070:  226d 6f64 7522 3a22 4c4f 5241 222c 2264
        0x0080:  6174 7222 3a22 5346 3132 4257 3132 3522
        0x0090:  2c22 636f 6472 223a 2234 2f35 222c 226c
        0x00a0:  736e 7222 3a2d 3138 2e30 2c22 7273 7369
        0x00b0:  223a 2d38 352c 2273 697a 6522 3a32 382c
        0x00c0:  2264 6174 6122 3a22 5141 4941 4145 6741
        0x00d0:  4151 4143 7168 6831 5745 4967 4477 584d
        0x00e0:  4366 3576 4174 616b 414e 5348 5267 3d3d
        0x00f0:  227d 5d7d

7b22 7278 706b 223a
5b7b 2274 6d73 7422 3a35 3432 3531 3235
3030 2c22 6368 616e 223a 312c 2272 6663
6822 3a31 2c22 6672 6571 223a 3437 322e
3530 3030 3030 2c22 7374 6174 223a 312c
226d 6f64 7522 3a22 4c4f 5241 222c 2264
6174 7222 3a22 5346 3132 4257 3132 3522
2c22 636f 6472 223a 2234 2f35 222c 226c
736e 7222 3a2d 3138 2e30 2c22 7273 7369
223a 2d38 352c 2273 697a 6522 3a32 382c
2264 6174 6122 3a22 5141 4941 4145 6741
4151 4143 7168 6831 5745 4967 4477 584d
4366 3576 4174 616b 414e 5348 5267 3d3d
227d 5d7d

{
    "rxpk": [
        {
            "tmst": 542512500,
            "chan": 1,
            "rfch": 1,
            "freq": 472.5,
            "stat": 1,
            "modu": "LORA",
            "datr": "SF12BW125",
            "codr": "4/5",
            "lsnr": -18,
            "rssi": -85,
            "size": 28,
            "data": "QAIAAEgAAQACqhh1WEIgDwXMCf5vAtakANSHRg=="
        }
    ]
}

data base64 decode:
\x40 \x02 \x00 \x00 \x48 \x00 \x01 \x00 
\x02 \xaa \x18 \x75 \x58 \x42 \x20 \x0f 
\x05 \xcc \x09 \xfe \x6f \x02 \xd6 \xa4 
\x00 \xd4 \x87 \x46 

NS -> AS

16:38:20.786860 IP 127.0.0.1.42189 > 127.0.0.1.4000: Flags [P.], seq 219:530, ack 221, win 359, options [nop,nop,TS val 458666 ecr 458661], length 311
        0x0000:  4500 016b 2713 4000 4006 1478 7f00 0001
        0x0010:  7f00 0001 a4cd 0fa0 3a30 dee6 194c 1357
        0x0020:  8018 0167 ff5f 0000 0101 080a 0006 ffaa
        0x0030:  0006 ffa5 7b22 6170 7022 3a7b 226d 6f74
        0x0040:  6565 7569 223a 2234 6137 3730 3032 3031
        0x0050:  3631 3031 3622 2c22 6469 7222 3a22 7570
        0x0060:  222c 2273 6571 6e6f 223a 312c 2275 7365
        0x0070:  7264 6174 6122 3a7b 2270 6f72 7422 3a32
        0x0080:  2c22 7061 796c 6f61 6422 3a22 7168 6831
        0x0090:  5745 4967 4477 584d 4366 3576 4174 616b
        0x00a0:  227d 2c22 6d6f 7465 7478 223a 7b22 6672
        0x00b0:  6571 223a 3437 322e 352c 2264 6174 7222
        0x00c0:  3a22 5346 3132 4257 3132 3522 2c22 636f
        0x00d0:  6472 223a 2234 2f35 222c 2261 6472 223a
        0x00e0:  6661 6c73 657d 2c22 6777 7278 223a 5b7b
        0x00f0:  2265 7569 223a 2266 6666 6562 3832 3765
        0x0100:  6266 3231 6130 3722 2c22 7469 6d65 223a
        0x0110:  2232 3031 362d 3131 2d32 3454 3136 3a33
        0x0120:  383a 3230 5a22 2c22 7469 6d65 6672 6f6d
        0x0130:  6761 7465 7761 7922 3a66 616c 7365 2c22
        0x0140:  6368 616e 223a 312c 2272 6663 6822 3a31
        0x0150:  2c22 7273 7369 223a 2d38 352c 226c 736e
        0x0160:  7222 3a2d 3138 7d5d 7d7d 00
        
7b22 6170 7022 3a7b 226d 6f74
6565 7569 223a 2234 6137 3730 3032 3031
3631 3031 3622 2c22 6469 7222 3a22 7570
222c 2273 6571 6e6f 223a 312c 2275 7365
7264 6174 6122 3a7b 2270 6f72 7422 3a32
2c22 7061 796c 6f61 6422 3a22 7168 6831
5745 4967 4477 584d 4366 3576 4174 616b
227d 2c22 6d6f 7465 7478 223a 7b22 6672
6571 223a 3437 322e 352c 2264 6174 7222
3a22 5346 3132 4257 3132 3522 2c22 636f
6472 223a 2234 2f35 222c 2261 6472 223a
6661 6c73 657d 2c22 6777 7278 223a 5b7b
2265 7569 223a 2266 6666 6562 3832 3765
6266 3231 6130 3722 2c22 7469 6d65 223a
2232 3031 362d 3131 2d32 3454 3136 3a33
383a 3230 5a22 2c22 7469 6d65 6672 6f6d
6761 7465 7761 7922 3a66 616c 7365 2c22
6368 616e 223a 312c 2272 6663 6822 3a31
2c22 7273 7369 223a 2d38 352c 226c 736e
7222 3a2d 3138 7d5d 7d7d 00


{
    "app": {
        "moteeui": "4a770020161016",
        "dir": "up",
        "seqno": 1,
        "userdata": {
            "port": 2,
            "payload": "qhh1WEIgDwXMCf5vAtak"
        },
        "motetx": {
            "freq": 472.5,
            "datr": "SF12BW125",
            "codr": "4/5",
            "adr": false
        },
        "gwrx": [
            {
                "eui": "fffeb827ebf21a07",
                "time": "2016-11-24T16:38:20Z",
                "timefromgateway": false,
                "chan": 1,
                "rfch": 1,
                "rssi": -85,
                "lsnr": -18
            }
        ]
    }
}

AS -> NC

16:38:20.787061 IP 127.0.0.1.45769 > 127.0.0.1.6000: Flags [P.], seq 3402358219:3402358475, ack 524101621, win 342, options [nop,nop,TS val 458666 ecr 458646], length 256
        0x0000:  4500 0134 9fbb 4000 4006 9c06 7f00 0001
        0x0010:  7f00 0001 b2c9 1770 cacb ddcb 1f3d 27f5
        0x0020:  8018 0156 ff28 0000 0101 080a 0006 ffaa
        0x0030:  0006 ff96 7b22 6170 7022 3a7b 226d 6f74
        0x0040:  6565 7569 223a 2234 6137 3730 3032 3031
        0x0050:  3631 3031 3622 2c22 6469 7222 3a22 7570
        0x0060:  222c 2273 6571 6e6f 223a 312c 226d 6f74
        0x0070:  6574 7822 3a7b 2266 7265 7122 3a34 3732
        0x0080:  2e35 2c22 6461 7472 223a 2253 4631 3242
        0x0090:  5731 3235 222c 2263 6f64 7222 3a22 342f
        0x00a0:  3522 2c22 6164 7222 3a66 616c 7365 7d2c
        0x00b0:  2267 7772 7822 3a5b 7b22 6575 6922 3a22
        0x00c0:  6666 6665 6238 3237 6562 6632 3161 3037
        0x00d0:  222c 2274 696d 6522 3a22 3230 3136 2d31
        0x00e0:  312d 3234 5431 363a 3338 3a32 305a 222c
        0x00f0:  2274 696d 6566 726f 6d67 6174 6577 6179
        0x0100:  223a 6661 6c73 652c 2263 6861 6e22 3a31
        0x0110:  2c22 7266 6368 223a 312c 2272 7373 6922
        0x0120:  3a2d 3835 2c22 6c73 6e72 223a 2d31 387d
        0x0130:  5d7d 7d00

AS ->CS

16:38:20.787587 IP 127.0.0.1.37188 > 127.0.0.1.5000: Flags [P.], seq 105:416, ack 36, win 342, options [nop,nop,TS val 458666 ecr 458662], length 311
        0x0000:  4500 016b 15a4 4000 4006 25e7 7f00 0001
        0x0010:  7f00 0001 9144 1388 b4f9 affc b6f6 8291
        0x0020:  8018 0156 ff5f 0000 0101 080a 0006 ffaa
        0x0030:  0006 ffa6 7b22 6170 7022 3a7b 226d 6f74
        0x0040:  6565 7569 223a 2234 6137 3730 3032 3031
        0x0050:  3631 3031 3622 2c22 6469 7222 3a22 7570
        0x0060:  222c 2273 6571 6e6f 223a 312c 2275 7365
        0x0070:  7264 6174 6122 3a7b 2270 6f72 7422 3a32
        0x0080:  2c22 7061 796c 6f61 6422 3a22 4151 4944
        0x0090:  4241 5547 4277 674a 4367 734d 4451 3450
        0x00a0:  227d 2c22 6d6f 7465 7478 223a 7b22 6672
        0x00b0:  6571 223a 3437 322e 352c 2264 6174 7222
        0x00c0:  3a22 5346 3132 4257 3132 3522 2c22 636f
        0x00d0:  6472 223a 2234 2f35 222c 2261 6472 223a
        0x00e0:  6661 6c73 657d 2c22 6777 7278 223a 5b7b
        0x00f0:  2265 7569 223a 2266 6666 6562 3832 3765
        0x0100:  6266 3231 6130 3722 2c22 7469 6d65 223a
        0x0110:  2232 3031 362d 3131 2d32 3454 3136 3a33
        0x0120:  383a 3230 5a22 2c22 7469 6d65 6672 6f6d
        0x0130:  6761 7465 7761 7922 3a66 616c 7365 2c22
        0x0140:  6368 616e 223a 312c 2272 6663 6822 3a31
        0x0150:  2c22 7273 7369 223a 2d38 352c 226c 736e
        0x0160:  7222 3a2d 3138 7d5d 7d7d 00
        
        
7b22 6170 7022 3a7b 226d 6f74
6565 7569 223a 2234 6137 3730 3032 3031
3631 3031 3622 2c22 6469 7222 3a22 7570
222c 2273 6571 6e6f 223a 312c 2275 7365
7264 6174 6122 3a7b 2270 6f72 7422 3a32
2c22 7061 796c 6f61 6422 3a22 4151 4944
4241 5547 4277 674a 4367 734d 4451 3450
227d 2c22 6d6f 7465 7478 223a 7b22 6672
6571 223a 3437 322e 352c 2264 6174 7222
3a22 5346 3132 4257 3132 3522 2c22 636f
6472 223a 2234 2f35 222c 2261 6472 223a
6661 6c73 657d 2c22 6777 7278 223a 5b7b
2265 7569 223a 2266 6666 6562 3832 3765
6266 3231 6130 3722 2c22 7469 6d65 223a
2232 3031 362d 3131 2d32 3454 3136 3a33
383a 3230 5a22 2c22 7469 6d65 6672 6f6d
6761 7465 7761 7922 3a66 616c 7365 2c22
6368 616e 223a 312c 2272 6663 6822 3a31
2c22 7273 7369 223a 2d38 352c 226c 736e
7222 3a2d 3138 7d5d 7d7d



{
    "app": {
        "moteeui": "4a770020161016",
        "dir": "up",
        "seqno": 1,
        "userdata": {
            "port": 2,
            "payload": "AQIDBAUGBwgJCgsMDQ4P"
        },
        "motetx": {
            "freq": 472.5,
            "datr": "SF12BW125",
            "codr": "4/5",
            "adr": false
        },
        "gwrx": [
            {
                "eui": "fffeb827ebf21a07",
                "time": "2016-11-24T16:38:20Z",
                "timefromgateway": false,
                "chan": 1,
                "rfch": 1,
                "rssi": -85,
                "lsnr": -18
            }
        ]
    }
}

app.userdata.payload base64+aes 解密,得到:
\x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08
\x09 \x0a \x0b \x0c \x0d \x0e \x0f
可以看到是用户发上去的负载了,说明解密的工作完成了

其他

GW->NS 时间同步包

16:37:45.362854 IP 127.0.0.1.49875 > 127.0.0.1.1680: UDP, length 113   
        0x0000:  4500 008d 9692 4000 4011 a5cb 7f00 0001
        0x0010:  7f00 0001 c2d3 0690 0079 fe8c 01a0 6800
        0x0020:  fffe b827 ebf2 1a07 7b22 7374 6174 223a
        0x0030:  7b22 7469 6d65 223a 2232 3031 362d 3131
        0x0040:  2d32 3420 3136 3a33 373a 3435 2047 4d54
        0x0050:  222c 2272 786e 6222 3a30 2c22 7278 6f6b
        0x0060:  223a 302c 2272 7866 7722 3a30 2c22 6163
        0x0070:  6b72 223a 3130 302e 302c 2264 776e 6222
        0x0080:  3a30 2c22 7478 6e62 223a 307d 7d
        
7b22 7374 6174 223a
7b22 7469 6d65 223a 2232 3031 362d 3131
2d32 3420 3136 3a33 373a 3435 2047 4d54
222c 2272 786e 6222 3a30 2c22 7278 6f6b
223a 302c 2272 7866 7722 3a30 2c22 6163
6b72 223a 3130 302e 302c 2264 776e 6222
3a30 2c22 7478 6e62 223a 307d 7d

AS -> NC

16:38:24.471968 IP 127.0.0.1.45769 > 127.0.0.1.6000: Flags [P.], seq 268:327, ack 14, win 342, options [nop,nop,TS val 459035 ecr 459030], length 59
        0x0000:  4500 006f 9fd5 4000 4006 9cb1 7f00 0001
        0x0010:  7f00 0001 b2c9 1770 cacb ded7 1f3d 2802
        0x0020:  8018 0156 fe63 0000 0101 080a 0007 011b
        0x0030:  0007 0116 7b22 6777 223a 7b22 6575 6922
        0x0040:  3a22 6666 6665 6238 3237 6562 6632 3161
        0x0050:  3037 222c 226c 6f72 6172 6567 696f 6e22
        0x0060:  3a22 6575 726f 7065 3836 3322 7d7d 00
        
7b22 6777 223a 7b22 6575 6922
3a22 6666 6665 6238 3237 6562 6632 3161
3037 222c 226c 6f72 6172 6567 696f 6e22
3a22 6575 726f 7065 3836 3322 7d7d 00

{
    "gw": {
        "eui": "fffeb827ebf21a07",
        "loraregion": "europe863"
    }
}

邮箱地址:454626653@qq.com 欢迎咨询搭讪

说明:LoRa应用学习站通过公开互联网收集、整理并转载有关LoRa及物联网应用解决方案,以供广大LoRa应用开发者和爱好者共同学习交流和参考运用到实际生产生活中。本站所有转载的文章、图片、音频、视频等资料的版权归版权所有人所有并衷心感谢您的付出,由于本站采用的非本站原创文章及图片等内容无法一一联系确认版权者,如果本网所选内容的文章原创作者认为其作品不宜放在本站,请及时通过以下留言功能通知我们采取适当措施,避免给双方造成不必要的经济损失。如果您希望保留本文在LoRa学习站,但希望文章末尾提供对作者的致谢或者产品、网站交换链接的,也请将需求写入以下留言栏中,谢谢您的支持。让我们共同努力,打造万物互联的未来美好生活!

您的留言或需求: