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. Bug Reports
  3. ESP8266: MCU seems to be busy with the WiFi and stops receiving messages from NRF24

ESP8266: MCU seems to be busy with the WiFi and stops receiving messages from NRF24

Scheduled Pinned Locked Moved Bug Reports
8 Posts 4 Posters 3.0k Views
  • 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.
  • nikil511N Offline
    nikil511N Offline
    nikil511
    wrote on last edited by nikil511
    #1

    Hello everyone,
    I am using ESP8266 to forward data to the cloud, as described here:
    http://forum.mysensors.org/topic/1973/esp8266-as-wifi-gateway-controller-node/

    My problem is that if I trigger the HTTP post from function incomingMessage() it seems the MCU is busy with the WiFi and it stops receiving messages from nRF. The first, second msg are handled then the others get a fail status. Any advice on how to handle this ? is there a more proper way than what i am doing?
    or is it normal, hence I should manually buffer the messages and do the http post later ?

    Thanks!

    here is my code:

    void incomingMessage(const MyMessage & message) {
    
      Serial.print("Sensor:");
      serial(PSTR("%d;%d;%d;%d;%d;%s\n"), message.sender, message.sensor, mGetCommand(message), mGetAck(message), message.type, message.getString(convBuf));
    
      if (message.type == V_TEMP) {
        sendStrXY(message.getString(convBuf), 3, 10);
      //  thingspeak("3", message.getString(convBuf));
      }
      else if (message.type == V_HUM) {
        sendStrXY(message.getString(convBuf), 4, 10);
      //  thingspeak("4" , message.getString(convBuf));
      }
    
      else if (message.type == V_PRESSURE) {
        sendStrXY(message.getString(convBuf), 5, 10);
      //  thingspeak("5", message.getString(convBuf));
      }
    
      else if (message.type == V_WIND) {
        sendStrXY(message.getString(convBuf), 6, 5);
       // thingspeak("6", message.getString(convBuf));
      }
    
        else if (message.type == V_RAINRATE) {
        sendStrXY(message.getString(convBuf), 6, 12);
      //  thingspeak("7", message.getString(convBuf));
      }
    
      else if (message.type == V_VAR1) {
       // sendStrXY(message.getString(convBuf), 7, 0);
       // thingspeak("8", message.getString(convBuf));
      }
    
        else if (message.type == V_VAR2) {
       // sendStrXY(message.getString(convBuf), 7, 5);
       // thingspeak("8", message.getString(convBuf));
      }
    
        else if (message.type == V_VAR3) {
       // sendStrXY(message.getString(convBuf), 7, 10);
       // thingspeak("8", message.getString(convBuf));
      }
    
    
    

    thingspeak function does a WiFiClient print to url...

    YveauxY 1 Reply Last reply
    0
    • nikil511N nikil511

      Hello everyone,
      I am using ESP8266 to forward data to the cloud, as described here:
      http://forum.mysensors.org/topic/1973/esp8266-as-wifi-gateway-controller-node/

      My problem is that if I trigger the HTTP post from function incomingMessage() it seems the MCU is busy with the WiFi and it stops receiving messages from nRF. The first, second msg are handled then the others get a fail status. Any advice on how to handle this ? is there a more proper way than what i am doing?
      or is it normal, hence I should manually buffer the messages and do the http post later ?

      Thanks!

      here is my code:

      void incomingMessage(const MyMessage & message) {
      
        Serial.print("Sensor:");
        serial(PSTR("%d;%d;%d;%d;%d;%s\n"), message.sender, message.sensor, mGetCommand(message), mGetAck(message), message.type, message.getString(convBuf));
      
        if (message.type == V_TEMP) {
          sendStrXY(message.getString(convBuf), 3, 10);
        //  thingspeak("3", message.getString(convBuf));
        }
        else if (message.type == V_HUM) {
          sendStrXY(message.getString(convBuf), 4, 10);
        //  thingspeak("4" , message.getString(convBuf));
        }
      
        else if (message.type == V_PRESSURE) {
          sendStrXY(message.getString(convBuf), 5, 10);
        //  thingspeak("5", message.getString(convBuf));
        }
      
        else if (message.type == V_WIND) {
          sendStrXY(message.getString(convBuf), 6, 5);
         // thingspeak("6", message.getString(convBuf));
        }
      
          else if (message.type == V_RAINRATE) {
          sendStrXY(message.getString(convBuf), 6, 12);
        //  thingspeak("7", message.getString(convBuf));
        }
      
        else if (message.type == V_VAR1) {
         // sendStrXY(message.getString(convBuf), 7, 0);
         // thingspeak("8", message.getString(convBuf));
        }
      
          else if (message.type == V_VAR2) {
         // sendStrXY(message.getString(convBuf), 7, 5);
         // thingspeak("8", message.getString(convBuf));
        }
      
          else if (message.type == V_VAR3) {
         // sendStrXY(message.getString(convBuf), 7, 10);
         // thingspeak("8", message.getString(convBuf));
        }
      
      
      

      thingspeak function does a WiFiClient print to url...

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

      @nikil511 I think fail is reported when hardware ack is not received. @hek is this correct?
      If this is the case, ESP is not involved at all...
      Maybe interference between ESP & nRF?

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #3

        @Yveaux said:

        I think fail is reported when hardware ack is not received.

        Yes, correct.

        1 Reply Last reply
        0
        • nikil511N Offline
          nikil511N Offline
          nikil511
          wrote on last edited by nikil511
          #4

          so can the GW nRF receive and aknowledge if the GW MCU is busy doing something else ?

          eitherway I will update to latest dev branch, test again with modules on different locations and come back.

          YveauxY 1 Reply Last reply
          0
          • nikil511N nikil511

            so can the GW nRF receive and aknowledge if the GW MCU is busy doing something else ?

            eitherway I will update to latest dev branch, test again with modules on different locations and come back.

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

            @nikil511 said:

            so can the GW nRF receive and aknowledge if the GW MCU is busy doing something else ?

            Yes! You've built yourself a multi-core system!

            http://yveaux.blogspot.nl

            OitzuO 1 Reply Last reply
            0
            • YveauxY Yveaux

              @nikil511 said:

              so can the GW nRF receive and aknowledge if the GW MCU is busy doing something else ?

              Yes! You've built yourself a multi-core system!

              OitzuO Offline
              OitzuO Offline
              Oitzu
              wrote on last edited by Oitzu
              #6

              @Yveaux said:

              @nikil511 said:

              so can the GW nRF receive and aknowledge if the GW MCU is busy doing something else ?

              Yes! You've built yourself a multi-core system!

              Correct me if i'm wrong but isn't the ack handled in the nrf24l01+ hardware and therefore a busy mcu shouldn't be a problem?

              YveauxY 1 Reply Last reply
              0
              • OitzuO Oitzu

                @Yveaux said:

                @nikil511 said:

                so can the GW nRF receive and aknowledge if the GW MCU is busy doing something else ?

                Yes! You've built yourself a multi-core system!

                Correct me if i'm wrong but isn't the ack handled in the nrf24l01+ hardware and therefore a busy mcu shouldn't be a problem?

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

                @Oitzu isn't that the same as I'm saying?

                http://yveaux.blogspot.nl

                OitzuO 1 Reply Last reply
                0
                • YveauxY Yveaux

                  @Oitzu isn't that the same as I'm saying?

                  OitzuO Offline
                  OitzuO Offline
                  Oitzu
                  wrote on last edited by
                  #8

                  @Yveaux said:

                  @Oitzu isn't that the same as I'm saying?

                  Yes... i misread your post in a way that you suggest he needs to built a multicore system to achive that... i'm sorry. :/

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


                  12

                  Online

                  11.7k

                  Users

                  11.2k

                  Topics

                  113.1k

                  Posts


                  Copyright 2025 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