RFM69 gateway on Arduino Nano

Hi,

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:

[env:atmega328p]
platform = ${com.atmelavr_platform}
board = ATmega328
board_build.mcu = atmega328p
board_build.f_cpu = 16000000L
board_hardware.uart = no_bootloader
lib_deps =
${com-arduino.lib_deps}
${libraries.rfm69}
${libraries.rfm69_low-power}
build_flags =
${com-arduino-low-memory.build_flags}
‘-DGateway_Name=“rfm69”’
‘-DBase_Topic=“rfm69/”’
‘-DZgatewayRFM69=“RFM69”’
‘-UZmqttDiscovery=“HADiscovery”’
‘-DDISABLE_LOGGING’

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:

‘-DNetworkAdvancedSetup=true’
‘-DNET_IP=“192.168.100.40”’
‘-DNET_MASK=“255.255.255.0”’
‘-DNET_GW=“192.168.100.111”’
‘-DNET_DNS=“192.168.100.15”’

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]}’
ip.fromString(NET_IP);
^~~~~~~~~~
main.ino:1916:3: error: ‘gateway’ was not declared in this scope
gateway.fromString(NET_GW);
^~~~~~~
main.ino:1917:3: error: ‘subnet’ was not declared in this scope
subnet.fromString(NET_MASK);
^~~~~~
main.ino:1917:3: note: suggested alternative: ‘signed’
subnet.fromString(NET_MASK);
^~~~~~
signed
main.ino:1918:3: error: ‘Dns’ was not declared in this scope
Dns.fromString(NET_DNS);
^~~

Any help would be appreciated.

Thanks

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

Thanks

Hello,

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.

Thanks

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.