Cannot get OTA Programming to Work [solved]

Started by jamacaulay, December 05, 2018, 04:33:43 PM

jamacaulay

Appreciate anyone's help even though others have seen this problem before..... but not lately using the latest versions of everything.  I have been working with moteinos for a while, however new to OTA wireless programming.  I have tried and failed many times after reviewing documentation, forums, videos, blogs, etc.  There have been so many changes since 2015 on how OTA wireless programming works, I am royally confused on which instructions to follow.  My latest attempt has been to:

1. Install Arduino IDE from scratch
2. Ensure that the RFM69-master library is included in Arduino IDE
3. Download and extract WirelessProgramming-master.zip
4. Compile and upload example Programmer.ino sketch via USB on programmer moteino with spi flash chip, with correct frequency, network, etc.
5. Compile and upload example Target.ino sketch via USB on another moteino with spi flash chip, with correct frequency, network, and checked the sketch has the "CheckForWirelessHEX(radio, flash, false);" line, etc.  From what I have read the "false" argument is just for debugging purposes.
6. With the Target.ino sketch in Arduino IDE, select Sketch --> Export Compiled Binary to get the Target.ino.standard.hex file for use with the WirelessProgramming.exe GUI.
7.  With the programmer moteino connected to laptop, launch WirelessProgramming.exe and follow the instructions outlined within the GUI.

After following these steps I get the attached output in the log including "FAIL: No response from Moteino Target, is Target listening on same Freq/NetworkID & OTA enabled?"  I can tell the two moteinos are communicating at some level when I click Start because the LED on the target node stops flashing momentarily.  Can anyone tell me what I have missed?  Sooo appreciate any help for this wireless noob.  Thanks.

Felix

The sketches to get started with are in the RFM69 library, make sure you got latest that.
You can install it throught the Arduino IDE Library Manager directly, no need to manually download ZIPs and guess your way to where it goes.

So use the examples from here to load on 2 moteinos and match the settings with the RFM frequency etc.
Your TARGET Moteino needs a 4MBIT flash. Those sketches have the critical function calls needed for OTA to work.

The Windows GUI (or python script you can run on linux) is in this repository.

jamacaulay

Hi Felix.  RFM69 version 1.1.3?  Have confirmed this library is installed through IDE Library Manager.  I used the exact sketches you linked in your reply and the only thing I changed is to correct frequency.  There is a 4MBIT flash on target moteino.  I also re-downloaded the Windows GUI from the repository you referenced.  Still getting the following after 2 tries.....


Available serial ports found: COM6
Opening COM6 @ 115200baud ...
SET TARGET: TO:123
Moteino: [Start wireless gateway...]FAIL: target set error, exiting...
Opening COM6 @ 115200baud ...
SET TARGET: TO:123
Moteino: [TO:123:OK]
TARGET SET OK
FLX?
Moteino: [FLX?NOK]
HANDSHAKE FAIL [TIMEOUT]: FLX?NOK
FAIL: No response from Moteino Target, is Target listening on same Freq/NetworkID & OTA enabled?

jamacaulay

#3
You know what.....  it was something really stupid as I suspected.  Thanks for the sounding board.
I forgot to comment out the   #define FREQUENCY_EXACT 916000000 line. It's always something simple.   ::)