eclipse-wakaama / wakaama

Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
BSD 3-Clause "New" or "Revised" License
503 stars 375 forks source link

Wakaama Server connection with bootstrap server #364

Closed apsk25 closed 4 years ago

apsk25 commented 6 years ago

Hi,

I am trying to connect using bootstrap leshan server. leshan.eclipse.org/bs/

Following two identies have been created :-1:

ep LWm2m Bootstrap server LWM2M server amrit coap://leshan.eclipse.org:5783security mode : NO_SEC coaps://leshan.eclipse.org:5684security mode : PSKId : amrit secret : 1234
puresoft coap://leshan.eclipse.org:5783security mode : NO_SEC coap://leshan.eclipse.org:5683security mode : NO_SEC

Scenario 1 dtls_build$ sudo ./lwm2mclient -h leshan.eclipse.org -4 -n puresoft -b rm: cannot remove '/etc/ready': No such file or directory

lwm2m client version : [2][0][0]

lwm2m client sleeping for 30 seconds Trying to bind LWM2M Client to port 56830 LWM2M Client "puresoft" started on port 56830

-> State: STATE_BOOTSTRAPPING

-> State: STATE_BOOTSTRAPPING

-> State: STATE_BOOTSTRAPPING

-> State: STATE_BOOTSTRAPPING

-> State: STATE_BOOTSTRAPPING

Sending 23 bytes to [5.39.83.206]:5783 44 02 C6 B7 B7 C6 57 A5 B2 62 73 4B 65 70 3D 70 D.....W..bsKep=p 75 72 65 73 6F 66 74 uresoft -> State: STATE_BOOTSTRAPPING 8 bytes received from [5.39.83.206]:5783 64 44 C6 B7 B7 C6 57 A5 dD....W. -> State: STATE_BOOTSTRAPPING 12 bytes received from [5.39.83.206]:5783 48 04 79 4B C8 5C 0C 30 57 85 45 AB H.yK..0W.E. Sending 12 bytes to [5.39.83.206]:5783 68 42 79 4B C8 5C 0C 30 57 85 45 AB hByK..0W.E. -> State: STATE_BOOTSTRAPPING

