💬 Ikea Molgan Hack
-
you can try, that could help, sure.
-
@GertSanders Awesome! Thanks for the tip man!
@Yveaux - Get yourself on the adafruit show and tell series dude! I for one, watch this series with intent to learn and discover new devices and how to recreate them for myself. I'm pretty sure that most of the audience that join into those are there for the same reason as me. Congrats on making it to their site full stop though :)
-
@Yveaux - Get yourself on the adafruit show and tell series dude! I for one, watch this series with intent to learn and discover new devices and how to recreate them for myself. I'm pretty sure that most of the audience that join into those are there for the same reason as me. Congrats on making it to their site full stop though :)
@Samuel235 said in 💬 Ikea Molgan Hack:
Get yourself on the adafruit show and tell series dude!
Which episode? I normally don't watch them :satisfied:
-
@Samuel235 said in 💬 Ikea Molgan Hack:
Get yourself on the adafruit show and tell series dude!
Which episode? I normally don't watch them :satisfied:
@Yveaux - This is the series that i'm talking about https://www.youtube.com/watch?v=lrcNW2MaelM&list=PL7E1FAA9E63A32FDC
They just have random people on video link talking about their products. Might even get some more interest into the MySensors movement let alone your own hardware. Its your choice on what product to get on there i suppose :)
They normally give you a slot on their air time to just explain your product - not sure how you get on though, application maybe? Let us know if you decide to go for it!
Check out their other series, something else may be more interest to your hardware or personal interest.
-
@Yveaux - This is the series that i'm talking about https://www.youtube.com/watch?v=lrcNW2MaelM&list=PL7E1FAA9E63A32FDC
They just have random people on video link talking about their products. Might even get some more interest into the MySensors movement let alone your own hardware. Its your choice on what product to get on there i suppose :)
They normally give you a slot on their air time to just explain your product - not sure how you get on though, application maybe? Let us know if you decide to go for it!
Check out their other series, something else may be more interest to your hardware or personal interest.
@Samuel235 Ah, I misunderstood; thought it was featured on the series already :see_no_evil:
Anyway, today my outside sensor felt like proving I didn't fix its issues yet:

