RFM69 gateway on Arduino Nano


I need some help with RFM69 gateway on Arduino Nano + W5500. My code compiles but it is too big to fit the flash. I get the following error:

Error: The program size (33788 bytes) is greater than maximum allowed (32768 bytes)
RAM: [====== ] 57.8% (used 1183 *** [checkprogsize] Explicit exit, status 1
bytes from 2048 bytes)
Flash: [==========] 103.1% (used 33788 bytes from 32768 bytes)

My _env.ini file is defined:

platform = ${com.atmelavr_platform}
board = ATmega328
board_build.mcu = atmega328p
board_build.f_cpu = 16000000L
board_hardware.uart = no_bootloader
lib_deps =
build_flags =

Any ideas on how to reduce the size? I also tried with nanoatmega328new, but there results are the same as expected. I did try to define static IP by adding the following to .ini file:


but then I can’t compile file. I receive errors:

main.ino:1915:6: error: request for member ‘fromString’ in ‘ip’, which is of non-class type ‘const byte [4] {aka const unsigned char [4]}’
main.ino:1916:3: error: ‘gateway’ was not declared in this scope
main.ino:1917:3: error: ‘subnet’ was not declared in this scope
main.ino:1917:3: note: suggested alternative: ‘signed’
main.ino:1918:3: error: ‘Dns’ was not declared in this scope

Any help would be appreciated.


Any ideas on this? Did anyone successfully managed to run OMG on Arduino Nano with RFM69 and W5500 (or any other ethernet module)?



This is not a configuration we support. Also, we are going to remove the support for the nano on the 1.8.0.
One thing you could do is test with a different Atmel AVR platform and see if the previous one reduced the sketch size.

Thank you. Do you have a recommended platform to use for OMG with RFM69 and ethernet interface? I ordered a W32-ETH01 and will try with that one. Other Atmel platforms are too big, I need something as small as possible to fit in my current case.


Not really unfortunately.
What makes you choose RFM69 over a LoRa module?

I’ve gone with RFM69 over LoRa purely for cost reasons. I need to build a sensor network of 50 - 60 nodes and price of RFM69 is half of LoRa. Taking the number of nodes, it sums up to a significant amount. And in terms of range, RFM69 works great for me, no issues with signal at all. So there is no benefit for me to use LoRa. I’ll try with W32-ETH01 and see if that works. I do have a working setup with mysensors, and it works great. However, I would prefer to use OMG purely for future proof reasons as mysensors doesn’t seem to be developed anymore, last version was out 4 years ago.

Thanks a lot for your help.