So I'm having a strange error that occurs hours into my runtime. I've narrowed it down to a communications issue with the node that occurs when I start a small DC motor attached to my node. At first look, I figured there could be a power issue causing the voltage to dip at the radio, but I figured I had enough hold up to bridge the in-rush of the motor start. Here's a quick description of my setup:
- Arduino Pro-Mini 3.3V 8MHz
- NRF24 set to PA_MAX
- Project powered by a 12V 3A power supply
- Arduino power from a 7805 regulator with a 10uF cap
- NRF24 powered from an L4931 3.3V voltage regulator with a 47uF cap
- Motor powered straight from the 12V supply through a Mosfet controlled by the arduino
- Arduino, Radio, and motor housed in same project box
With that configuration, I'm assuming there isnt a power draw issue, perhaps an RF/EMI issue from the brushed motor being in close proximity to the radio. With that said, I was under the impression that the network would heal itself and missed/partial messages would not cause a latched issue like I'm seeing. I'm even doing a isTransportReady() check prior to sending messages and that check is not failing.
Here is what I'm seeing in the debug:
Startup and steady state snippet for reference... no issues here:
[Mon Oct 24 07:50:53.749 2016] 0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.0.1-beta
[Mon Oct 24 07:50:53.856 2016] 4 TSM:INIT
[Mon Oct 24 07:50:53.856 2016] 4 TSM:INIT:TDC
[Mon Oct 24 07:50:53.856 2016] 12 TSM:INIT:TSP OK
[Mon Oct 24 07:50:53.856 2016] 14 TSM:INIT:STATID=1
[Mon Oct 24 07:50:53.856 2016] 16 TSF:SID:OK,ID=1
[Mon Oct 24 07:50:53.856 2016] 18 TSM:FPAR
[Mon Oct 24 07:50:53.856 2016] 20 TSM:FPAR:STATP=0
[Mon Oct 24 07:50:53.856 2016] 22 TSM:ID
[Mon Oct 24 07:50:53.856 2016] 22 TSM:ID:OK
[Mon Oct 24 07:50:53.856 2016] 24 TSM:UPL:DISABLED
[Mon Oct 24 07:50:53.856 2016] 26 TSM:READY
[Mon Oct 24 07:50:53.856 2016] 30 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
[Mon Oct 24 07:50:53.856 2016] 43 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.0.1-beta
[Mon Oct 24 07:50:53.856 2016] 53 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
[Mon Oct 24 07:50:53.856 2016] 61 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
[Mon Oct 24 07:50:53.856 2016] 75 TSF:MSG:READ,0-0-1,s=255,c=3,t=6,pt=0,l=1,sg=0:I
[Mon Oct 24 07:50:53.856 2016] 81 MCO:REG:NOT NEEDED
[Mon Oct 24 07:50:53.856 2016] 83 MCO:BGN:STP
[Mon Oct 24 07:50:53.856 2016] ... Starting Setup ...
[Mon Oct 24 07:50:55.772 2016] 2007 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
[Mon Oct 24 07:50:55.772 2016] Requesting time from Gateway:
[Mon Oct 24 07:50:55.772 2016] 2027 TSF:MSG:READ,0-0-1,s=255,c=3,t=1,pt=0,l=10,sg=0:1477295454
[Mon Oct 24 07:50:55.803 2016] Time value received and updated...
[Mon Oct 24 07:50:55.803 2016] Clock updated....
[Mon Oct 24 07:50:55.803 2016] Sensor's time currently set to: 07:50:54am
[Mon Oct 24 07:50:55.803 2016] 10/24/2016
[Mon Oct 24 07:50:57.243 2016] Loading parameters from EEPROM from Month: 10 Day: 24
[Mon Oct 24 07:50:57.243 2016] Fillcount: 5 and Filltime: 729
[Mon Oct 24 07:50:57.243 2016] Initialization Complete!
[Mon Oct 24 07:50:57.692 2016] 3942 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=14,sg=0,ft=0,st=OK:Dog Water Bowl
[Mon Oct 24 07:50:57.761 2016] 3952 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
[Mon Oct 24 07:50:57.761 2016] 3962 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=3,pt=0,l=9,sg=0,ft=0,st=OK:Bowl Fill
[Mon Oct 24 07:50:57.761 2016] 3973 TSF:MSG:SEND,1-1-0-0,s=2,c=0,t=36,pt=0,l=5,sg=0,ft=0,st=OK:Count
[Mon Oct 24 07:50:57.761 2016] 3981 TSF:MSG:SEND,1-1-0-0,s=3,c=0,t=36,pt=0,l=6,sg=0,ft=0,st=OK:Volume
[Mon Oct 24 07:50:59.520 2016] ...Starting main loop...
[Mon Oct 24 07:50:59.546 2016] 5758 MCO:BGN:INIT OK,ID=1,PAR=0,DIS=1,REG=1
[Mon Oct 24 07:50:59.546 2016] 07:50:57am: Checking periodic sensor data.
[Mon Oct 24 07:50:59.571 2016] Sensor values:
[Mon Oct 24 07:50:59.571 2016] A0 = 489
[Mon Oct 24 07:50:59.571 2016] A1 = 748
[Mon Oct 24 07:50:59.571 2016] A2 = 894
[Mon Oct 24 07:50:59.571 2016] Bowl water level: Low
[Mon Oct 24 07:51:04.253 2016] 10475 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=47,pt=0,l=21,sg=0,ft=0,st=OK:Bowl filled 5 time(s)
[Mon Oct 24 07:51:04.300 2016] 10485 TSF:MSG:READ,0-0-1,s=2,c=1,t=47,pt=0,l=21,sg=0:Bowl filled 5 time(s)
[Mon Oct 24 07:51:04.300 2016] 10493 TSF:MSG:ACK
[Mon Oct 24 07:51:04.300 2016] This is an ack from gateway
[Mon Oct 24 07:51:04.300 2016] 10504 TSF:MSG:SEND,1-1-0-0,s=3,c=1,t=47,pt=0,l=13,sg=0,ft=0,st=OK:Filled 794 mL
[Mon Oct 24 07:51:04.300 2016] 10512 TSF:MSG:READ,0-0-1,s=3,c=1,t=47,pt=0,l=13,sg=0:Filled 794 mL
[Mon Oct 24 07:51:04.300 2016] 10520 TSF:MSG:ACK
[Mon Oct 24 07:51:04.300 2016] This is an ack from gateway
[Mon Oct 24 07:51:09.305 2016] 15486 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=47,pt=0,l=21,sg=0,ft=0,st=OK:Bowl filled 5 time(s)
[Mon Oct 24 07:51:09.305 2016] 15497 TSF:MSG:READ,0-0-1,s=2,c=1,t=47,pt=0,l=21,sg=0:Bowl filled 5 time(s)
[Mon Oct 24 07:51:09.305 2016] 15505 TSF:MSG:ACK
[Mon Oct 24 07:51:09.305 2016] This is an ack from gateway
[Mon Oct 24 07:51:09.305 2016] 15517 TSF:MSG:SEND,1-1-0-0,s=3,c=1,t=47,pt=0,l=13,sg=0,ft=0,st=OK:Filled 794 mL
[Mon Oct 24 07:51:09.336 2016] 15525 TSF:MSG:READ,0-0-1,s=3,c=1,t=47,pt=0,l=13,sg=0:Filled 794 mL
[Mon Oct 24 07:51:09.336 2016] 15534 TSF:MSG:ACK
[Mon Oct 24 07:51:09.336 2016] This is an ack from gateway
Here is a snippet just prior to starting the motor followed by the issue I'm seeing:
[Mon Oct 24 07:55:24.861 2016] 270477 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=47,pt=0,l=21,sg=0,ft=0,st=OK:Bowl filled 5 time(s)
[Mon Oct 24 07:55:24.861 2016] 270487 TSF:MSG:READ,0-0-1,s=2,c=1,t=47,pt=0,l=21,sg=0:Bowl filled 5 time(s)
[Mon Oct 24 07:55:24.861 2016] 270495 TSF:MSG:ACK
[Mon Oct 24 07:55:24.861 2016] This is an ack from gateway
[Mon Oct 24 07:55:24.861 2016] 270503 TSF:MSG:SEND,1-1-0-0,s=3,c=1,t=47,pt=0,l=13,sg=0,ft=0,st=OK:Filled 794 mL
[Mon Oct 24 07:55:24.861 2016] 270514 TSF:MSG:READ,0-0-1,s=3,c=1,t=47,pt=0,l=13,sg=0:Filled 794 mL
[Mon Oct 24 07:55:24.861 2016] 270520 TSF:MSG:ACK
[Mon Oct 24 07:55:24.861 2016] This is an ack from gateway
[Mon Oct 24 07:55:29.874 2016] 275474 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=47,pt=0,l=21,sg=0,ft=0,st=OK:Bowl filled 5 time(s)
[Mon Oct 24 07:55:29.874 2016] 275484 TSF:MSG:READ,0-0-1,s=2,c=1,t=47,pt=0,l=21,sg=0:Bowl filled 5 time(s)
[Mon Oct 24 07:55:29.874 2016] 275492 TSF:MSG:ACK
[Mon Oct 24 07:55:29.874 2016] This is an ack from gateway
[Mon Oct 24 07:55:29.874 2016] 275499 TSF:MSG:SEND,1-1-0-0,s=3,c=1,t=47,pt=0,l=13,sg=0,ft=0,st=OK:Filled 794 mL
[Mon Oct 24 07:55:29.874 2016] 275509 TSF:MSG:READ,0-0-1,s=3,c=1,t=47,pt=0,l=13,sg=0:Filled 794 mL
[Mon Oct 24 07:55:29.874 2016] 275517 TSF:MSG:ACK
[Mon Oct 24 07:55:29.874 2016] This is an ack from gateway
[Mon Oct 24 07:55:30.007 2016] 07:55:27am: Checking periodic sensor data.
[Mon Oct 24 07:55:30.094 2016] Sensor values:
[Mon Oct 24 07:55:30.094 2016] A0 = 777
[Mon Oct 24 07:55:30.094 2016] A1 = 752
[Mon Oct 24 07:55:30.094 2016] A2 = 914
[Mon Oct 24 07:55:30.094 2016] Bowl water level: Empty
[Mon Oct 24 07:55:30.094 2016] 07:55:27am: Starting Motor
[Mon Oct 24 07:55:30.094 2016] Bowl filled 6 time(s) today.
[Mon Oct 24 07:55:30.094 2016] 275701 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=2,pt=1,l=1,sg=0,ft=0,st=OK:1
[Mon Oct 24 07:55:30.094 2016] 275712 TSF:MSG:READ,0-0-1,s=1,c=1,t=2,pt=1,l=1,sg=0:1
[Mon Oct 24 07:55:30.094 2016] 275718 TSF:MSG:ACK
[Mon Oct 24 07:55:30.094 2016] This is an ack from gateway
[Mon Oct 24 07:55:30.094 2016] 07:55:27am: Incoming change for sensor:1, New status: 1
[Mon Oct 24 07:55:30.094 2016] 275765 TSF:MSG:READ,1-1-1,s=1,c=1,t=1,pt=0,l=0,sg=0:
[Mon Oct 24 07:55:30.110 2016] 275771 !TSF:MSG:LEN,8!=7
[Mon Oct 24 07:55:30.402 2016] 275984 TSF:MSG:READ,1-1-1,s=1,c=1,t=1,pt=0,l=0,sg=0:
[Mon Oct 24 07:55:30.402 2016] 275988 !TSF:MSG:LEN,8!=7
[Mon Oct 24 07:55:30.402 2016] 275998 TSF:MSG:READ,1-1-1,s=1,c=1,t=1,pt=0,l=0,sg=0:
[Mon Oct 24 07:55:30.402 2016] 276004 !TSF:MSG:LEN,8!=7
[Mon Oct 24 07:55:30.402 2016] 276011 TSF:MSG:READ,1-1-1,s=1,c=1,t=1,pt=0,l=0,sg=0:
[Mon Oct 24 07:55:30.402 2016] 276017 !TSF:MSG:LEN,8!=7
[Mon Oct 24 07:55:30.402 2016] 276023 TSF:MSG:READ,1-1-1,s=1,c=1,t=1,pt=0,l=0,sg=0:
[Mon Oct 24 07:55:30.402 2016] 276029 !TSF:MSG:LEN,8!=7
[Mon Oct 24 07:55:30.402 2016] 276058 TSF:MSG:READ,1-1-1,s=1,c=1,t=1,pt=0,l=0,sg=0:
[Mon Oct 24 07:55:30.434 2016] 276064 !TSF:MSG:LEN,8!=7
[Mon Oct 24 07:55:30.434 2016] 276074 TSF:MSG:READ,1-1-1,s=1,c=1,t=1,pt=0,l=0,sg=0:
[Mon Oct 24 07:55:30.434 2016] 276080 !TSF:MSG:LEN,8!=7
That is what I get continuously until I send another set() message for my sensor 1, at which point my sensor set messages seem to go out, but i stop getting ack... it changes to:
[Mon Oct 24 07:58:30.366 2016] 455651 TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
[Mon Oct 24 07:58:30.381 2016] 455657 !TSF:MSG:LEN,28!=7
[Mon Oct 24 07:58:30.435 2016] 07:58:27am: Fill timer reached. Stopping motor.
[Mon Oct 24 07:58:30.435 2016] 455677 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=2,pt=1,l=1,sg=0,ft=0,st=OK:0
[Mon Oct 24 07:58:30.435 2016] 07:58:27am: Saving the following values to EEPROM:
[Mon Oct 24 07:58:30.435 2016] Fill Time: 909
[Mon Oct 24 07:58:30.435 2016] 6, 3, 141, 10, 24
[Mon Oct 24 07:58:35.202 2016] 460476 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=47,pt=0,l=21,sg=0,ft=0,st=OK:Bowl filled 6 time(s)
[Mon Oct 24 07:58:35.240 2016] 460496 TSF:MSG:SEND,1-1-0-0,s=3,c=1,t=47,pt=0,l=13,sg=0,ft=0,st=OK:Filled 990 mL
[Mon Oct 24 07:58:40.243 2016] 465471 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=47,pt=0,l=21,sg=0,ft=0,st=OK:Bowl filled 6 time(s)
[Mon Oct 24 07:58:40.243 2016] 465489 TSF:MSG:SEND,1-1-0-0,s=3,c=1,t=47,pt=0,l=13,sg=0,ft=0,st=OK:Filled 990 mL
[Mon Oct 24 07:58:45.233 2016] 470470 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=47,pt=0,l=21,sg=0,ft=0,st=OK:Bowl filled 6 time(s)
[Mon Oct 24 07:58:45.233 2016] 470491 TSF:MSG:SEND,1-1-0-0,s=3,c=1,t=47,pt=0,l=13,sg=0,ft=0,st=OK:Filled 990 mL
I know I've posted quite a bit, but i'm stumpped... Tonight i think i'm going to try to add a delay between starting the motor and sending the status messages and cross my fingers.
If anyone has some insight on anything i can do to reset all the communications to clear this latched fault, please let me know.
Thanks!!!