Sensebender GW no output on serial



  • After being away for almost one year. I picked up some of my stuff lying around in my cellar 🙂 Part of that is a Sensebender Gateway which is supposed to replace my current ATMega Gateway. However, I have a really strange behavior (Arduino 1.8.5):

    • Uploaded Gateway5100 code -> I can see in my OpenHab controller that it works
    • However, I cannot see any output from serial.println. - I tried other MySensor sketches, like SecurityPersonalizer -> doesn't work

    I tried it with some of the basic Arduino sketches where no MySensor code is involved: This works.

    I tried a re-install of Arduino, also deleting everything under /Users/tom/Library/Arduino15 and installed the boards (MySensors SAMD Boards 1.05) again.

    I am really stuck. Any ideas are highly appreciated.


  • Mod

    what mysensors version are you using?



  • Version 2.1.1



  • Ok. I have some new findings. Serial.print works after I sent a couple of thousands. Here is some code (not nice, but anyway...)

    This will not print anything in the Serial Monitor:

    #define MY_CORE_ONLY
    
    #include <MySensors.h>
    
    int i = 0;
    void setup()
    {
        Serial.begin(9600);
        for (; i< 10000; i++) {
          Serial.println(i);
        }
        
    
    }
    
    void loop()
    {
        if (i < 150000) {
          i = 200000;
          Serial.println("Started clearing. Please wait...");
    
          Serial.println("Clearing done.");
        }
    
    }
    

    Changing the loop end in the for loop in setup to 50000 for example, Serial.prints show up.



  • Ok, now I think I have a workaround...The sketch SecurityPersonalizer gave me the right hint. I need to extend the waiting time in setup. If I extend it to around 10secs it seems to work.

    void setup()
    {
        unsigned long enter = hwMillis();
        while (hwMillis() - enter < (unsigned long)10000);
        Serial.begin(115200);
        Serial.println("here you go");
    }
    

 

Suggested Topics

254
Online

7.6k
Users

8.5k
Topics

91.2k
Posts