Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. [SOLVED] Gateway with signing = low memory

[SOLVED] Gateway with signing = low memory

Scheduled Pinned Locked Moved Troubleshooting
10 Posts 4 Posters 1.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SnyfirS Offline
    SnyfirS Offline
    Snyfir
    wrote on last edited by Yveaux
    #1

    Hi,
    I use MySensors V2.3.1 in an arduino nano has gateway.
    my code is

    #define MY_RADIO_RF24
    #define MY_GATEWAY_SERIAL
    #define MY_SIGNING_ATSHA204
    
    #include <MySensors.h>
    
    void setup()
    {
    }
    
    void presentation()
    {
    }
    
    void loop()
    {
    	delay(10);
    }
    

    but when i upload with arduino IDE i have a warning message: "Low memory available, stability problems may occur"

    how can i solve this issue ?

    thank you for your help

    mfalkviddM 1 Reply Last reply
    0
    • SnyfirS Snyfir

      Hi,
      I use MySensors V2.3.1 in an arduino nano has gateway.
      my code is

      #define MY_RADIO_RF24
      #define MY_GATEWAY_SERIAL
      #define MY_SIGNING_ATSHA204
      
      #include <MySensors.h>
      
      void setup()
      {
      }
      
      void presentation()
      {
      }
      
      void loop()
      {
      	delay(10);
      }
      

      but when i upload with arduino IDE i have a warning message: "Low memory available, stability problems may occur"

      how can i solve this issue ?

      thank you for your help

      mfalkviddM Online
      mfalkviddM Online
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      @snyfir use hardware signing or use an Arduino with more memory.
      Edit: sorry, I see you are already using hardware signing.

      SnyfirS 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @snyfir use hardware signing or use an Arduino with more memory.
        Edit: sorry, I see you are already using hardware signing.

        SnyfirS Offline
        SnyfirS Offline
        Snyfir
        wrote on last edited by Snyfir
        #3

        @mfalkvidd said in Gateway with signing = low memory:

        @snyfir use hardware signing or use an Arduino with more memory.

        MY_SIGNING_ATSHA204 is not hardware signing ? i have connected an ATSHA204 to the arduino pin.

        mfalkviddM 1 Reply Last reply
        0
        • SnyfirS Snyfir

          @mfalkvidd said in Gateway with signing = low memory:

          @snyfir use hardware signing or use an Arduino with more memory.

          MY_SIGNING_ATSHA204 is not hardware signing ? i have connected an ATSHA204 to the arduino pin.

          mfalkviddM Online
          mfalkviddM Online
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @snyfir sorry, I see you are already using hardware signing.

          SnyfirS 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @snyfir sorry, I see you are already using hardware signing.

            SnyfirS Offline
            SnyfirS Offline
            Snyfir
            wrote on last edited by
            #5

            @mfalkvidd
            So my only solution is to use an arduino with more memory ? do you have an exemple of arduino board i can use ?

            mfalkviddM 1 Reply Last reply
            0
            • SnyfirS Snyfir

              @mfalkvidd
              So my only solution is to use an arduino with more memory ? do you have an exemple of arduino board i can use ?

              mfalkviddM Online
              mfalkviddM Online
              mfalkvidd
              Mod
              wrote on last edited by
              #6

              @snyfir what is the full output of the verify step? This is what I get when using your sketch:

              Using library MySensors at version 2.3.2-beta in folder: R:\Documents\Arduino\libraries\MySensors 
              Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI 
              "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Micke\\AppData\\Local\\Temp\\ArduinoBuild/sketch_apr08a.ino.elf"
              Sketch uses 15574 bytes (50%) of program storage space. Maximum is 30720 bytes.
              Global variables use 1026 bytes (50%) of dynamic memory, leaving 1022 bytes for local variables. Maximum is 2048 bytes.
              

              On 2.3.1 I get this:

              Using library MySensors at version 2.3.1 in folder: R:\Documents\Arduino\libraries\MySensors 
              Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI 
              "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Micke\\AppData\\Local\\Temp\\ArduinoBuild/sketch_apr08a.ino.elf"
              Sketch uses 15650 bytes (50%) of program storage space. Maximum is 30720 bytes.
              Global variables use 1022 bytes (49%) of dynamic memory, leaving 1026 bytes for local variables. Maximum is 2048 bytes.
              

              So plenty of ram left.
              You might need to check this in preferences to get useful output
              0_1554732172388_b2bf1cee-a1b9-4095-a8f3-4884ee574c46-image.png

              1 Reply Last reply
              0
              • SnyfirS Offline
                SnyfirS Offline
                Snyfir
                wrote on last edited by
                #7

                I had the same result but when i add the two lines:

                #define MY_RX_MESSAGE_BUFFER_FEATURE
                #define MY_RF24_IRQ_PIN (2)
                

                i have

                Sketch uses 16296 bytes (50%) of program storage space. Maximum is 32256 bytes.
                Global variables use 1693 bytes (82%) of dynamic memory, leaving 355 bytes for local variables. Maximum is 2048 bytes.
                Low memory available, stability problems may occur.
                

                A gateway without MY_RX_MESSAGE_BUFFER_FEATURE defined, can be problematic non ?

                YveauxY 1 Reply Last reply
                0
                • SnyfirS Snyfir

                  I had the same result but when i add the two lines:

                  #define MY_RX_MESSAGE_BUFFER_FEATURE
                  #define MY_RF24_IRQ_PIN (2)
                  

                  i have

                  Sketch uses 16296 bytes (50%) of program storage space. Maximum is 32256 bytes.
                  Global variables use 1693 bytes (82%) of dynamic memory, leaving 355 bytes for local variables. Maximum is 2048 bytes.
                  Low memory available, stability problems may occur.
                  

                  A gateway without MY_RX_MESSAGE_BUFFER_FEATURE defined, can be problematic non ?

                  YveauxY Offline
                  YveauxY Offline
                  Yveaux
                  Mod
                  wrote on last edited by Yveaux
                  #8

                  @snyfir said in Gateway with signing = low memory:

                  MY_RX_MESSAGE_BUFFER_FEATURE

                  It's hard to have it all with an Arduino Nano, but you could try with a smaller receive buffer, by defining

                  #define MY_RX_MESSAGE_BUFFER_SIZE (10)
                  

                  Here it is changed to 10, default is 20, which is rather large.
                  Each buffer entry reserves 33 bytes, so you'll save 330 going back to 10 entries.

                  http://yveaux.blogspot.nl

                  SnyfirS 1 Reply Last reply
                  1
                  • YveauxY Yveaux

                    @snyfir said in Gateway with signing = low memory:

                    MY_RX_MESSAGE_BUFFER_FEATURE

                    It's hard to have it all with an Arduino Nano, but you could try with a smaller receive buffer, by defining

                    #define MY_RX_MESSAGE_BUFFER_SIZE (10)
                    

                    Here it is changed to 10, default is 20, which is rather large.
                    Each buffer entry reserves 33 bytes, so you'll save 330 going back to 10 entries.

                    SnyfirS Offline
                    SnyfirS Offline
                    Snyfir
                    wrote on last edited by
                    #9

                    @yveaux said in Gateway with signing = low memory:

                    #define MY_RX_MESSAGE_BUFFER_SIZE (10)

                    thank you @Yveaux et @mfalkvidd

                    1 Reply Last reply
                    1
                    • alowhumA Offline
                      alowhumA Offline
                      alowhum
                      Plugin Developer
                      wrote on last edited by
                      #10

                      I've created a lot of devices on Arduino Nano's with soft signing. You have to learn how to manage memory, and then it works great.

                      A gateway on a nano with nothing in the code except it being a gateway, that should work fine. I've never seen that error message when I used the SIMPLE SECURITY option.

                      Low memory warning might also not really be a problem in practise. If your sketch is empty, then there may not be much to worry about: there are no functions in your code that suddenly need a lot of memory. The only question then is how much MySensors needs which isn't globally defined. I don't know the answer to that, but someone else might.

                      In the end I'd say: test it. If all seems to work ok, then there's really not a problem.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      18

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular