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.7k 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...

    Y 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...

      Y Offline
      Y 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
      • H Offline
        H 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.

          Y 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.

            Y Offline
            Y 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

            O 1 Reply Last reply
            0
            • Y 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!

              O Offline
              O 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?

              Y 1 Reply Last reply
              0
              • O 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?

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

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

                http://yveaux.blogspot.nl

                O 1 Reply Last reply
                0
                • Y Yveaux

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

                  O Offline
                  O 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

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  18

                  Online

                  12.0k

                  Users

                  11.2k

                  Topics

                  113.4k

                  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