-> State: STATE_BOOTSTRAPPING 83 bytes received from [5.39.83.206]:5783 48 03 79 4C 3C 4F DC B1 7C FC 98 8D B1 30 01 30 H.yL<O..|....0.0 12 2D 16 FF C8 00 1E 63 6F 61 70 3A 2F 2F 6C 65 .-.....coap://le 73 68 61 6E 2E 65 63 6C 69 70 73 65 2E 6F 72 67 shan.eclipse.org 3A 35 37 38 33 C1 01 01 C1 02 03 C0 03 C0 04 C0 :5783........... 05 C1 06 03 C0 07 C0 08 C0 09 C1 0A 6F C1 0B 01 ............o... C1 0C 00 ... Sending 12 bytes to [5.39.83.206]:5783 68 44 79 4C 3C 4F DC B1 7C FC 98 8D hDyL<O..|... -> State: STATE_BOOTSTRAPPING 83 bytes received from [5.39.83.206]:5783 48 03 79 4D 0A 11 55 CB B0 47 22 B9 B1 30 01 31 H.yM..U..G"..0.1 12 2D 16 FF C8 00 1E 63 6F 61 70 3A 2F 2F 6C 65 .-.....coap://le 73 68 61 6E 2E 65 63 6C 69 70 73 65 2E 6F 72 67 shan.eclipse.org 3A 35 36 38 33 C1 01 00 C1 02 03 C0 03 C0 04 C0 :5683........... 05 C1 06 03 C0 07 C0 08 C0 09 C1 0A 7B C1 0B 01 ............{... C1 0C 00 ... Sending 12 bytes to [5.39.83.206]:5783 68 44 79 4D 0A 11 55 CB B0 47 22 B9 hDyM..U..G". -> State: STATE_BOOTSTRAPPING 35 bytes received from [5.39.83.206]:5783 48 03 79 4E 40 47 DB 81 67 93 1E E3 B1 31 01 30 H.yN@G..g....1.0 12 2D 16 FF C1 00 7B C1 01 14 C1 02 01 C1 06 01 .-....{......... C1 07 55 ..U Sending 12 bytes to [5.39.83.206]:5783 68 44 79 4E 40 47 DB 81 67 93 1E E3 hDyN@G..g... -> State: STATE_BOOTSTRAPPING 15 bytes received from [5.39.83.206]:5783 48 02 79 4F 3C D3 08 B1 B6 FE 85 46 B2 62 73 H.yO<......F.bs Sending 12 bytes to [5.39.83.206]:5783 68 44 79 4F 3C D3 08 B1 B6 FE 85 46 hDyO<......F -> State: STATE_BOOTSTRAPPING Sending 199 bytes to [5.39.83.206]:5683 44 02 C6 B8 B8 C6 57 A5 B2 72 64 11 28 39 6C 77 D.....W..rd.(9lw 6D 32 6D 3D 31 2E 30 0B 65 70 3D 70 75 72 65 73 m2m=1.0.ep=pures 6F 66 74 03 62 3D 55 05 6C 74 3D 32 30 FF 3C 2F oft.b=U.lt=20.</ 3E 3B 72 74 3D 22 6F 6D 61 2E 6C 77 6D 32 6D 22 >;rt="oma.lwm2m" 3B 63 74 3D 31 31 35 34 33 2C 3C 2F 31 2F 30 3E ;ct=11543,</1/0> 2C 3C 2F 32 3E 2C 3C 2F 33 2F 30 3E 2C 3C 2F 34 ,,</3/0>,</4 2F 30 3E 2C 3C 2F 35 2F 30 3E 2C 3C 2F 36 2F 30 /0>,</5/0>,</6/0 3E 2C 3C 2F 37 2F 30 3E 2C 3C 2F 33 33 30 33 2F >,</7/0>,</3303/ 30 3E 2C 3C 2F 33 33 30 34 2F 30 3E 2C 3C 2F 33 0>,</3304/0>,</3 33 31 31 2F 30 3E 2C 3C 2F 33 33 31 33 2F 30 3E 311/0>,</3313/0> 2C 3C 2F 33 33 31 34 2F 30 3E 2C 3C 2F 33 33 31 ,</3314/0>,</331 35 2F 30 3E 2C 3C 2F 33 33 33 34 2F 30 3E 2C 3C 5/0>,</3334/0>,< 2F 33 31 30 32 34 3E /31024> -> State: STATE_REGISTERING Sending 199 bytes to [5.39.83.206]:5683 44 02 C6 B8 B8 C6 57 A5 B2 72 64 11 28 39 6C 77 D.....W..rd.(9lw 6D 32 6D 3D 31 2E 30 0B 65 70 3D 70 75 72 65 73 m2m=1.0.ep=pures 6F 66 74 03 62 3D 55 05 6C 74 3D 32 30 FF 3C 2F oft.b=U.lt=20.</ 3E 3B 72 74 3D 22 6F 6D 61 2E 6C 77 6D 32 6D 22 >;rt="oma.lwm2m" 3B 63 74 3D 31 31 35 34 33 2C 3C 2F 31 2F 30 3E ;ct=11543,</1/0> 2C 3C 2F 32 3E 2C 3C 2F 33 2F 30 3E 2C 3C 2F 34 ,,</3/0>,</4 2F 30 3E 2C 3C 2F 35 2F 30 3E 2C 3C 2F 36 2F 30 /0>,</5/0>,</6/0 3E 2C 3C 2F 37 2F 30 3E 2C 3C 2F 33 33 30 33 2F >,</7/0>,</3303/ 30 3E 2C 3C 2F 33 33 30 34 2F 30 3E 2C 3C 2F 33 0>,</3304/0>,</3 33 31 31 2F 30 3E 2C 3C 2F 33 33 31 33 2F 30 3E 311/0>,</3313/0> 2C 3C 2F 33 33 31 34 2F 30 3E 2C 3C 2F 33 33 31 ,</3314/0>,</331 35 2F 30 3E 2C 3C 2F 33 33 33 34 2F 30 3E 2C 3C 5/0>,</3334/0>,< 2F 33 31 30 32 34 3E /31024> -> State: STATE_REGISTERING 9 bytes received from [5.39.83.206]:5683 64 83 C6 B8 B8 C6 57 A5 C0 d.....W.. -> State: STATE_BOOTSTRAPPING Sending 23 bytes to [5.39.83.206]:5783 44 02 C6 B9 B9 C6 5C A5 B2 62 73 4B 65 70 3D 70 D.......bsKep=p 75 72 65 73 6F 66 74 uresoft -> State: STATE_BOOTSTRAPPING 8 bytes received from [5.39.83.206]:5783 64 44 C6 B9 B9 C6 5C A5 dD..... -> State: STATE_BOOTSTRAPPING 12 bytes received from [5.39.83.206]:5783 48 04 79 50 C2 89 19 89 DA EF 6F 2E H.yP......o. Sending 12 bytes to [5.39.83.206]:5783 68 42 79 50 C2 89 19 89 DA EF 6F 2E hByP......o. -> State: STATE_BOOTSTRAPPING 83 bytes received from [5.39.83.206]:5783 48 03 79 51 5C CC 79 4A 8B 5D D9 DE B1 30 01 30 H.yQ.yJ.]...0.0 12 2D 16 FF C8 00 1E 63 6F 61 70 3A 2F 2F 6C 65 .-.....coap://le 73 68 61 6E 2E 65 63 6C 69 70 73 65 2E 6F 72 67 shan.eclipse.org 3A 35 37 38 33 C1 01 01 C1 02 03 C0 03 C0 04 C0 :5783........... 05 C1 06 03 C0 07 C0 08 C0 09 C1 0A 6F C1 0B 01 ............o... C1 0C 00 ... Sending 12 bytes to [5.39.83.206]:5783 68 44 79 51 5C CC 79 4A 8B 5D D9 DE hDyQ.yJ.].. -> State: STATE_BOOTSTRAPPING 83 bytes received from [5.39.83.206]:5783 48 03 79 52 D0 AC 77 B9 B9 17 BA F2 B1 30 01 31 H.yR..w......0.1 12 2D 16 FF C8 00 1E 63 6F 61 70 3A 2F 2F 6C 65 .-.....coap://le 73 68 61 6E 2E 65 63 6C 69 70 73 65 2E 6F 72 67 shan.eclipse.org 3A 35 36 38 33 C1 01 00 C1 02 03 C0 03 C0 04 C0 :5683........... 05 C1 06 03 C0 07 C0 08 C0 09 C1 0A 7B C1 0B 01 ............{... C1 0C 00 ... Sending 12 bytes to [5.39.83.206]:5783 68 44 79 52 D0 AC 77 B9 B9 17 BA F2 hDyR..w..... -> State: STATE_BOOTSTRAPPING 35 bytes received from [5.39.83.206]:5783 48 03 79 53 62 DD 09 45 46 EC 95 3C B1 31 01 30 H.ySb..EF..<.1.0 12 2D 16 FF C1 00 7B C1 01 14 C1 02 01 C1 06 01 .-....{......... C1 07 55 ..U Sending 12 bytes to [5.39.83.206]:5783 68 44 79 53 62 DD 09 45 46 EC 95 3C hDySb..EF..< -> State: STATE_BOOTSTRAPPING 15 bytes received from [5.39.83.206]:5783 48 02 79 54 BC C1 03 C9 FE 6E 7F 88 B2 62 73 H.yT.....n...bs Sending 12 bytes to [5.39.83.206]:5783 68 44 79 54 BC C1 03 C9 FE 6E 7F 88 hDyT.....n.. -> State: STATE_BOOTSTRAPPING Sending 199 bytes to [5.39.83.206]:5683 44 02 C6 BA BA C6 5C A5 B2 72 64 11 28 39 6C 77 D.......rd.(9lw 6D 32 6D 3D 31 2E 30 0B 65 70 3D 70 75 72 65 73 m2m=1.0.ep=pures 6F 66 74 03 62 3D 55 05 6C 74 3D 32 30 FF 3C 2F oft.b=U.lt=20.</ 3E 3B 72 74 3D 22 6F 6D 61 2E 6C 77 6D 32 6D 22 >;rt="oma.lwm2m" 3B 63 74 3D 31 31 35 34 33 2C 3C 2F 31 2F 30 3E ;ct=11543,</1/0> 2C 3C 2F 32 3E 2C 3C 2F 33 2F 30 3E 2C 3C 2F 34 ,,</3/0>,</4 2F 30 3E 2C 3C 2F 35 2F 30 3E 2C 3C 2F 36 2F 30 /0>,</5/0>,</6/0 3E 2C 3C 2F 37 2F 30 3E 2C 3C 2F 33 33 30 33 2F >,</7/0>,</3303/ 30 3E 2C 3C 2F 33 33 30 34 2F 30 3E 2C 3C 2F 33 0>,</3304/0>,</3 33 31 31 2F 30 3E 2C 3C 2F 33 33 31 33 2F 30 3E 311/0>,</3313/0> 2C 3C 2F 33 33 31 34 2F 30 3E 2C 3C 2F 33 33 31 ,</3314/0>,</331 35 2F 30 3E 2C 3C 2F 33 33 33 34 2F 30 3E 2C 3C 5/0>,</3334/0>,< 2F 33 31 30 32 34 3E /31024> -> State: STATE_REGISTERING 9 bytes received from [5.39.83.206]:5683 64 83 C6 B8 B8 C6 57 A5 C0 d.....W.. -> State: STATE_REGISTERING

