Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Michael Hritz
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Michael Hritz

    @Michael Hritz

    0
    Reputation
    5
    Posts
    1486
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Michael Hritz Follow

    Best posts made by Michael Hritz

    This user hasn't posted anything yet.

    Latest posts made by Michael Hritz

    • RE: Uno+ethernet shield = radio init fail [solved]

      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

      posted in Troubleshooting
      Michael Hritz
      Michael Hritz
    • RE: Uno+ethernet shield = radio init fail [solved]

      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.

      posted in Troubleshooting
      Michael Hritz
      Michael Hritz
    • RE: Uno+ethernet shield = radio init fail [solved]

      Well, I've completely started from scratch. Latest Arduino IDE, v1.4.2 of MySensors library. Had to copy several *.h files from version 1.5 to C:\Users\mike\Documents\Arduino\libraries\MySensors to get past all the include statements in the compiler. Now the compiler is throwing a lot of error messages (you can peruse them below). This system looked pretty good on their web site, maybe it was too good to be true. I'm trying to get the Gateway.ino sketch to compile. I downloaded it from github. I'll just sit this out and see what the Cognoscenti come up with.

      In file included from C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:0:
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.h:39:28: error: 'DEFAULT_CE_PIN' was not declared in this scope
      MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, int8_t _inclusion_pin=-1, int8_t _rx=-1, int8_t _tx=-1, int8_t _er=-1);
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.h:39:59: error: 'DEFAULT_CS_PIN' was not declared in this scope
      MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, int8_t _inclusion_pin=-1, int8_t _rx=-1, int8_t _tx=-1, int8_t _er=-1);
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In constructor 'MyGateway::MyGateway(uint8_t, uint8_t, uint8_t, int8_t, int8_t, int8_t, int8_t)':
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:30:163: error: no matching function for call to 'MySensor::MySensor(uint8_t&, uint8_t&)'
      MyGateway::MyGateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, int8_t _inclusion_pin, int8_t _rx, int8_t _tx, int8_t _er) : MySensor(_cepin, _cspin) {
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:30:163: note: candidates are:
      In file included from C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.h:15:0,
      from C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MySensor.h:153:2: note: MySensor::MySensor(MyTransport&, MyHw&)
      MySensor(MyTransport &radio =new MyTransportNRF24(), MyHw &hw=new MyHwDriver()
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MySensor.h:153:2: note: no known conversion for argument 1 from 'uint8_t {aka unsigned char}' to 'MyTransport&'
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MySensor.h:144:7: note: MySensor::MySensor(const MySensor&)
      class MySensor
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MySensor.h:144:7: note: candidate expects 1 argument, 2 provided
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In member function 'void MyGateway::begin(rf24_pa_dbm_e, uint8_t, rf24_datarate_e, void (
      )(char
      ))':
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:44:20: error: 'setupRepeaterMode' was not declared in this scope
      setupRepeaterMode();
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:87:39: error: 'setupRadio' was not declared in this scope
      setupRadio(paLevel, channel, dataRate);
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:88:36: error: 'BASE_RADIO_ID' was not declared in this scope
      RF24::openReadingPipe(WRITE_PIPE, BASE_RADIO_ID);
      ^
      C:\Users\mike\Documents\Arduino\libraries\MySensors\MyGateway.cpp:90:23: error: cannot call member function 'void RF24::startListening()' without object
      RF24::startListening();
      ^
      Error compiling.

      posted in Troubleshooting
      Michael Hritz
      Michael Hritz
    • RE: Uno+ethernet shield = radio init fail [solved]

      The libraries don't exist under My Documents in my case. I've traced the error back to the code that is causing it, but I don't know what to do about it. In the rf24.h file there is a section that attempts to determine if the rf24 is P variant. It is returning false on the method call rf24.isPvariant. The results of the Serial.println statements I put in the MyTransportNRF24.cpp code are below:

      Before rf24.begin in MyTransportNRF24
      after rf24.begin in MyTransportNRF24
      !rf24.isPVariant() in MyTransportNRF24

      0;0;3;0;9;radio init fail

      Here are the lines in the v1.5 rf24.h that I think are causing the problem.

      Lines 347-351
      RF24::RF24(uint8_t _cepin, uint8_t _cspin):
      ce_pin(_cepin), csn_pin(_cspin), p_variant(false),
      payload_size(32), dynamic_payloads_enabled(false), addr_width(5)//,pipe0_reading_address(0)
      {
      }

      Lines 480-488
      // Determine if this is a p or non-p RF24 module and then
      // reset our data rate back to default value. This works
      // because a non-P variant won't allow the data rate to
      // be set to 250Kbps.
      if( setDataRate( RF24_250KBPS ) )
      {
      p_variant = true ;
      }

      I'll try and copy over the v1.4 version of these files and see if they work.

      posted in Troubleshooting
      Michael Hritz
      Michael Hritz
    • RE: Uno+ethernet shield = radio init fail [solved]

      I'm getting the same error with the serial gateway.using Arduino Nano, My Sensor 1.5 Arduino ide 1.6.5. I tried two different radio modules and an external 3.3 v supply no combination worked.

      posted in Troubleshooting
      Michael Hritz
      Michael Hritz