The yellow spikes is one continuous burst of roughly 4 hours in which it continuously triggers. After that it resumes normal operation...
Again, not a Molgan but an HC-SR501. However electronics are comparable. -
Thanks @Yveaux for the Molgan Hack board. I was my first experience in soldering an smd atmega ;-) Conclusion... need some more exercise. Finally got the thing working and now ready for the next steps. Some considerations:
- The PIR is very sensitive to power fluctuations. Voltages below 3.1V will certainly cause instability.
- I want to keep the light feature of the Molgan but make it accessible from MySensors. Same with the light sensor.
- Power the Molgan with low selfdischarge rechargeable batteries (The led's will drain the batteries faster)
- Maybe add a few other sensors (temp/ hum/ light effects)
With the help of the excellent analysis work of @LastSamurai I'm thinking of the following "Ikea Molgan Hack Hacks"
- add a 3.3V ldo (XC6206, 1uA ldd, 0.08V dropout) to power the Hack board and sensors.
- a voltage divider for measuring real battery voltage.
- drive the Led's from a pwm output on the base of transistor connected to R17
- Measure the photodiode voltage one way or another.
- breakout the SCL and SDA pins for more sensors.
Any suggestions? (for sure a breadboarding exercise)
-
@Yveaux did you find a fix for your spikes in the pir readings?
I now have the molgan with the 2 caps added in parallel to the existing one running for some weeks and it works reliably. It still triggers several times though when I only move once.
Some days ago I also added a small electrolytic cap of 10uF (biggest value I had for the small form factor) directly across the gnd/power pin of the pir on the second molgan and ... it seems to do exactly the same as the first one (perhaps even slightly worse with nearer to 4-5 triggers for every real trigger, where the other one produces ~3).
Has anyone tried something different? I mean this solution works reasonably well but its not really perfect... and just a hack imo.@AWI welcome to the "molgan club" ;). How did you solder the smd atmega? I found out that using flux helps a lot but it still takes way too much time and effort to solder by hand :astonished:
Your ideas sound nice! Though it might be a little difficult to design the pcb to fit inside the case... -
@Yveaux did you find a fix for your spikes in the pir readings?
I now have the molgan with the 2 caps added in parallel to the existing one running for some weeks and it works reliably. It still triggers several times though when I only move once.
Some days ago I also added a small electrolytic cap of 10uF (biggest value I had for the small form factor) directly across the gnd/power pin of the pir on the second molgan and ... it seems to do exactly the same as the first one (perhaps even slightly worse with nearer to 4-5 triggers for every real trigger, where the other one produces ~3).
Has anyone tried something different? I mean this solution works reasonably well but its not really perfect... and just a hack imo.@AWI welcome to the "molgan club" ;). How did you solder the smd atmega? I found out that using flux helps a lot but it still takes way too much time and effort to solder by hand :astonished:
Your ideas sound nice! Though it might be a little difficult to design the pcb to fit inside the case... -
@Yveaux did you find a fix for your spikes in the pir readings?
I now have the molgan with the 2 caps added in parallel to the existing one running for some weeks and it works reliably. It still triggers several times though when I only move once.
Some days ago I also added a small electrolytic cap of 10uF (biggest value I had for the small form factor) directly across the gnd/power pin of the pir on the second molgan and ... it seems to do exactly the same as the first one (perhaps even slightly worse with nearer to 4-5 triggers for every real trigger, where the other one produces ~3).
Has anyone tried something different? I mean this solution works reasonably well but its not really perfect... and just a hack imo.@AWI welcome to the "molgan club" ;). How did you solder the smd atmega? I found out that using flux helps a lot but it still takes way too much time and effort to solder by hand :astonished:
Your ideas sound nice! Though it might be a little difficult to design the pcb to fit inside the case...@LastSamurai I recently fixed a couple of bugs in the external interrupt handling for sleeping sensors.
In short, the sensor could wake within a few milliseconds after going to sleep, because of an interrupt that occurred in the past. For details see this thread.
I'm not completely sure, but this could be the cause of your Molgan triggering all the time.
Could you give the development branch a try and see if things improve? -
@LastSamurai I recently fixed a couple of bugs in the external interrupt handling for sleeping sensors.
In short, the sensor could wake within a few milliseconds after going to sleep, because of an interrupt that occurred in the past. For details see this thread.
I'm not completely sure, but this could be the cause of your Molgan triggering all the time.
Could you give the development branch a try and see if things improve?@Yveaux said in 💬 Ikea Molgan Hack:
@LastSamurai I recently fixed a couple of bugs in the external interrupt handling for sleeping sensors.
In short, the sensor could wake within a few milliseconds after going to sleep, because of an interrupt that occurred in the past. For details see this thread.
I'm not completely sure, but this could be the cause of your Molgan triggering all the time.
Could you give the development branch a try and see if things improve?Wow, great! Thanks for telling me. I'll try it out in the next days.
-
It seems to have helped! I have now upgraded the code one both molgans and both seem to work without a problem now! Thank you very much @Yveaux
Only thing I am still strugling with is getting signing to work with the molgans. Works on neither one yet. -
It seems to have helped! I have now upgraded the code one both molgans and both seem to work without a problem now! Thank you very much @Yveaux
Only thing I am still strugling with is getting signing to work with the molgans. Works on neither one yet. -
I did not use a atsha204. I used the (new) personalizer to set the HMAC key (like I did with many other nodes) and activated signing:
Log from gateway:
0;255;3;0;9;422688514 TSF:MSG:READ,16-16-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;422688520 TSF:MSG:BC 0;255;3;0;9;422688523 TSF:MSG:FPAR REQ,ID=16 0;255;3;0;9;422688527 TSF:PNG:SEND,TO=0 0;255;3;0;9;422688531 TSF:CKU:OK 0;255;3;0;9;422688534 TSF:MSG:GWL OK 0;255;3;0;9;422689331 Skipping security for command 3 type 8 0;255;3;0;9;422689366 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=8,pt=1,l=1,sg=1,ft=0,st=OK:0 0;255;3;0;9;422690740 TSF:MSG:READ,16-16-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 0;255;3;0;9;422690746 Skipping security for command 3 type 24 0;255;3;0;9;422690752 TSF:MSG:PINGED,ID=16,HP=1 0;255;3;0;9;422690756 Skipping security for command 3 type 25 0;255;3;0;9;422690774 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=25,pt=1,l=1,sg=1,ft=0,st=OK:1 0;255;3;0;9;422690965 TSF:MSG:READ,16-16-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101 0;255;3;0;9;422690972 Skipping security for command 3 type 15 0;255;3;0;9;422690977 Mark node 16 as one that require signed messages 0;255;3;0;9;422690984 Mark node 16 as one that do not require whitelisting 0;255;3;0;9;422690991 Informing node 16 that we require signatures 0;255;3;0;9;422690997 Informing node 16 that we do not require whitelisting 0;255;3;0;9;422691004 Skipping security for command 3 type 15 0;255;3;0;9;422691013 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101 0;255;3;0;9;422691115 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=0: 0;255;3;0;9;422691121 Skipping security for command 3 type 16 0;255;3;0;9;422691127 Signing backend: ATSHA204Soft 0;255;3;0;9;422691145 Skipping security for command 3 type 17 0;255;3;0;9;422691168 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:882ED3D3B94E6236CCB4FF241128DB984C93F39707EEAC6B7E 0;255;3;0;9;422691180 Transmitted nonce 0;255;3;0;9;422691464 TSF:MSG:READ,16-16-0,s=255,c=0,t=17,pt=0,l=10,sg=1:2.2.0-beta 0;255;3;0;9;422691471 Current nonce: 882ED3D3B94E6236CCB4FF241128DB984C93F39707EEAC6B7EAAAAAAAAAAAAAA 0;255;3;0;9;422691556 HMAC: AC275AA68FF2B3B3689F68DD285F1BFEF8D3F329CCF6E714EEF9E100967B1677 0;255;3;0;9;422691564 Signature bad 0;255;3;0;9;422691567 Signature verification failed! 0;255;3;0;9;422691572 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422691577 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422691584 Skipping security for command 3 type 16 0;255;3;0;9;422691589 Signing backend: ATSHA204Soft 0;255;3;0;9;422691608 Skipping security for command 3 type 17 0;255;3;0;9;422691616 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:404FD7260F4410E17E0AD6C07A9A1D04306079F24F9F96CDA1 0;255;3;0;9;422691629 Transmitted nonce 0;255;3;0;9;422691902 TSF:MSG:READ,16-16-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0 0;255;3;0;9;422691909 Current nonce: 404FD7260F4410E17E0AD6C07A9A1D04306079F24F9F96CDA1AAAAAAAAAAAAAA 0;255;3;0;9;422691994 HMAC: 0A7E2867AD7650B15268AC1EF73D37394AC3499733CDD43838D762BA69295B5D 0;255;3;0;9;422692002 Signature bad 0;255;3;0;9;422692005 Signature verification failed! 0;255;3;0;9;422692011 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422694036 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422694042 Skipping security for command 3 type 16 0;255;3;0;9;422694048 Signing backend: ATSHA204Soft 0;255;3;0;9;422694067 Skipping security for command 3 type 17 0;255;3;0;9;422694075 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:6AEE2250F8701E4E2B0ABF997B5A8EC57C57793EBC9B09F689 0;255;3;0;9;422694087 Transmitted nonce 0;255;3;0;9;422694386 TSF:MSG:READ,16-16-0,s=255,c=3,t=11,pt=0,l=11,sg=1:Molgan Flur 0;255;3;0;9;422694393 Current nonce: 6AEE2250F8701E4E2B0ABF997B5A8EC57C57793EBC9B09F689AAAAAAAAAAAAAA 0;255;3;0;9;422694478 HMAC: C9B71FFDB9E225BFB122680DADF0B4C4CF23765378A927279C05A751E4C62D45 0;255;3;0;9;422694487 Signature bad 0;255;3;0;9;422694490 Signature verification failed! 0;255;3;0;9;422694495 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422694499 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422694506 Skipping security for command 3 type 16 0;255;3;0;9;422694511 Signing backend: ATSHA204Soft 0;255;3;0;9;422694530 Skipping security for command 3 type 17 0;255;3;0;9;422694538 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:F652D897B520B026844F8B8B09417A5C0144B6A1F2ABF01623 0;255;3;0;9;422694550 Transmitted nonce 0;255;3;0;9;422694829 TSF:MSG:READ,16-16-0,s=255,c=3,t=12,pt=0,l=8,sg=1:08042017 0;255;3;0;9;422694836 Current nonce: F652D897B520B026844F8B8B09417A5C0144B6A1F2ABF01623AAAAAAAAAAAAAA 0;255;3;0;9;422694921 HMAC: CCBF0048F9783EBC55219D7F1CFDE6ED46452B4E8897A0393A80EC9F4F20E7F8 0;255;3;0;9;422694929 Signature bad 0;255;3;0;9;422694932 Signature verification failed! 0;255;3;0;9;422694937 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422694941 TSF:MSG:READ,16-16-0,s=1,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422694948 Skipping security for command 3 type 16 0;255;3;0;9;422694953 Signing backend: ATSHA204Soft 0;255;3;0;9;422694972 Skipping security for command 3 type 17 0;255;3;0;9;422694983 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:25D2B687E9850102C83439698CA1261AC775BD8E1D6D78D662 0;255;3;0;9;422694995 Transmitted nonce 0;255;3;0;9;422695262 TSF:MSG:READ,16-16-0,s=1,c=0,t=1,pt=0,l=0,sg=1: 0;255;3;0;9;422695268 Current nonce: 25D2B687E9850102C83439698CA1261AC775BD8E1D6D78D662AAAAAAAAAAAAAA 0;255;3;0;9;422695353 HMAC: 189EC417FAF4A2C51F2C03916FF1ABB14C8DD29D78B88681E250FC0F07F7CB4B 0;255;3;0;9;422695361 Signature bad 0;255;3;0;9;422695364 Signature verification failed! 0;255;3;0;9;422695369 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422695374 TSF:MSG:READ,16-16-0,s=2,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422695380 Skipping security for command 3 type 16 0;255;3;0;9;422695386 Signing backend: ATSHA204Soft 0;255;3;0;9;422695404 Skipping security for command 3 type 17 0;255;3;0;9;422695413 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:4E135F3710AC0AD6A13A985A81BA4A4EF209A3E57E42717E49 0;255;3;0;9;422695425 Transmitted nonce 0;255;3;0;9;422695687 TSF:MSG:READ,16-16-0,s=2,c=0,t=30,pt=0,l=0,sg=1: 0;255;3;0;9;422695693 Current nonce: 4E135F3710AC0AD6A13A985A81BA4A4EF209A3E57E42717E49AAAAAAAAAAAAAA 0;255;3;0;9;422695778 HMAC: B566AB83CDF3342FE31F3CDC068B7E40AB51E6796F602710D26994D19B39D2AF 0;255;3;0;9;422695786 Signature bad 0;255;3;0;9;422695789 Signature verification failed! 0;255;3;0;9;422695794 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422695798 TSF:MSG:READ,16-16-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2 0;255;3;0;9;422695805 Skipping security for command 3 type 26 0;255;3;0;9;422695811 Skipping security for command 3 type 16 0;255;3;0;9;422695819 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 0;255;3;0;9;422695827 Nonce requested from 16. Waiting... 0;255;3;0;9;422695953 TSF:MSG:READ,16-16-0,s=255,c=3,t=17,pt=6,l=25,sg=1:B7E56807628A0BB459E81226A682E7C3C3B40087E4B7BE05EA 0;255;3;0;9;422695963 Skipping security for command 3 type 17 0;255;3;0;9;422695969 Nonce received from 16. 0;255;3;0;9;422695973 Proceeding with signing... 0;255;3;0;9;422695977 Signing backend: ATSHA204Soft 0;255;3;0;9;422695983 Current nonce: B7E56807628A0BB459E81226A682E7C3C3B40087E4B7BE05EAAAAAAAAAAAAAAA 0;255;3;0;9;422696067 HMAC: 9EF18CC260F8C4CDEB29C1E277F989482B1C08AB37C6FE9AA39146D8BEBC50AA 0;255;3;0;9;422696075 Message signed 0;255;3;0;9;422696079 Message to send has been signed 0;255;3;0;9;422696110 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1Log from the node:
129 TSM:INIT:TSP OK 149 TSM:INIT:STATID=16 174 TSF:SID:OK,ID=16 196 TSM:FPAR 243 TSF:MSÿ1040 TSF:MSG:READ,0-0-16,s=255,c=3,t=8,pt=1,l=1,sg=1:0 1097ð”*ô=ø2318 TSM:FPAR:OK 2334 TSM:ID 2349 TSM:ID:OK 2363 TSM:UPL 2383 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2457 TSF:MSG:READ,0-0-16,s=255,c=3,t=25,pt=1,l=1,sg=1:1 2516 TSF:MSG:PONG RECV,HP=1 2545 TSM:UPL:OK 2564 TSM:READY:ID=16,PAR=0,DIS=1 2605 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101 2680 TSF:MSG:READ,0-0-16,s=255,c=3,t=15,pt=6,l=2,sg=0:0101 2746 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK: 2820 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=0:882ED3D3B94E6236CCB4FF241128DB984C93F39707EEAC6B7E 3088 TSF:MSG:SEND,16-16-0-0,s=255,c=0,t=17,pt=0,l=10,sg=1,ft=0,st=OK:2.2.0-beta 3174 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 3248 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:404FD7260F4410E17E0AD6C07A9A1D04306079F24F9F96CDA1 3514 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0 5593 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 5666 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:6AEE2250F8701E4E2B0ABF997B5A8EC57C57793EBC9B09F689 5935 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=11,pt=0,l=11,sg=1,ft=0,st=OK:Molgan Flur 6025 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 6098 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:F652D897B520B026844F8B8B09417A5C0144B6A1F2ABF01623 6365 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=12,pt=0,l=8,sg=1,ft=0,st=OK:08042017 6449 TSF:MSG:SEND,16-16-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 6520 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:25D2B687E9850102C83439698CA1261AC775BD8E1D6D78D662 6789 TSF:MSG:SEND,16-16-0-0,s=1,c=0,t=1,pt=0,l=0,sg=1,ft=0,st=OK: 6862 TSF:MSG:SEND,16-16-0-0,s=2,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 6934 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:4E135F3710AC0AD6A13A985A81BA4A4EF209A3E57E42717E49 7204 TSF:MSG:SEND,16-16-0-0,s=2,c=0,t=30,pt=0,l=0,sg=1,ft=0,st=OK: 7274 MCO:REG:REQ 7294 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2 7368 TSF:MSG:READ,0-0-16,s=255,c=3,t=16,pt=0,l=0,sg=1: 7460 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:B7E56807628A0BB459E81226A682E7C3C3B40087E4B7BE05EA 7610 TSF:MSG:READ,0-0-16,s=255,c=3,t=27,pt=1,l=1,sg=1:1 7821 !TSF:MSG:SIGN VERIFY FAIL 7854 MCO:BGN:STP 7872 MCO:BGN:INIT OK,TSP=1 7901 MCO:SLP:MS=86400000,SMS=0,I1=1,M1=1,I2=255,M2=255 7958 TSF:TDI:TSLThis is done while the node is powered by the usb-to-serial converter so power should be steady.
Any idea why this is not working? The HMAC that the gateway mentions in the log is wrong btw (is this what it gets from the node?)PS Other nodes are working well with singing (and the same HMAC obviously).
-
@gohan Thanks, but I just tested it with a real power supply and I get the same errors.
PS I just tested a node where signing is working and the gateway logs also contains these false HMAC keys.. Strange, where are they coming from? -
@gohan Thanks, but I just tested it with a real power supply and I get the same errors.
PS I just tested a node where signing is working and the gateway logs also contains these false HMAC keys.. Strange, where are they coming from?@LastSamurai Maybe @Anticimex can explain what's going on?
-
I did not use a atsha204. I used the (new) personalizer to set the HMAC key (like I did with many other nodes) and activated signing:
Log from gateway:
0;255;3;0;9;422688514 TSF:MSG:READ,16-16-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;422688520 TSF:MSG:BC 0;255;3;0;9;422688523 TSF:MSG:FPAR REQ,ID=16 0;255;3;0;9;422688527 TSF:PNG:SEND,TO=0 0;255;3;0;9;422688531 TSF:CKU:OK 0;255;3;0;9;422688534 TSF:MSG:GWL OK 0;255;3;0;9;422689331 Skipping security for command 3 type 8 0;255;3;0;9;422689366 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=8,pt=1,l=1,sg=1,ft=0,st=OK:0 0;255;3;0;9;422690740 TSF:MSG:READ,16-16-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 0;255;3;0;9;422690746 Skipping security for command 3 type 24 0;255;3;0;9;422690752 TSF:MSG:PINGED,ID=16,HP=1 0;255;3;0;9;422690756 Skipping security for command 3 type 25 0;255;3;0;9;422690774 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=25,pt=1,l=1,sg=1,ft=0,st=OK:1 0;255;3;0;9;422690965 TSF:MSG:READ,16-16-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101 0;255;3;0;9;422690972 Skipping security for command 3 type 15 0;255;3;0;9;422690977 Mark node 16 as one that require signed messages 0;255;3;0;9;422690984 Mark node 16 as one that do not require whitelisting 0;255;3;0;9;422690991 Informing node 16 that we require signatures 0;255;3;0;9;422690997 Informing node 16 that we do not require whitelisting 0;255;3;0;9;422691004 Skipping security for command 3 type 15 0;255;3;0;9;422691013 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101 0;255;3;0;9;422691115 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=0: 0;255;3;0;9;422691121 Skipping security for command 3 type 16 0;255;3;0;9;422691127 Signing backend: ATSHA204Soft 0;255;3;0;9;422691145 Skipping security for command 3 type 17 0;255;3;0;9;422691168 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:882ED3D3B94E6236CCB4FF241128DB984C93F39707EEAC6B7E 0;255;3;0;9;422691180 Transmitted nonce 0;255;3;0;9;422691464 TSF:MSG:READ,16-16-0,s=255,c=0,t=17,pt=0,l=10,sg=1:2.2.0-beta 0;255;3;0;9;422691471 Current nonce: 882ED3D3B94E6236CCB4FF241128DB984C93F39707EEAC6B7EAAAAAAAAAAAAAA 0;255;3;0;9;422691556 HMAC: AC275AA68FF2B3B3689F68DD285F1BFEF8D3F329CCF6E714EEF9E100967B1677 0;255;3;0;9;422691564 Signature bad 0;255;3;0;9;422691567 Signature verification failed! 0;255;3;0;9;422691572 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422691577 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422691584 Skipping security for command 3 type 16 0;255;3;0;9;422691589 Signing backend: ATSHA204Soft 0;255;3;0;9;422691608 Skipping security for command 3 type 17 0;255;3;0;9;422691616 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:404FD7260F4410E17E0AD6C07A9A1D04306079F24F9F96CDA1 0;255;3;0;9;422691629 Transmitted nonce 0;255;3;0;9;422691902 TSF:MSG:READ,16-16-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0 0;255;3;0;9;422691909 Current nonce: 404FD7260F4410E17E0AD6C07A9A1D04306079F24F9F96CDA1AAAAAAAAAAAAAA 0;255;3;0;9;422691994 HMAC: 0A7E2867AD7650B15268AC1EF73D37394AC3499733CDD43838D762BA69295B5D 0;255;3;0;9;422692002 Signature bad 0;255;3;0;9;422692005 Signature verification failed! 0;255;3;0;9;422692011 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422694036 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422694042 Skipping security for command 3 type 16 0;255;3;0;9;422694048 Signing backend: ATSHA204Soft 0;255;3;0;9;422694067 Skipping security for command 3 type 17 0;255;3;0;9;422694075 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:6AEE2250F8701E4E2B0ABF997B5A8EC57C57793EBC9B09F689 0;255;3;0;9;422694087 Transmitted nonce 0;255;3;0;9;422694386 TSF:MSG:READ,16-16-0,s=255,c=3,t=11,pt=0,l=11,sg=1:Molgan Flur 0;255;3;0;9;422694393 Current nonce: 6AEE2250F8701E4E2B0ABF997B5A8EC57C57793EBC9B09F689AAAAAAAAAAAAAA 0;255;3;0;9;422694478 HMAC: C9B71FFDB9E225BFB122680DADF0B4C4CF23765378A927279C05A751E4C62D45 0;255;3;0;9;422694487 Signature bad 0;255;3;0;9;422694490 Signature verification failed! 0;255;3;0;9;422694495 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422694499 TSF:MSG:READ,16-16-0,s=255,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422694506 Skipping security for command 3 type 16 0;255;3;0;9;422694511 Signing backend: ATSHA204Soft 0;255;3;0;9;422694530 Skipping security for command 3 type 17 0;255;3;0;9;422694538 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:F652D897B520B026844F8B8B09417A5C0144B6A1F2ABF01623 0;255;3;0;9;422694550 Transmitted nonce 0;255;3;0;9;422694829 TSF:MSG:READ,16-16-0,s=255,c=3,t=12,pt=0,l=8,sg=1:08042017 0;255;3;0;9;422694836 Current nonce: F652D897B520B026844F8B8B09417A5C0144B6A1F2ABF01623AAAAAAAAAAAAAA 0;255;3;0;9;422694921 HMAC: CCBF0048F9783EBC55219D7F1CFDE6ED46452B4E8897A0393A80EC9F4F20E7F8 0;255;3;0;9;422694929 Signature bad 0;255;3;0;9;422694932 Signature verification failed! 0;255;3;0;9;422694937 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422694941 TSF:MSG:READ,16-16-0,s=1,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422694948 Skipping security for command 3 type 16 0;255;3;0;9;422694953 Signing backend: ATSHA204Soft 0;255;3;0;9;422694972 Skipping security for command 3 type 17 0;255;3;0;9;422694983 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:25D2B687E9850102C83439698CA1261AC775BD8E1D6D78D662 0;255;3;0;9;422694995 Transmitted nonce 0;255;3;0;9;422695262 TSF:MSG:READ,16-16-0,s=1,c=0,t=1,pt=0,l=0,sg=1: 0;255;3;0;9;422695268 Current nonce: 25D2B687E9850102C83439698CA1261AC775BD8E1D6D78D662AAAAAAAAAAAAAA 0;255;3;0;9;422695353 HMAC: 189EC417FAF4A2C51F2C03916FF1ABB14C8DD29D78B88681E250FC0F07F7CB4B 0;255;3;0;9;422695361 Signature bad 0;255;3;0;9;422695364 Signature verification failed! 0;255;3;0;9;422695369 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422695374 TSF:MSG:READ,16-16-0,s=2,c=3,t=16,pt=0,l=0,sg=1: 0;255;3;0;9;422695380 Skipping security for command 3 type 16 0;255;3;0;9;422695386 Signing backend: ATSHA204Soft 0;255;3;0;9;422695404 Skipping security for command 3 type 17 0;255;3;0;9;422695413 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:4E135F3710AC0AD6A13A985A81BA4A4EF209A3E57E42717E49 0;255;3;0;9;422695425 Transmitted nonce 0;255;3;0;9;422695687 TSF:MSG:READ,16-16-0,s=2,c=0,t=30,pt=0,l=0,sg=1: 0;255;3;0;9;422695693 Current nonce: 4E135F3710AC0AD6A13A985A81BA4A4EF209A3E57E42717E49AAAAAAAAAAAAAA 0;255;3;0;9;422695778 HMAC: B566AB83CDF3342FE31F3CDC068B7E40AB51E6796F602710D26994D19B39D2AF 0;255;3;0;9;422695786 Signature bad 0;255;3;0;9;422695789 Signature verification failed! 0;255;3;0;9;422695794 !TSF:MSG:SIGN VERIFY FAIL 0;255;3;0;9;422695798 TSF:MSG:READ,16-16-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2 0;255;3;0;9;422695805 Skipping security for command 3 type 26 0;255;3;0;9;422695811 Skipping security for command 3 type 16 0;255;3;0;9;422695819 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 0;255;3;0;9;422695827 Nonce requested from 16. Waiting... 0;255;3;0;9;422695953 TSF:MSG:READ,16-16-0,s=255,c=3,t=17,pt=6,l=25,sg=1:B7E56807628A0BB459E81226A682E7C3C3B40087E4B7BE05EA 0;255;3;0;9;422695963 Skipping security for command 3 type 17 0;255;3;0;9;422695969 Nonce received from 16. 0;255;3;0;9;422695973 Proceeding with signing... 0;255;3;0;9;422695977 Signing backend: ATSHA204Soft 0;255;3;0;9;422695983 Current nonce: B7E56807628A0BB459E81226A682E7C3C3B40087E4B7BE05EAAAAAAAAAAAAAAA 0;255;3;0;9;422696067 HMAC: 9EF18CC260F8C4CDEB29C1E277F989482B1C08AB37C6FE9AA39146D8BEBC50AA 0;255;3;0;9;422696075 Message signed 0;255;3;0;9;422696079 Message to send has been signed 0;255;3;0;9;422696110 TSF:MSG:SEND,0-0-16-16,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1Log from the node:
129 TSM:INIT:TSP OK 149 TSM:INIT:STATID=16 174 TSF:SID:OK,ID=16 196 TSM:FPAR 243 TSF:MSÿ1040 TSF:MSG:READ,0-0-16,s=255,c=3,t=8,pt=1,l=1,sg=1:0 1097ð”*ô=ø2318 TSM:FPAR:OK 2334 TSM:ID 2349 TSM:ID:OK 2363 TSM:UPL 2383 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2457 TSF:MSG:READ,0-0-16,s=255,c=3,t=25,pt=1,l=1,sg=1:1 2516 TSF:MSG:PONG RECV,HP=1 2545 TSM:UPL:OK 2564 TSM:READY:ID=16,PAR=0,DIS=1 2605 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101 2680 TSF:MSG:READ,0-0-16,s=255,c=3,t=15,pt=6,l=2,sg=0:0101 2746 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK: 2820 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=0:882ED3D3B94E6236CCB4FF241128DB984C93F39707EEAC6B7E 3088 TSF:MSG:SEND,16-16-0-0,s=255,c=0,t=17,pt=0,l=10,sg=1,ft=0,st=OK:2.2.0-beta 3174 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 3248 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:404FD7260F4410E17E0AD6C07A9A1D04306079F24F9F96CDA1 3514 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0 5593 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 5666 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:6AEE2250F8701E4E2B0ABF997B5A8EC57C57793EBC9B09F689 5935 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=11,pt=0,l=11,sg=1,ft=0,st=OK:Molgan Flur 6025 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 6098 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:F652D897B520B026844F8B8B09417A5C0144B6A1F2ABF01623 6365 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=12,pt=0,l=8,sg=1,ft=0,st=OK:08042017 6449 TSF:MSG:SEND,16-16-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 6520 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:25D2B687E9850102C83439698CA1261AC775BD8E1D6D78D662 6789 TSF:MSG:SEND,16-16-0-0,s=1,c=0,t=1,pt=0,l=0,sg=1,ft=0,st=OK: 6862 TSF:MSG:SEND,16-16-0-0,s=2,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 6934 TSF:MSG:READ,0-0-16,s=255,c=3,t=17,pt=6,l=25,sg=1:4E135F3710AC0AD6A13A985A81BA4A4EF209A3E57E42717E49 7204 TSF:MSG:SEND,16-16-0-0,s=2,c=0,t=30,pt=0,l=0,sg=1,ft=0,st=OK: 7274 MCO:REG:REQ 7294 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2 7368 TSF:MSG:READ,0-0-16,s=255,c=3,t=16,pt=0,l=0,sg=1: 7460 TSF:MSG:SEND,16-16-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:B7E56807628A0BB459E81226A682E7C3C3B40087E4B7BE05EA 7610 TSF:MSG:READ,0-0-16,s=255,c=3,t=27,pt=1,l=1,sg=1:1 7821 !TSF:MSG:SIGN VERIFY FAIL 7854 MCO:BGN:STP 7872 MCO:BGN:INIT OK,TSP=1 7901 MCO:SLP:MS=86400000,SMS=0,I1=1,M1=1,I2=255,M2=255 7958 TSF:TDI:TSLThis is done while the node is powered by the usb-to-serial converter so power should be steady.
Any idea why this is not working? The HMAC that the gateway mentions in the log is wrong btw (is this what it gets from the node?)PS Other nodes are working well with singing (and the same HMAC obviously).
@LastSamurai I am not sure what you mean by hmac keys in the log? Hmac key is never shown in the log. Where is this hmac key you mention? I only see nonce data and that is (or should be) random.
Edit: the log from the GW shows the resulting hmac signature. Not the key. I guess your personalized keys differ between gw and node. -
@Anticimex What's a hmac signature? And personalized keys = serial number? So this is working as intended?
Any idea where the error could be? Software setup should be right and the power supply is big enough (its actually an old pc power supply), so why is the signing not working with this one node?Sketch settings:
#define MY_NODE_ID 8 #define MY_RADIO_NRF24 #define MY_DEBUG // Enables debug messages in the serial log #define MY_BAUD_RATE 9600 // Sets the serial baud rate for console and serial gateway #define MY_SIGNING_SOFT // Enables software signing #define MY_SIGNING_REQUEST_SIGNATURES // Always request signing from gateway #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 // floating pin for randomness -
@Anticimex What's a hmac signature? And personalized keys = serial number? So this is working as intended?
Any idea where the error could be? Software setup should be right and the power supply is big enough (its actually an old pc power supply), so why is the signing not working with this one node?Sketch settings:
#define MY_NODE_ID 8 #define MY_RADIO_NRF24 #define MY_DEBUG // Enables debug messages in the serial log #define MY_BAUD_RATE 9600 // Sets the serial baud rate for console and serial gateway #define MY_SIGNING_SOFT // Enables software signing #define MY_SIGNING_REQUEST_SIGNATURES // Always request signing from gateway #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 // floating pin for randomness@LastSamurai hmac signature is just that, the signature. The concepts are described in the documentation for signing.
And I don't understand what you mean with key = serial. Key and serial are two different things. One needs to be identical on all nodes and the other should be unique and is only used for whitelisting. This is also described in detail in the documentation. -
Yes the HMAC key has to be the same on all nodes. I did use the same HMAC key on all nodes.
So you mean that the logs indicate that the HMAC keys on gw and node aren't the same?