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. Uno+ethernet shield = radio init fail [solved]

Uno+ethernet shield = radio init fail [solved]

Scheduled Pinned Locked Moved Troubleshooting
23 Posts 8 Posters 17.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.
  • Michael HritzM Offline
    Michael HritzM Offline
    Michael Hritz
    wrote on last edited by
    #21

    I'll try it tomorrow. I'm burned out for the day. My wife has some gin gimlets waiting for me. Thanks for the suggestion.

    1 Reply Last reply
    0
    • Michael HritzM Offline
      Michael HritzM Offline
      Michael Hritz
      wrote on last edited by
      #22

      I got around my earlier problem of “radio init fail” by setting the RF24_DATARATE to RF24_1MBPS (in MYSensor v1.5) as per instructions:
      http://forum.mysensors.org/topic/728/radio-setup-give-check-wires/30

      sonicblaze
      posted 8 months ago reply quote
      0

      @olaeke You might be able to get everything working over 1MBPS instead of the 250KBPS that's defaulted, as doctor64 suggested. I haven't tried it, but I found everywhere that'd have to be changed to make it work in theory.
      Edit <Ardunio libraries folder>/MySensors/Myconfig.h, and change the "RF24_DATARATE" to "RF24_1MBPS".
      Edit <Ardunio libraries folder>/MySensors/MySensor.cpp, and comment out lines 102-105 (the if isPVariant check)
      Recompile and upload new code to both your gateway and your sensor, and that should put them both in a mode compatible with the NRF24L01 sensor (to my best understanding/knowledge).

      But now, I’m getting a “ver mismatch” message. Is this because I’m only running the gateway and I’m not pairing it with a sensor node?
      It appears that I’m seeing mGetVersion returning 0 when PROTOCOL_VERSION is 2 .
      The taBle below shows where the version is set and gotten.

      Item Where used Lines
      mSetVersion MySensor.cpp 349,464
      mSetVersion MyMessage.h 179
      mGetVersion MySensor.cpp 590
      mGetVersion MyMessage.h 180

      1 Reply Last reply
      0
      • hekH hek

        @TD22057

        Because defines declared in the sketch isn't visible in the cpp files. The Arduino build system isn't exactly the best on the planet.

        TD22057T Offline
        TD22057T Offline
        TD22057
        Hardware Contributor
        wrote on last edited by
        #23

        @hek said:

        @TD22057
        Because defines declared in the sketch isn't visible in the cpp files. The Arduino build system isn't exactly the best on the planet.

        FYI: I found a trick here: http://gammon.com.au/forum/?id=12625 that allows for more normal C/C++ development while still using the Arduino IDE for builds. Basically you create an empty .ino file with any external library include files in it. The IDE will happily rewrite that file and pick up those libraries. Then you can put the regular code (loop(), setup(), etc) in another .c or .cpp file and it will work properly. So you can put #defines or definitions ahead of include files and they work since the IDE only rewrites the .ino file. I've started using this for a sketch I was writing because I needed an enum in the prototype of local functions which the IDE kept screwing up. Works great and still allows the IDE to be used for building/uploading.

        As far as MySensors goes, this would allow you to define the SOFT_SPI macro locally in the sketch and then include the files that use it which makes it a lot easier to maintain your code. Especially when I come back to this in a year and have to remember how I built everything.

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


        16

        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