Gateway not showing nodes

Started by jeremiah, February 04, 2016, 01:24:08 AM

jeremiah

I have a new Pi gateway up and running with a MightyHat R2. I used the Pi Gateway image and the example MightyHat sketch to get it going.

The first thing I did was to remove the nodes that were left as a part of the image. My first node is a GarageMote R1. I got it built and installed the example sketch, making sure to change the network ID, Node ID, and encryptkey to the same as the gateway.

Now that I got them both up and running, I dont get any nodes to show up on the gateway. Is there something I am supposed to do to add it?
I dont see anything in the videos posted, they just show up automatically. Is their some trouble shooting i can do? at this point I am questioning if I soldered something incorrectly or if the antenna I have on the gateway is incorrect? I got a 433mhz montenio and the antenna is from an old router.

Felix

Quote from: jeremiah on February 04, 2016, 01:24:08 AM
I got it built and installed the example sketch, making sure to change the network ID, Node ID, and encryptkey to the same as the gateway.
Only the network ID and encryption key should be the same, the node ID should be different. Also very crucial: the isRFM69HW setting, ensure that matches your radio, if you have a W that should be commented out, if a HW then keep the #define isRFM69HW.

Yes it should just show up in the UI as long as the node sends a valid packet. I would try this on your bench for easy debugging before installing it to confirm it works. Make sure the antenna is NOT from a router, which is 2.4ghz. Use the provided wire antenna you received from Low Power Lab, that will be much better.

jeremiah

Thank you Felix. I have the wire antenna setup for the garatemote. On the mightyhat r2 I have the router antenna currently. Can you recommend an antenna to but for the mighty hat? I am using 433mz transceivers.

jeremiah

#3
some trouble shooting I have done. I checked all setting code in the sketchs, I have the HW code commented out. The correct 433 mhz chosen. NodeID is different on gateway and garagemote. NetworkID is the same.
I have the 2 units sitting right next to each other because I do not have an antenna on the mightyhat (i took the router antenna off). In the Adruino Serial Monitor it shows "Unknown" with the garagemote plugged in.

Still no nodes shows up.

Mighting Hat Sketch
#define NODEID          1  //the gateway has ID=1
#define NETWORKID     100  //all nodes on the same network can talk to each other
#define FREQUENCY     RF69_433MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
//#define FREQUENCY     RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
//#define FREQUENCY_EXACT 917000000 //uncomment and set to a specific frequency in Hz, if commented the center frequency is used
#define ENCRYPTKEY    "sampleEncryptKey" //has to be same 16 characters/bytes on all nodes, not more not less!
//#define IS_RFM69HW    //uncomment only for RFM69HW! Leave out if you have RFM69W!
#define ENABLE_ATC    //comment out this line to disable AUTO TRANSMISSION CONTROL //more here: http://lowpowerlab.com/blog/2015/11/11/rfm69_atc-automatic-transmission-control/
#define ENABLE_WIRELESS_PROGRAMMING    //comment out this line to disable Wireless Programming of this gateway node
#define ENABLE_LCD    //comment this out if you don't have or don't want to use the LCD
//*****************************************************************************************************************************
#define ACK_TIME       30  // # of ms to wait for an ack
#define SERIAL_BAUD 115200
#define DEBUG_EN     //comment out if you don't want any serial verbose output (keep out in real use)


GarateMote Sketch
#define GATEWAYID   1
#define NODEID      11
#define NETWORKID   100
#define FREQUENCY     RF69_433MHZ
//#define FREQUENCY     RF69_868MHZ
//#define FREQUENCY       RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
#define ENCRYPTKEY      "sampleEncryptKey" //has to be same 16 characters/bytes on all nodes, not more not less!
//#define IS_RFM69HW      //uncomment only for RFM69HW! Leave out if you have RFM69W!

Felix

Several antennas to choose from here, match your SMA connector to the mating termination of the antenna.

Add this to the very end of setup() in your garage sketch:

radio.sendWithRetry(GATEWAYID, "START", 6);


This should make the node show up, not a real metric but it will show you the time the node went live. I started using this on some motes that I want to know when they started and if they ever restart the metric will refresh and help indicate there is a problem. But for your purpose it should just help with getting the mote online (ie node to appear).

mzv72m

I'm using the antenna ANT-433-CW-RCS-ND from the link Felix provided and it works great with the Mighty Hat.  But like Felix said make sure you match the SMA connectors.

Dan
Dan

jeremiah

ok, so I added the
radio.sendWithRetry(GATEWAYID, "START", 6;)
. I still dont have an antenna on the MHat, but with them sitting right next to each other I would think that would not matter. I still dont get a node in the gateway.

Is there a way I can see if it is MHat is getting the packets? Trying to determine where the breakdown is, right? If it is getting to the MHat but not getting to the Pi Gateway, There should be a way to determine that, right?

Also, The Antenna icon on the MHat LCD shows 100db, is that because there is no antenna and will change when one is plugged in?

mirko.ugolini

Hi Felix,

I got the same problem.

I setup one Gateway with the  default image that has "doorBell" on node id =32

