WirelessProgramming OTA Programmer sketch compile errors [solved]

Started by yo_ice2005, November 27, 2016, 02:22:16 PM

yo_ice2005

Hello,

I am new into this and I am trying to use the wireless programming feature (my experience was mostly with RaspberryPI but I am trying to use Moteino for a new project).
The issues I have is when I try to compile the WirelessProgramming_OTA\Programmer sketch for my Moteino board. I am a able to load the sketches by USB, but I said to also try the wireless.

Also I have some questions related to this wireless programming feature:
- do you need 2 moteinos in order to do the wireless programming? I am assuming that I need only 1 and the FTDI connected to my USB in order for the COM port to be detected and be able to write.
My Moteino has the flash chip and the transmitter soldered in.
- Can I use only the windows app and don't push the code using the python library? The video tutorial for wireless programming is a little out to date as the file names changed over time.
- What is the difference between the Programmer and Target folders that I find in the RFM69/Examples/WirelessProgramming_OTA?

The errors I get are:

C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\RFM69\RFM69_OTA.cpp: In function 'void HandleHandshakeACK(RFM69, SPIFlash, uint8_t)':

C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\RFM69\RFM69_OTA.cpp:80:16: error: 'class SPIFlash' has no member named 'initialize'

     if (!flash.initialize())

                ^

C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\RFM69\RFM69_OTA.cpp: In function 'uint8_t HandleWirelessHEXData(RFM69, uint8_t, SPIFlash, uint8_t, uint8_t)':

C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\RFM69\RFM69_OTA.cpp:124:9: error: 'class SPIFlash' has no member named 'blockErase32K'

   flash.blockErase32K(0);

         ^

C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\RFM69\RFM69_OTA.cpp:125:9: error: 'class SPIFlash' has no member named 'writeBytes'

   flash.writeBytes(0,"FLXIMG:", 7);

         ^

C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\RFM69\RFM69_OTA.cpp:174:50: error: 'class SPIFlash' has no member named 'blockErase32K'

                 if (bytesFlashed%32768==0) flash.blockErase32K(bytesFlashed);//erase subsequent 32K blocks (possible in case of atmega1284p)

                                                  ^

Using library RFM69 in folder: C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\RFM69 (legacy)
Using library SPIFlash at version 2.5.0 in folder: C:\Users\ciuma\OneDrive\Documents\Arduino\libraries\libraries\SPIFlash
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
exit status 1

Any input is greatly appreciated!

Catalin

Felix

Salut Catalin,
You need to ensure you have the latest RFM69, SPIFlash libraries installed. The CI built makes sure that any commits can build successfully so you should have no issues if the libs can be found by the Arduino IDE.

yo_ice2005

#2
Salut Felix,

Thank you for your input, but I am still not able to compile that WirelessProgramming_OTA\Programmer sketch. I've reinstalled the libraries, but still no luck.
Maybe somebody can confirm that I am not missing smth:
- got RFM69 library from https://github.com/LowPowerLab/RFM69
- got WirelessHEX69 library from https://github.com/LowPowerLab/WirelessProgramming/tree/master/WirelessHEX69
- got SPIFlash library from https://github.com/LowPowerLab/SPIFlash

To readd the libraries:
1) I've closed Arduino IDE (version 1.6.13) , deleted the folders from libraries
2) Open the Arduino IDE, check the Manage libraries menu and could not find the RFM69, SPIFLASH..
3) Close the Arduino IDE and copy the above folders in libraries
4) Open the Arduino IDE, open Mange libraries and I found the RFM69,SPIFlash installed (I did not have to reinstall them though)

See some pictures from my setup.

Last question: is the WirelessProgramming_OTA\Programmer the sketch that I have to upload first on the board in order to receive the future wireless programs?

Catalin

Felix

Quote from: yo_ice2005 on December 01, 2016, 08:19:20 AM
- got WirelessHEX69 library from https://github.com/LowPowerLab/WirelessProgramming/tree/master/WirelessHEX69
That is your problem. Do NOT get that library since that was merged into RFM69 already.
You only need RFM69 and SPIFlash.
Please always check the header of the sketch to ensure you have all the needed libraries. I put the link next to each library in each sketch.
Recently I moved/merged the WirelessHEX69.h into RFM69_OTA.h so it's already available that way. THis could change again but for now it's part of the RFM69 library, you just need to call:

#include <RFM69_OTA.h>

yo_ice2005

Thank you Felix! That was the issue, I was installing the RFM69 library over the one I manually copied over...