Scenario 2

wakaama/dtls_build$ ./lwm2mclient -h leshan.eclipse.org -4 -n amrit -i amrit -s 1234 -b -p 5684 rm: cannot remove '/etc/ready': No such file or directory

lwm2m client version : [2][0][0]

lwm2m client sleeping for 30 seconds Trying to bind LWM2M Client to port 56830 LWM2M Client "amrit" started on port 56830

-> State: STATE_BOOTSTRAPPING Sending 67 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 36 01 00 00 ............6... 2A 00 00 00 00 00 00 00 2A FE FD 00 00 00 0A 7F .............. 28 3D D2 52 96 C9 C3 61 8B E7 FF 2C 23 CF DC 6C (=.R...a...,#..l CF F1 47 7C 19 97 1C 5B 33 44 FA 00 00 00 02 C0 ..G|...[3D...... A8 01 00 ... -> State: STATE_BOOTSTRAPPING 60 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 2F 03 00 00 ............/... 23 00 00 00 00 00 00 00 23 FE FD 20 2F A6 9B 94 #.......#.. /... F8 B8 7C B6 8E EA 4D F6 6E 40 69 AB 3C 7D 7F A7 ..|...M.n@i.<}.. 96 8C 69 06 F8 9A 93 6A E1 AB 01 3A ..i....j...: Sending 99 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 56 01 00 00 ............V... 4A 00 01 00 00 00 00 00 4A FE FD 00 00 00 0A 7F J.......J....... 28 3D D2 52 96 C9 C3 61 8B E7 FF 2C 23 CF DC 6C (=.R...a...,#..l CF F1 47 7C 19 97 1C 5B 33 44 FA 00 20 2F A6 9B ..G|...[3D.. /.. 94 F8 B8 7C B6 8E EA 4D F6 6E 40 69 AB 3C 7D 7F ...|...M.n@i.<}. A7 96 8C 69 06 F8 9A 93 6A E1 AB 01 3A 00 02 C0 ...i....j...:... A8 01 00 ... -> State: STATEBOOTSTRAPPING 120 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 52 02 00 00 ............R... 46 00 01 00 00 00 00 00 46 FE FD 5A E1 AD 80 BD F.......F..Z.... 1B B9 66 E1 4A FB A4 F7 65 9A EE E4 DA 5F 8C 16 ..f.J...e...... 19 71 71 3B 52 47 C7 A4 3B 55 51 20 5A E1 AD 80 .qq;RG..;UQ Z... A4 A2 99 9B D7 A4 69 6B 5A 7B 1E 7E 6A 5F 81 52 ......ikZ{.~j_.R B7 5C 27 93 AF 17 90 CF 9A C5 6A A5 C0 A8 00 16 .\'.......j..... FE FD 00 00 00 00 00 00 00 02 00 0C 0E 00 00 00 ................ 00 02 00 00 00 00 00 00 ........ Sending 32 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 02 00 13 10 00 00 ................ 07 00 02 00 00 00 00 00 07 00 05 61 6D 72 69 74 ...........amrit Sending 14 bytes to [5.39.83.206]:5684 14 FE FD 00 00 00 00 00 00 00 03 00 01 01 .............. Sending 53 bytes to [5.39.83.206]:5684 16 FE FD 00 01 00 00 00 00 00 00 00 28 00 01 00 ............(... 00 00 00 00 00 55 3E 07 A7 DC FA BD 25 C0 39 E4 .....U>.....%.9. 98 FC 27 F9 7A 26 7C 8C 8C D4 99 8D 19 B1 72 75 ..'.z&|.......ru AD 9B E3 10 52 ....R -> State: STATE_BOOTSTRAPPING 15 bytes received from [5.39.83.206]:5684 15 FE FD 00 00 00 00 00 00 00 03 00 02 02 28 ..............( Apr 26 16:01:52 ALRT 40 invalidate peer Apr 26 16:01:52 WARN received alert, peer has been invalidated error dtls handling message -1 error handling message -1 -> State: STATE_BOOTSTRAPPING Sending 67 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 36 01 00 00 ............6... 2A 00 00 00 00 00 00 00 2A FE FD 00 00 00 0C 6C .............l FC C2 EB 24 FF BE 76 96 87 39 F7 12 20 F6 3E 44 ...$..v..9.. .>D C5 1B B0 94 0C F7 11 25 8F 2D 80 00 00 00 02 C0 .......%.-...... A8 01 00 ... -> State: STATE_BOOTSTRAPPING 60 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 2F 03 00 00 ............/... 23 00 00 00 00 00 00 00 23 FE FD 20 DD 42 BD 66 #.......#.. .B.f A8 17 10 C8 AA D6 E8 BA C8 AD 32 B8 82 71 50 E0 ..........2..qP. 4F 7D F4 0E 87 3C 6F 3D EF 96 C8 D1 O}...<o=.... Sending 99 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 56 01 00 00 ............V... 4A 00 01 00 00 00 00 00 4A FE FD 00 00 00 0C 6C J.......J......l FC C2 EB 24 FF BE 76 96 87 39 F7 12 20 F6 3E 44 ...$..v..9.. .>D C5 1B B0 94 0C F7 11 25 8F 2D 80 00 20 DD 42 BD .......%.-.. .B. 66 A8 17 10 C8 AA D6 E8 BA C8 AD 32 B8 82 71 50 f..........2..qP E0 4F 7D F4 0E 87 3C 6F 3D EF 96 C8 D1 00 02 C0 .O}...<o=....... A8 01 00 ... -> State: STATE_BOOTSTRAPPING 120 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 52 02 00 00 ............R... 46 00 01 00 00 00 00 00 46 FE FD 5A E1 AD 83 61 F.......F..Z...a 64 8C 01 E2 B0 C1 72 A0 E1 BF E9 8A 22 1B AE F2 d.....r....."... 95 A2 36 7F 5D 17 C1 F2 26 C0 EB 20 5A E1 AD 83 ..6.]...&.. Z... 22 46 A3 D0 72 A8 32 21 FC B5 9D 6D DB 0A 05 90 "F..r.2!...m.... 54 A9 F4 EC C6 AC E7 EB 03 43 1C 7B C0 A8 00 16 T........C.{.... FE FD 00 00 00 00 00 00 00 02 00 0C 0E 00 00 00 ................ 00 02 00 00 00 00 00 00 ........ Sending 32 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 02 00 13 10 00 00 ................ 07 00 02 00 00 00 00 00 07 00 05 61 6D 72 69 74 ...........amrit Sending 14 bytes to [5.39.83.206]:5684 14 FE FD 00 00 00 00 00 00 00 03 00 01 01 .............. Sending 53 bytes to [5.39.83.206]:5684 16 FE FD 00 01 00 00 00 00 00 00 00 28 00 01 00 ............(... 00 00 00 00 00 F1 8D C8 6B 43 C7 A6 DC D1 9E 72 ........kC.....r 0A FF BB D8 67 C3 7A 40 C7 44 21 DD 70 B7 17 65 ....g.z@.D!.p..e D5 BC 2D 01 E9 ..-.. -> State: STATE_BOOTSTRAPPING 15 bytes received from [5.39.83.206]:5684 15 FE FD 00 00 00 00 00 00 00 03 00 02 02 28 ..............( Apr 26 16:01:55 ALRT 40 invalidate peer Apr 26 16:01:55 WARN received alert, peer has been invalidated error dtls handling message -1 error handling message -1 -> State: STATEBOOTSTRAPPING Sending 67 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 36 01 00 00 ............6... 2A 00 00 00 00 00 00 00 2A FE FD 00 00 00 10 C2 .............. 71 7A 2E 6D 3C 1A 91 3C D8 07 D2 5F 40 C9 71 61 qz.m<..<...@.qa BF B0 A5 84 CB 55 19 D7 4D 2A FC 00 00 00 02 C0 .....U..M...... A8 01 00 ... -> State: STATE_BOOTSTRAPPING 60 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 2F 03 00 00 ............/... 23 00 00 00 00 00 00 00 23 FE FD 20 4D B8 78 8C #.......#.. M.x. 87 DA 7F 2B 7E 36 A2 83 0C 4E 6D 35 2A B6 8C 23 ...+~6...Nm5..# 95 46 FE 40 6A 75 79 E7 C3 65 41 A8 .F.@juy..eA. Sending 99 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 56 01 00 00 ............V... 4A 00 01 00 00 00 00 00 4A FE FD 00 00 00 10 C2 J.......J....... 71 7A 2E 6D 3C 1A 91 3C D8 07 D2 5F 40 C9 71 61 qz.m<..<..._@.qa BF B0 A5 84 CB 55 19 D7 4D 2A FC 00 20 4D B8 78 .....U..M.. M.x 8C 87 DA 7F 2B 7E 36 A2 83 0C 4E 6D 35 2A B6 8C ....+~6...Nm5.. 23 95 46 FE 40 6A 75 79 E7 C3 65 41 A8 00 02 C0 #.F.@juy..eA.... A8 01 00 ... -> State: STATE_BOOTSTRAPPING 120 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 52 02 00 00 ............R... 46 00 01 00 00 00 00 00 46 FE FD 5A E1 AD 86 D4 F.......F..Z.... 08 CC B4 45 BE C5 9F C8 4B 43 DF 5B 28 4B 34 17 ...E....KC.[(K4. 8F 79 0C 57 8C D1 8D 3F 0A 15 F6 20 5A E1 AD 86 .y.W...?... Z... 1B C9 E3 E2 2B 26 EE C1 82 6B 93 9F BC D0 DD 23 ....+&...k.....# 5E 73 9A FC 0B 13 44 90 90 B7 2C DB C0 A8 00 16 ^s....D...,..... FE FD 00 00 00 00 00 00 00 02 00 0C 0E 00 00 00 ................ 00 02 00 00 00 00 00 00 ........ Sending 32 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 02 00 13 10 00 00 ................ 07 00 02 00 00 00 00 00 07 00 05 61 6D 72 69 74 ...........amrit Sending 14 bytes to [5.39.83.206]:5684 14 FE FD 00 00 00 00 00 00 00 03 00 01 01 .............. Sending 53 bytes to [5.39.83.206]:5684 16 FE FD 00 01 00 00 00 00 00 00 00 28 00 01 00 ............(... 00 00 00 00 00 B8 94 22 9A 31 7A 23 61 1E BC 35 .......".1z#a..5 52 68 B1 02 E9 69 5C B2 F1 DE CC 63 31 33 D2 3D Rh...i....c13.= BF 20 EC 7C D7 . .|. -> State: STATE_BOOTSTRAPPING 15 bytes received from [5.39.83.206]:5684 15 FE FD 00 00 00 00 00 00 00 03 00 02 02 28 ..............( Apr 26 16:01:58 ALRT 40 invalidate peer Apr 26 16:01:58 WARN received alert, peer has been invalidated error dtls handling message -1 error handling message -1 -> State: STATE_BOOTSTRAPPING Sending 67 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 36 01 00 00 ............6... 2A 00 00 00 00 00 00 00 2A FE FD 00 00 00 18 DC .............. 57 7C 9E C8 F6 CD 36 32 E7 C7 6E BF CF 40 1E 0F W|....62..n..@.. 09 8F 70 C8 3F 15 4D 0A 6B 66 E1 00 00 00 02 C0 ..p.?.M.kf...... A8 01 00 ... -> State: STATE_BOOTSTRAPPING 60 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 00 00 2F 03 00 00 ............/... 23 00 00 00 00 00 00 00 23 FE FD 20 97 D1 9A 2B #.......#.. ...+ 4F 56 B4 78 21 03 3E 1A 76 E7 58 B5 97 B4 54 A9 OV.x!.>.v.X...T. BB F9 40 B8 C3 AF 6D FD EE FB 2F FC ..@...m.../. Sending 99 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 56 01 00 00 ............V... 4A 00 01 00 00 00 00 00 4A FE FD 00 00 00 18 DC J.......J....... 57 7C 9E C8 F6 CD 36 32 E7 C7 6E BF CF 40 1E 0F W|....62..n..@.. 09 8F 70 C8 3F 15 4D 0A 6B 66 E1 00 20 97 D1 9A ..p.?.M.kf.. ... 2B 4F 56 B4 78 21 03 3E 1A 76 E7 58 B5 97 B4 54 +OV.x!.>.v.X...T A9 BB F9 40 B8 C3 AF 6D FD EE FB 2F FC 00 02 C0 ...@...m.../.... A8 01 00 ... -> State: STATE_BOOTSTRAPPING 120 bytes received from [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 01 00 52 02 00 00 ............R... 46 00 01 00 00 00 00 00 46 FE FD 5A E1 AD 8F 2A F.......F..Z... 2F 90 10 79 FE 5B DA B1 0B 93 87 E0 80 C4 9A B3 /..y.[.......... A5 48 E0 38 EA 5A F5 A3 4C E1 C8 20 5A E1 AD 8F .H.8.Z..L.. Z... 45 EE 4B F0 60 ED 31 E2 59 9F C9 FB F5 A3 67 96 E.K.`.1.Y.....g. 71 59 C7 E3 95 CA 69 CF DA D9 D9 1F C0 A8 00 16 qY....i......... FE FD 00 00 00 00 00 00 00 02 00 0C 0E 00 00 00 ................ 00 02 00 00 00 00 00 00 ........ Sending 32 bytes to [5.39.83.206]:5684 16 FE FD 00 00 00 00 00 00 00 02 00 13 10 00 00 ................ 07 00 02 00 00 00 00 00 07 00 05 61 6D 72 69 74 ...........amrit Sending 14 bytes to [5.39.83.206]:5684 14 FE FD 00 00 00 00 00 00 00 03 00 01 01 .............. Sending 53 bytes to [5.39.83.206]:5684 16 FE FD 00 01 00 00 00 00 00 00 00 28 00 01 00 ............(... 00 00 00 00 00 8F CC B0 61 4D 51 05 8E AF BA F6 ........aMQ..... 0C 3C D1 63 28 22 2F 2A 94 D4 FC D5 E5 9F 19 CE .<.c("/........ AD CF B5 01 76 ....v -> State: STATE_BOOTSTRAPPING 15 bytes received from [5.39.83.206]:5684 15 FE FD 00 00 00 00 00 00 00 03 00 02 02 28 ..............( Apr 26 16:02:07 ALRT 40 invalidate peer Apr 26 16:02:07 WARN received alert, peer has been invalidated error dtls handling message -1 error handling message -1 -> State: STATE_BOOTSTRAPPING

Having said that, I want to know the intent and purpose of bootstrapping feature in LWM2M.

I am able to succesfully create an identitiy on leshan.eclipse.org and also connect.

My understanding was that If I use client inititiated bootstrapping then ideally I should not have to use the identity and psk, but the http://leshan.eclipse.org/bs/ also has provision for adding psk and identity.

Can anyone help clarify?

cdfpaz commented 6 years ago

Hey @apsk25, IMHO its a question for leshan developers :D here in my setup devices can only reach the DM server using BS server. BS server can be configured as for example to use a default PSK or a default certificate and new customers need to bootstrap in order to pairing and retrieve real credentials generated on BS server.

apsk25 commented 6 years ago

@bzero Thanks.

Can you give me a small demo on what you do? Actually what exactly is the meaning of bootstrapping? What added security it adds when we can connect to the server using Ids and psk without bootstrapping? Thanks a lot.

cdfpaz commented 6 years ago

Sure man, found this image with step by step:

source: https://medium.com/@vrmvrm/device-key-distribution-with-lightweight-m2m-36cdc12e5711