I setup  one Doorbell  moteino with the id=32  and I can receive commands from the interface  and viceversa.

Then I tryied to change the node id of the Doorbell to  33 and I expected to see the new node popup in the web interface but nothing.

So it is not a communication problem but something seems wrong in code.

How is possible to debug the problem?

Regards

Mirko Ugolini

Felix

I think you guys must have something wrong setup in code either on the gateway or on the nodes.
I am running the same software and everything works, others have verified this also.
A lot of times people ask why something won't work and then in the end it's something trivial like the wrong frequency or the HW setting or something like that.
There's no good way for me or others to verify that information, we can only ask you double check. If everything is right, and connections are good, it should work. I try my best to post valid code and easy instructions so it would generate the least amount of problems and support.

Depending which hardware you are running on the gateway (just Moteino, a MightyHat?) you have to have a specific gateway sketch, here is the one for the Moteino and here's the one for the MightyHat.

jeremiah

So when I set this up, I intentionally didn't change much in the code from the sample sketches included. I just made sure that the define statements for initial setup where correct to my equipment and such. I only have a Pi/MightyHat Gateway and 1 Motenio Node running. I have the Motenio attached to the computer so that I can see the serial output in the Arduino Serial Monitor.

It seems like it is running just fine, as it is logging everything there. So am I safe to say it is sending packets out too?

I guess I don't know of a what to do the same type of thing with the Pi/MightyHat Gateway. I dont know how to tell if it is receiving anything. I saw in one of the demo videos that you had the Gateway Site up on half the screen and a console type window up on the other half and it was streaming info as you used the gateway Site. You say is the "output  from the Node.JS Websockets Script" for debugging.

Kilo95

If you have it set up for the gateway moteino and the node to "talk" to each other, I'd hook the gateway moteino to the Pi and use minicom on the Pi. You should see the info coming in from the remote node

sudo minicom -b 115200 -o -D /dev/ttyAMA0

Change the ttyAMA0 to whichever serial port the gateway moteino is connected to the Pi on

mzv72m

Are you using one of the standard node skethes?  I know when I setup my first custom node I had to modify the metrics.is file to recognize it.  Another thing that I just thought of, how do you have the gateway moteino connected to the Rpi? I intially had mine set wrong and it did not receive anything. There are two ways USB & GPIO,

Dan
Dan

jeremiah

I am using the MightyHat R2 board on the Pi. And I am using the example sketches from the library felix maintains. Only changes I made were to setup NodeID, Network, etc as your supposed to.

The only thing I can think of is the fact that I dont have an antenna hooked to the MightyHat/Pi Gateway yet, but I have the sender note sitting literally right next to it.

Quote from: jeremiah on February 04, 2016, 11:07:06 PM
Mighting Hat Sketch
#define NODEID          1  //the gateway has ID=1
#define NETWORKID     100  //all nodes on the same network can talk to each other
#define FREQUENCY     RF69_433MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
//#define FREQUENCY     RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
//#define FREQUENCY_EXACT 917000000 //uncomment and set to a specific frequency in Hz, if commented the center frequency is used
#define ENCRYPTKEY    "sampleEncryptKey" //has to be same 16 characters/bytes on all nodes, not more not less!
//#define IS_RFM69HW    //uncomment only for RFM69HW! Leave out if you have RFM69W!
#define ENABLE_ATC    //comment out this line to disable AUTO TRANSMISSION CONTROL //more here: http://lowpowerlab.com/blog/2015/11/11/rfm69_atc-automatic-transmission-control/
#define ENABLE_WIRELESS_PROGRAMMING    //comment out this line to disable Wireless Programming of this gateway node
#define ENABLE_LCD    //comment this out if you don't have or don't want to use the LCD
//*****************************************************************************************************************************
#define ACK_TIME       30  // # of ms to wait for an ack
#define SERIAL_BAUD 115200
#define DEBUG_EN     //comment out if you don't want any serial verbose output (keep out in real use)


GarateMote Sketch
#define GATEWAYID   1
#define NODEID      11
#define NETWORKID   100
#define FREQUENCY     RF69_433MHZ
//#define FREQUENCY     RF69_868MHZ
//#define FREQUENCY       RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
#define ENCRYPTKEY      "sampleEncryptKey" //has to be same 16 characters/bytes on all nodes, not more not less!
//#define IS_RFM69HW      //uncomment only for RFM69HW! Leave out if you have RFM69W!


Kilo95

You have to edit either the metrics.js or settings.json5(don't remember which) and tell it which serial port the moteino is on. The line ends in ttyAMA0. My Pi is on USB0 so that's what I swap out for AMA0

I went back and looked and it should be the settings.js file.

Felix

jeremiah,
You have a MightyHat, make sure you run the right sketch on that, do a sudo stop gateway, then use minicom to open the hat's serial port for debugging.
Load a node test sketch on your remote node, the data should show up immediately in minicom:

sudo minicom -b 115200 -o -D /dev/ttyAMA0

The hat is connected to the GPIO serial port which is typically ttyAMA0.
If that's not happening you have some issue with the sketches or something's not configured right.