MotionMote ATC Sketch Issues (no ACK, no TX Level control?)

Started by Hacker007, January 10, 2016, 04:17:51 PM

Hacker007

Problems: 

Problem 1: MotionMote [88] does not ACK Gateway [1].

Problem 2:  Unable to attain desired RSSI with RFM69HW (433 MHz, ATC Enabled)

To ensure that there are no out-of-date library issues in my install, I updated the IDE to 1.6.7.

Step 1:
In Gateway.ino sketch (attached) un-comment IS_RFM69HW and ENABLE_ATC.  Load into Gateway Mote

Step 2:
In Node.ino sketch, (attached) un-comment IS_RFM69HW and ENABLE_ATC.  Load into Remote Mote for Test 1.

In MotionMote.ino sketch (attached), un-comment IS_RFM69HW and ENABLE_ATC.  Load into Remote Mote for Test 2.

Test 1:
When I load the Node sketch into the Remote Mote, I am able to make the Remote [2] Mote ACK the Gateway Mote [1] as can be seen below:

Listening at 433 Mhz...
SPI Flash MEM not found (is chip soldered?)...
RFM69_ATC Enabled (Auto Transmission Control)
#[1][2] FLASH_MEM_ID:0x0   [RX_RSSI:-39] - ACK sent. Pinging node 2 - ACK...ok!
#[2][2] 1   [RX_RSSI:-44] - ACK sent.
#[3][2] 12   [RX_RSSI:-44] - ACK sent.
#[4][2] 123   [RX_RSSI:-44] - ACK sent. Pinging node 2 - ACK...ok!
#[5][2] 123    [RX_RSSI:-44] - ACK sent.
#[6][2] 123 A   [RX_RSSI:-42] - ACK sent.
#[7][2] 123 AB   [RX_RSSI:-42] - ACK sent. Pinging node 2 - ACK...ok!
#[8][2] 123 ABC   [RX_RSSI:-39] - ACK sent.
#[9][2] 123 ABCD   [RX_RSSI:-41] - ACK sent.
#[10][2] 123 ABCDE   [RX_RSSI:-42] - ACK sent. Pinging node 2 - ACK...ok!
#[11][2] 123 ABCDEF   [RX_RSSI:-44] - ACK sent.
#[12][2] 123 ABCDEFG   [RX_RSSI:-45] - ACK sent.
#[13][2] 123 ABCDEFGH   [RX_RSSI:-45] - ACK sent. Pinging node 2 - ACK...ok!
#[14][2] 123 ABCDEFGHI   [RX_RSSI:-44] - ACK sent.
#[15][2] 123 ABCDEFGHIJ   [RX_RSSI:-45] - ACK sent.
#[16][2] 123 ABCDEFGHIJK   [RX_RSSI:-46] - ACK sent. Pinging node 2 - ACK...ok!
#[17][2] 123 ABCDEFGHIJKL   [RX_RSSI:-47] - ACK sent.
#[18][2] 123 ABCDEFGHIJKLM   [RX_RSSI:-47] - ACK sent.

Test 2:
When I load the MotionMote.ino sketch into the Remote Mote, I am not able to make the Remote [88 in this case] Mote ACK the Gateway Mote [1] as can be seen below:

Listening at 433 Mhz...
SPI Flash MEM not found (is chip soldered?)...
RFM69_ATC Enabled (Auto Transmission Control)
Promiscuous mode on
#[1][88] to [1] START   [RX_RSSI:-52] - ACK sent. Pinging node 88 - ACK...nothing

What could be the problem?  Thanks in advance.

Hacker007

After examining the code on the MotionMote a bit more, I now realize that the reason the Remote Mote does not acknowledge the Gateway Mote is that the Remote Mote spends most of its time sleeping.  At this time, I see no way for the Motion Mote to wake up when the message from the Gateway is transmitted.  The Remote Mote therefore misses the request for ACK from the Gateway.  More work is needed in order to understand the RFM69 Library a bit better to see if it makes sense to do this or if it is even possible.

Felix

I think you might just be using the wrong gateway sketch. The Node-Gateway example sketches are only meant to be used by themselves not as general purpose real sketches.
The main reason is that the gateway example does send packets to the end node and asks for ACKs, every 3rd packet or so, which is not typical of a real gateway.
If you want to use a real central node gateway, you should look into the MightyHat Gateway sketch posted here.

TomWS

Quote from: Hacker007 on January 11, 2016, 09:13:43 PM
After examining the code on the MotionMote a bit more, I now realize that the reason the Remote Mote does not acknowledge the Gateway Mote is that the Remote Mote spends most of its time sleeping.  At this time, I see no way for the Motion Mote to wake up when the message from the Gateway is transmitted.  The Remote Mote therefore misses the request for ACK from the Gateway.  More work is needed in order to understand the RFM69 Library a bit better to see if it makes sense to do this or if it is even possible.
Check the Listen Mode threads, this one in particular: https://lowpowerlab.com/forum/index.php/topic,1136.0.html
ListenMode provides a way to wake up a sleeping Mote and the code is built into the latest RFM69_ATC library.  Look at the *_WL (with ListenMode) examples in that library.

Tom