Author Topic: OTA (2nd) attemp failed  (Read 4139 times)

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
OTA (2nd) attemp failed
« on: July 09, 2017, 02:41:43 PM »
I now have a dedicated Moteino as an OTA programmer but I'm still unsuccessful.  After many attempts I decided to take 2 Moteino's and load them with the Programmer and Target sketches located on Felix's Github page; https://github.com/LowPowerLab/RFM69/tree/master/Examples/WirelessProgramming_OTA with no luck.  Below are the errors I'm getting.  Any help would be greatly appreciated..  Thanks

Edit: Radios being used are RFM69HW so I didn't have to change anything in Felix's example sketches.
« Last Edit: July 09, 2017, 02:52:38 PM by sparky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: OTA (2nd) attemp failed
« Reply #1 on: July 11, 2017, 10:14:02 AM »
sparky,
Sorry for the late reply, everything should work as long as all the required parts/code and settings are in place.
Make sure you got the 4mbit on the target and match the RF settings and the target ID.
The target should be actively listening (RX mode) and have the checkforwirelesshex() call after receiveDone() returns true.
Make sure you are using RFM69_OTA and the latest library sources.

The messages in the first screenshot suggests the com port takes too long to reset the board before attempting to talk to it.
The second GUI suggests the target is not responding.

Not sure what else to suggest at this point.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: OTA (2nd) attemp failed
« Reply #2 on: July 11, 2017, 10:38:18 AM »
Thanks for the reply..

I was expecting your target and programmer examples to work "out of the box"  Other than network ID, Frequency, or node ID that is

The 4mbit was not changed in your example;

Code: [Select]
//*****************************************************************************************************************************
// flash(SPI_CS, MANUFACTURER_ID)
// SPI_CS          - CS pin attached to SPI flash chip (8 in case of Moteino)
// MANUFACTURER_ID - OPTIONAL, 0x1F44 for adesto(ex atmel) 4mbit flash
//                             0xEF30 for windbond 4mbit flash
//                             0xEF40 for windbond 16/64mbit flash
//*****************************************************************************************************************************
SPIFlash flash(FLASH_SS, 0xEF30); //EF30 for windbond 4mbit flash

As mentioned in the OP, nothing was changed from your example sketches.
« Last Edit: July 11, 2017, 12:20:45 PM by sparky »

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: OTA (2nd) attemp failed
« Reply #3 on: July 11, 2017, 11:49:45 AM »
Felix,

I found the issue and it works like a charm!

I don't know how many times I looked over the sketch and never thought anything was wrong with the following line;

#define FREQUENCY_EXACT 916000000   

After it was changed it worked GREAT!  I guess it was so close to what it should have been that I didn't catch it.

Thanks for your input, again!  :)
« Last Edit: July 11, 2017, 05:02:45 PM by sparky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: OTA (2nd) attemp failed
« Reply #4 on: July 11, 2017, 01:46:53 PM »
Doh, I missed adding that line in the target as well!
Nobody else had an issue though so I never had a chance to change this.
I just added the line in the target sketch.
Thanks for the follow up, glad you have it working.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: OTA (2nd) attemp failed
« Reply #5 on: July 13, 2017, 09:45:41 AM »
The only way I can get this to work is changing;

#define FREQUENCY_EXACT 916000000 to #define FREQUENCY_EXACT 915000000     

Leaving it at 916 I keep getting the same errors as posted above.

Nothing else was changed and I'm using the latest library's

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: OTA (2nd) attemp failed
« Reply #6 on: July 13, 2017, 09:59:46 AM »
Both the units have to work on the same frequency.
The FREQUENCY_EXACT is used to set the frequency to something specific other than the default 433/915 etc.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: OTA (2nd) attemp failed
« Reply #7 on: July 15, 2017, 11:47:57 AM »
Yes, I understand.. 

What I'm saying is setting the programmer and the target node to;

#define FREQUENCY_EXACT 916000000

and under void setup() I entered;

#ifdef FREQUENCY_EXACT
  radio.setFrequency(FREQUENCY_EXACT); //set frequency to some custom frequency
#endif

I get the errors attached below.

I then change the programmer to #define FREQUENCY_EXACT 915000000

and on the target I comment out both;

//#define FREQUENCY_EXACT 916000000 and;

//#ifdef FREQUENCY_EXACT
//  radio.setFrequency(FREQUENCY_EXACT); //set frequency to some custom frequency
//#endif

and it works great

Any tips or suggestions would be appreciated!

Edit: I also tried #define FREQUENCY_EXACT 917000000 with no luck.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: OTA (2nd) attemp failed
« Reply #8 on: July 17, 2017, 10:09:07 AM »
Just tried this again, and worked in first attempt, both with the .py script and without.


sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: OTA (2nd) attemp failed
« Reply #9 on: July 17, 2017, 02:51:38 PM »
Felix,

I never doubted you could get it to work..  The issue is I can't with the default settings in your examples.  Thought I could get some tips/suggestions as mentioned above as to what I might be doing wrong or possibly too high/low RSSI signal or whatever else might cause it not to work.  Apparently not.  thanks
« Last Edit: July 17, 2017, 03:12:10 PM by sparky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: OTA (2nd) attemp failed
« Reply #10 on: July 17, 2017, 03:23:30 PM »
I could think of too many reasons why it would not work. Usually the simple checklist of settings solves the problem, and I think you already did that but ... its very strange that both work at 915mhz and stop working when set to 916mhz, makes no sense, something else must be set somewhere that causes this.
It's usually something very simple that is overlooked. Please check everything hardware and firmware wise and try again.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: OTA (2nd) attemp failed
« Reply #11 on: July 17, 2017, 03:28:11 PM »
Reading another thread I read that this statement CheckForWirelessHEX(radio, flash, false); should be true but in the target sketch you have false as shown above.  What should it be, true or false?
Here is the thread where I read it:
https://lowpowerlab.com/forum/wireless-programming-(aka-ota)/can't-get-ota-aka-wireless-programming-to-work/msg18137/#msg18137


Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: OTA (2nd) attemp failed
« Reply #12 on: July 17, 2017, 03:37:08 PM »
That's the debug parameter, puts out verbose serial output when true, useful when debugging the OTA library.
I would use false in a real sketch.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: OTA (2nd) attemp failed
« Reply #13 on: July 17, 2017, 03:43:00 PM »
Ok, thanks

My nodes RSSI range from 45 - 70

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: OTA (2nd) attemp failed
« Reply #14 on: July 17, 2017, 03:45:37 PM »
Good, that's a very strong signal.