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. MQTT Gateway to Sensor communication problem

MQTT Gateway to Sensor communication problem

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 3 Posters 1.6k Views 1 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.
  • B Offline
    B Offline
    Brian787
    wrote on last edited by
    #1

    I have an Arduino UNO with W5100 Ethernet Shield and NRF24L01+ configured as a MQTT Gateway and I can communicate with the MQTT Broker. However, I cannot communicate (via the radio) with a humidity sensor.

    Debugging is turned on in MyConfig.h
    I have tried multiple NRF24L01+
    I have tried powering the gateway NRF24L01+ from another arduino uno (just using it as a power supply and connecting the grounds of the 2 boards).
    I suspect I have a mismatch between the wiring and the software, but I am new to this and nothing I have found by searching the forums as led me to a solution.
    Please help.


    For the MQTT Gateway,
    The NRF24L01+ is wired through the Ethernet shield to the UNO as follows:
    GND to GND
    VCC to 3V3
    CE to 5
    CSN to 6
    MOSI to A1
    MISO to A2
    SCK to A0
    IRQ not connected


    The defines in MQTTGateway.ino are as follows:
    #define RADIO_CE_PIN 5 // radio chip enable
    #define RADIO_SPI_SS_PIN 6 // radio SPI serial select
    #define RADIO_ERROR_LED_PIN A2 // Error led pin
    #define RADIO_RX_LED_PIN A1 // Receive led pin
    #define RADIO_TX_LED_PIN A0 // the PCB, on board LED */


    The relevant parts in RF24_config.h as follows:
    #define SOFTSPI // Requires library from https://github.com/greiman/DigitalIO
    const uint8_t SOFT_SPI_MISO_PIN = 16;
    const uint8_t SOFT_SPI_MOSI_PIN = 15;
    const uint8_t SOFT_SPI_SCK_PIN = 14;


    When I start the gateway, I get the following output:

    Started!
    0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
    0;0;3;0;9;version mismatch
    0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
    0;0;3;0;9;version mismatch
    0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
    0;0;3;0;9;version mismatch


    When I start a humidity sensor which is wired (triple checked) and programmed per the instructions, I get the following serial output:

    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    sensor started, id 255
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    T: 20.00
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    H: 34.00


    B 1 Reply Last reply
    0
    • B Brian787

      I have an Arduino UNO with W5100 Ethernet Shield and NRF24L01+ configured as a MQTT Gateway and I can communicate with the MQTT Broker. However, I cannot communicate (via the radio) with a humidity sensor.

      Debugging is turned on in MyConfig.h
      I have tried multiple NRF24L01+
      I have tried powering the gateway NRF24L01+ from another arduino uno (just using it as a power supply and connecting the grounds of the 2 boards).
      I suspect I have a mismatch between the wiring and the software, but I am new to this and nothing I have found by searching the forums as led me to a solution.
      Please help.


      For the MQTT Gateway,
      The NRF24L01+ is wired through the Ethernet shield to the UNO as follows:
      GND to GND
      VCC to 3V3
      CE to 5
      CSN to 6
      MOSI to A1
      MISO to A2
      SCK to A0
      IRQ not connected


      The defines in MQTTGateway.ino are as follows:
      #define RADIO_CE_PIN 5 // radio chip enable
      #define RADIO_SPI_SS_PIN 6 // radio SPI serial select
      #define RADIO_ERROR_LED_PIN A2 // Error led pin
      #define RADIO_RX_LED_PIN A1 // Receive led pin
      #define RADIO_TX_LED_PIN A0 // the PCB, on board LED */


      The relevant parts in RF24_config.h as follows:
      #define SOFTSPI // Requires library from https://github.com/greiman/DigitalIO
      const uint8_t SOFT_SPI_MISO_PIN = 16;
      const uint8_t SOFT_SPI_MOSI_PIN = 15;
      const uint8_t SOFT_SPI_SCK_PIN = 14;


      When I start the gateway, I get the following output:

      Started!
      0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
      0;0;3;0;9;version mismatch
      0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
      0;0;3;0;9;version mismatch
      0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
      0;0;3;0;9;version mismatch


      When I start a humidity sensor which is wired (triple checked) and programmed per the instructions, I get the following serial output:

      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      sensor started, id 255
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      T: 20.00
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      H: 34.00


      B Offline
      B Offline
      boozz
      wrote on last edited by
      #2

      @Brian787
      If I were you I would check if you have the nrf24l01+version. I got some nrf24l01 radio's via Alice (although Alice sells them as nrf24l01+) and experience the same problem. Look at the square chip on the radio module. It should have the +sign on it!

      My problem with the gateway is solved once I exchanged the non-plus version with a plus version.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mbj
        wrote on last edited by mbj
        #3

        What version are you using. The current MQTT gateway code states:

        #define RADIO_CE_PIN 5 // radio chip enable
        #define RADIO_SPI_SS_PIN 6 // radio SPI serial select
        #define RADIO_ERROR_LED_PIN 7 // Error led pin
        #define RADIO_RX_LED_PIN 8 // Receive led pin
        #define RADIO_TX_LED_PIN 9 // the PCB, on board LED*/

        This works for me (sorry for the large font size, came from cut-and-paste from the Arduino code and I have found no way of changing it.)

        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


        13

        Online

        12.1k

        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