console debugging

Started by bruster999, November 13, 2015, 03:59:17 PM

bruster999

Hi all,

Looking for some input from experienced Pi Gateway builders here. I just completed Felix's super tutorial on setting up the pi gateway(http://lowpowerlab.com/gateway/#pisetup). I'm using Felix's most recent pi image (http://lowpowerlab.com/gateway/#image) on my Pi2 and I have a Moteino connected via USB through a USB/FTDI adapter. The adapter works on it's own as I can see node messages coming in if I use Putty to monitor. When the Moteino is connected to the pi though and I trigger the same event (with my mailbox notifier), it doesn't update the gateway dashboard (which appears to be working as designed since I can see the nodes and manipulate them).

Can someone suggest how to debug this? The only thing that doesn't seem to work is the console messages coming out on the terminal window. What do I need to do to make this happen?

Regards and thanks in advance.
Bruster

Felix

Quote from: bruster999 on November 13, 2015, 03:59:17 PM
The only thing that doesn't seem to work is the console messages coming out on the terminal window
Bruster,
So you can see the serial messages in minicom/putty, but they don't make it as updates in the dashboard?
Have you updated the messages to another format than anything in my sample sketches? What does your message look like?
There is a specific format that is expected for parsing by the dashboard: [NodeId] message [RSSI:-xx]
The message itself can be many tokens - space separated, and they will match anything defined in metrics.js under the exports.metrics section.

bruster999

Hi Felix,
I haven't altered the node message, only the frequency, etc. as you directed in your great tutorial. I am pretty sure the node and gateway are ok since when I run them both on their own from com ports I can see the incoming messages at the gateway:
[55] LO:1h14m BAT:3.07v   [RSSI:-26] <<-- received periodically
[55] MOTION BAT:294   [RSSI:-30][ACK-sent] <<-- received when I trigger the mailbox notifier

When I run  "minicom -b 9600 -o -D /dev/ttyAMA0" I see nothing, not even when I trigger the node. So, I think the problem is at the pi side but since I can't see anything I can't tell what's going on and being a Linux newbie I'm just scratching my head.

Felix

Perhaps I missed being more specific, but the baud of the Moteino is 115200 (configured in the sketch also). So you must open the serial port at the same baud when you do it through minicom. In the gateway settings this is also matched to 115200 so the messages should be coming through.

You mentioned you are connected through an external USB , so this is not ttyAMA0 (that is the GPIO serial, not a USB serial). Enumerate the USB ports and find the one that is like ttyUSB0 or something like that.

Or just try this:
minicom -b 115200 -D /dev/ttyUSB0

Also see this post: https://lowpowerlab.com/forum/index.php/topic,1083.msg8900.html#msg8900

bruster999

Thanks Felix. You were right on the money but the web page does not update. Can you point me in the right direction to debug this?

Thanks!

bruster999

Update on this. It seems that when mimicom is running I can see the incoming messages on the console (see earlier post) but they are not reflected on the dashboard. Stopping minicom has no affect but once I reboot the pi then the dashboard updates again. I have only one node at the moment so I can't say for sure that it's universal but I expect it is.

Another question: how do you add attributes to the dashboard? While debugging the problem I deleted the Mailbox node from the console then it was recreated when I triggered it (cool feature) but I have lost the battery and last opened attributes. How can I get those back?
Thanks.

HeneryH

What interface are you using between the moteino and the pi??  USB or GPIO?

bruster999

Hi Henry,
The Moteino is connected to the GPIO via +5v, GND, Rx and Tx.
Thanks.