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. "Check Wires!!!" - N00B needs some help (please)

"Check Wires!!!" - N00B needs some help (please)

Scheduled Pinned Locked Moved Troubleshooting
n00b
12 Posts 6 Posters 4.1k 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.
  • Dan S.D Offline
    Dan S.D Offline
    Dan S.
    Hero Member
    wrote on last edited by
    #3

    You should only need softspi with something like the ethernet gateway as described here: http://www.mysensors.org/build/ethernet_gateway#wiring-things-up

    It requires different radio connections in this case so as not to interfere with the ethernet module.

    You should not be using softspi with the sensor setup. If you have a check wires message you probably have a radio power problem (did you try a capacitor across the ground/power connections of the radio). Your power supply may not be strong enough to meet the peak power requirements of the radio. Or lastly, the wires are not hooked up properly. Would definitely recommend you not use softspi on the sensor side.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Squint
      wrote on last edited by
      #4

      @hek Thank you for the response.

      I've properly enabled the softspi now and updated the power as you mentioned, the gateway seems to now be working, or at least its reporting "Started!" and I can ping / telnet to the MQTT server.

      Now I am working on a distance sensor as my first sensor. It too says its working, and I see the V_DISTANCE value's being spit out at the serial console on the sensor itself, but It doesn't appear that the gateway is receiving any of the data.

      In order to get the sensor working I've had to change the Bit Rate to 2MB as per the thread here:
      http://forum.mysensors.org/topic/728/radio-setup-give-check-wires/30

      I changed the bitrate in the MyConfig.h
      #define RF24_DATARATE RF24_2MBPS

      If I do this, does this change the bitrate for the MQTT gateway as well? or is there somewhere else I would need to change it?
      I've grep'd the code for RF24_2MBPS and cant seem to find anywhere else..

      If they are both running at 2MB, they should be talking to each other.. correct?

      Thank you in advance and sorry for the long post.

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

        Yes, same speed on all devices is needed.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Squint
          wrote on last edited by
          #6

          OK - I have it all worked out!!!

          For the N00BS who would like to not have to spend 3 days reverse engineering the code.. Here are some key tidbits that I couldn't find documented anywhere..

          1: Enable on the gateway for MqTT or Ethernet GW

          To do this you need to uncomment the line below in utility/RF24_config.h:

          //#define SOFTSPI   // Requires library from https://github.com/greiman/DigitalIO
          

          You only uncomment this line, DO NOT UNCOMMENT SPI_UART as well ( This caused me a days worth of trying to work out what I did wrong )

          IMPORTANT: This file effects the entire library, so if you enable this it effects your sensors as well.

          2: Wire for SOFTSPI
          Because you've now just enabled SOFTSPI, you need to wire your project accordingly. The default wiring diagrams that are noted everywhere are not valid anymore..

          the code is now using the following changes:

           //These are default, but you can change them if you like:
           const uint8_t SOFT_SPI_MISO_PIN = 16;
           const uint8_t SOFT_SPI_MOSI_PIN = 15;
           const uint8_t SOFT_SPI_SCK_PIN = 14;
           const uint8_t SPI_MODE = 0;
          

          3: Validate your radios

          The best thing to do once you've wired up your radios is to dump out the config. This will allow you to validate the wiring is correct and let you know if you've done anything wrong.

          The best way to do this is to add a RF24::printDetails(); line into MySensors.cpp like this:

          open the MySensors.cpp file and locate the line that looks like this:

           MySensor::setupRadio(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataRate)
          

          at the bottom of the block add RF24::printDetails(); like this:

          void MySensor::setupRadio(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataRate) {
              failedTransmissions = 0;
          
              // Start up the radio library
              RF24::begin();
          
              if (!RF24::isPVariant()) {
                      debug(PSTR("check wires\n"));
                      while(1);
              }
              RF24::setAutoAck(1);
              RF24::setAutoAck(BROADCAST_PIPE,false); // Turn off auto ack for broadcast
              RF24::enableAckPayload();
              RF24::setChannel(channel);
              RF24::setPALevel(paLevel);
              RF24::setDataRate(dataRate);
              RF24::setRetries(5,15);
              RF24::setCRCLength(RF24_CRC_16);
              RF24::enableDynamicPayloads();
          
              // All nodes listen to broadcast pipe (for FIND_PARENT_RESPONSE messages)
              RF24::openReadingPipe(BROADCAST_PIPE, TO_ADDR(BROADCAST_ADDRESS));
              RF24::printDetails();
          }
          

          If the output shows all 0's or all FF's, then your wiring is in-correct and the radio is not initializing correctly.

          4: You've done all this, but you're still receiving an error check wires:

          This either means you've not initialized the board correctly and the wiring is still incorrect OR you have a non-Plus radio ( RF24L01 vs RF24L01+ )
          To check this, comment out the while(1) line in the MySensors.cpp file like this:

              if (!RF24::isPVariant()) {
                      debug(PSTR("check wires\n"));
                      //while(1);
              }
          

          This will alow the initialization to proceed if the device is not a plus version, this way the printDetails() code you've added will be triggered and you can continue to investigate.

          IMPORTANT NOTE:

          The printDetails() output will only show that you have a plus version of the radio if its wired correct and is initializing. If its not initialized, it will not show the proper version of the radio. I had this and spend a day updating code to support a different data rate when it was un-necessary.

          Hopefully this is helpful information and thank you everyone who chipped in some info to giude me to these conclusions..

          Admins: I would highly recommend you guys explain the SOFTSPI bits within the documentation for the Ethernet/MqTT gateways - If it was documented well I think i would have had a lot less trouble. Just my 2 cents. :)

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

            The ethernet build page describes how to use SoftSPI (with a reference from MQTT page). Please clarify what is missing.

            http://www.mysensors.org/build/ethernet_gateway

            S 1 Reply Last reply
            0
            • hekH hek

              The ethernet build page describes how to use SoftSPI (with a reference from MQTT page). Please clarify what is missing.

              http://www.mysensors.org/build/ethernet_gateway

              S Offline
              S Offline
              Squint
              wrote on last edited by
              #8

              @hek Its missing the note that once you enable SOFTSPI the default sensor documentation is wrong, and that you either need to maintain two versions of the MySensors library or wire your radio the same as the gateway. My issue was that I wired the sensors the same as the documentation in the sensors docs and it doesnt work because SOFTSPI is enabled.

              Alternatively, there should be a IS_GATEWAY defined for gateway code that enables SOFTSPI by default or move the SOFTSPI definition into the gateway code , then the documentation could in fact be correct.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mainali
                wrote on last edited by
                #9

                @Squint said:

                //These are default, but you can change them if you like:
                const uint8_t SOFT_SPI_MISO_PIN = 16;
                const uint8_t SOFT_SPI_MOSI_PIN = 15;
                const uint8_t SOFT_SPI_SCK_PIN = 14;
                const uint8_t SPI_MODE = 0;

                Can you explain which are the corresponding pin for an arduino UNO. An image would help noobs like me who have spend almost a week to make this work.

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

                  A0 = 14
                  A1 = 15
                  A2 = 16
                  A3 = 17
                  ...

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    amitach
                    wrote on last edited by
                    #11

                    I am getting check wires when I start the serial monitor on mac arduino ide whereas the same code works on linux(mint 17) without any change. Both are running 1.0.6 ide.

                    Is this a known issue with mac?

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      f00fc7c8
                      wrote on last edited by f00fc7c8
                      #12

                      Arduino Pro Mini 328p/ 5v
                      Change _SPI.setClockDivider(SPI_CLOCK_DIV2); RF24.cpp to DIV4

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


                      15

                      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