Out of Box Testing with Node & Gateway sketches

Started by jdonovan, April 29, 2015, 07:58:39 PM

jdonovan

I ordered 2 moteinos RFM69HW, soldered the headers and antenna, and have it printing out data to the serial console. So setup is pretty much finished. To verify everything was working correctly, I powered one with USB and the other with a 9v power supply I have lying around (supplying power via headers). I have serial output indicating messages being sent, but none ever being received.

For the test program that is pre-loaded on the moteinos, are they supposed to receive test-program transmissions? If so, what could I look into for solving this. I plan to write my own logic I just wanted to ensure they were working before debugging code. I verified in the serial console that both moteinos are broadcasting on 915MHz.

Does the transmitter need to be powered separately? Is powering it with the header pins an issue?

Any help would be appreciated.

Felix

The nodes are all tested/loaded with the Node example.
To actually see data from the sketch they come with, you have to load the Gateway sketch on one of them that will act as a receiver, or another unit. Settings should match, except node ID, also the HW setting should match the hardware radio variant.

Quote from: jdonovan on April 29, 2015, 07:58:39 PM
Does the transmitter need to be powered separately? Is powering it with the header pins an issue?

You can power them however you want as long as you don't exceed the 16V of the regulator and don't reverse VCC with GND which will fry your regulator. So power via USB or via the pins, from the same source or different, won't matter.

jdonovan

I appreciate the response. I will give that a try. Glad to know it was just my ignorance  ;D

Regarding the power: I thought I had it correct, I just wanted to confirm as debug statements can print without it actually being performed. But all makes sense now.

Thank you.

Felix

I should add that any Moteino can transmit and receive. That is why they are called transceivers, they can do both functions.
But they can only do one thing at a time.

The Node sketch actively loops and sends messages to a given node ID destination - an increasingly longer string with every new send cycle. It is set to send a packet with ACK request, then quickly switch to receive (RX) mode and wait for the ACK to arrive (for up to 30ms by default). If that fails it will retry the sent packet again and again (3X total times) until it gives up. Then it waits a given period (up to a second) and sends a new different packet.

The Gateway sketch spends most of the time in receive (RX) mode. Once it receives a message it prints it out to the serial port, then if the sender requested an ACK it quickly responds with the ACK packet (just an empty payload packet with the right header bytes set to flag this is an ACK).

jdonovan

Yessir. I understand now. Everything is working perfectly. I misunderstood the test script when I was interpreting it from the Serial Console. I would read the sent "123 ABC..." followed by --No Response. Therefore, I thought it was sending and listening. However, it's only listening for the ACKnowledgement of a "message received". Makes perfect sense to me.

For shits and grins, I hooked up a voltmeter to see power consumption (for a base line) 27-32 mA is amazing for sending a message every 150ms and trigger a LED. The arduino uno runs at 30mA sleeping lol. Amazing piece of hardware. Thanks again for the help. Now to develop my project. =)