Unknown motes showing up, motes dropping off

Started by peckcj, January 13, 2016, 01:03:39 AM

peckcj

I'm new to this and am trying to figure things out. I have a Pi set up with a Mighty Hat with 3 motes communicating, but there are also 16 unknown motes showing up. When I delete them, they come back up.

Also, the motes that I have communicating only communicate for an hour or so, then stop until I reboot the Pi.

Any thoughts would be appreciated.

Felix

Other motes showing up means you get some kind of traffic that is decoded into something the gateway app metrics won't match, but they will still insert the node without any data. In the next gateway release (v8) i will include a setting that you can use to prevent empty nodes from showing up. I hope to have this ready in the next few days.

Motes stopping after ~1h can mean 2 things:
- your mighty hat sketch freezes (does it respond to the button press for a reboot or how do you reboot the pi?)
- your motes have some issue and stop sending the data

Let's first make sure the HAT works and doesn't freeze up. Do you use the stock MightyHat sketch? Do you use the LCD?

peckcj

It's not the Pi, it's the Hat. The button stops working until a reboot as well. I'm using the LCD with the stock sketch.

Felix

Can you try this: comment out #define ENABLE_LCD to see if that helps.

peckcj

I ammended the sketch. Time for work, so I'll posy back later. Thanks for the help.


Felix

Are you saying that disabling (not using) the LCD still freezes your sketch/Hat?
It really should not. Without the LCD the Hat is equivalent to a Moteino.
Did you add any code of your own?
I have seen some flakyness from the part of the LCD SPI which I could not repeat consistently but it leads me to believe that the LCD may add some SPI traffic that is messing up the other SPI devices and leads to some elusive freeze. The one thing that could be done is pulling up the LCD CS in code. For the next revision I am thinking of moving the CS line to another pin to keep it independend (right now it's shared with the power LATCH), then it could be pulled up with a resistor instead of explicitly in code.
I need to modify the sketch and do that CS pulling explicitly, I will post here when I have that ready.
Do you have the LCD soldered to the HAT directly like in my photos?

peckcj

OK, so I doublechecked and I messed up when originally commenting out the LCD. The LCD is now disabled and the gateway seems to be working fine with no hangups yet.

Any ideas on how I can get the LCD working? I really like the functionality.

Felix

peckcj,
Like I mentioned previously, I am on the hunt for the exact cause of this elusive hanging. I have noticed it but I cannot determine the exact cause or reproduce it in a manner that I can capture it on a scope or logic analyzer. I've observed in a stress test (sending increasingly longer packets every 200ms for days on end) that it can hang the atmega328. I think the cause is a SPI conflict. Disabling the LCD completely seems to solve any such issue.
For a new revision I plan to move the LCD CS to a dedicated pin and the LCD RST tied to the atmega RST instead of being controlled by the atmega.
However in the interim I plan to make some modifications to the MightyHat sketch. I still have to do that and ask you to try that new sketch. I haven't had a chance to do much work this weekend so far, I hope to get some time tomorrow or Monday. I also need to make a new V8 release of the gateway.

There are some hardware changes to the LCD that could improve the hanging. But I will talk more about that once we see the results with the new sketch changes.

Felix

Ok I made some changes to the sketch. Please give this a try, this time with LCD enabled, let me know how it behaves.

peckcj

So far so good!!! I uploaded the new sketch as well as the new v8 gateway image and things are working as expected with no freezing as of yet. Awesome!!!!

I'll post back soon after it sits for a while.

I want to try to assign one of the large tactile buttons to turn off/turn on the backlight, so this is exciting.