Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 13 of 13

Thread: Is the Ebyte E32 compatible with Paul's RadioHead library?

  1. #1
    Junior Member
    Join Date
    Jan 2022
    Posts
    9

    Is the Ebyte E32 compatible with Paul's RadioHead library?

    Hi Everyone, I'm working on a project using the Ebyte E32 Telemetry radios (Teensy 3.2 on the receiver side, and Teensy 4.0 with the transmitter radio) with Paul's RadioHead library - https://github.com/PaulStoffregen/RadioHead

    Both Ebyte modules have thrown the "init failed" message even with the correct AUX and MODE pins connected to it (example sketch was run here), furthermore the example sketch mentions that only the Arduino Uno has been tested with this. So I was wondering if the Ebyte E32 modules are compatible with Radiohead for Teensy.

    Thanks,
    moonman

  2. #2
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Follow-up - Since the example sketches use the SoftwareSerial library, could that potentially be causing any issues? Could it also be replaced with something else?

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    11,430
    Quick notes: Paul's Radiohead github project comes from: http://www.airspayce.com/mikem/ardui...ead/index.html ...

    I see I still cannot open up examples with extension .pde in Arduino IDE2 (https://github.com/arduino/arduino-ide/issues/518)
    Although you can use the open menu to open the PDE file...

    The e32_server does build for T4.1. Note: There are still some compiler warnings in this library (with the new compiler)

    I have not tried these radios, but in theory should work.

    I would change the code to not use SoftwareSerial, like:
    Code:
    #include <RH_E32.h>
    
    #define mySerial Serial1
    RH_E32  driver(&mySerial, 4, 5, 8);
    
    void setup() 
    ...
    Note: you can use SoftwareSerial on a teensy, HOWEVER, it will only work to those pins that are actual Hardware Serial pins.
    And the combination in that example:
    Code:
    SoftwareSerial mySerial(7, 6);
    Will not work

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,668
    Could be SoftwareSerial.

    On Teensy 3 & 4 the SoftwareSerial library uses the actual hardware if you choose pins which have hardware serial. So try something like this:

    Code:
    SoftwareSerial mySerial(0, 1);
    RH_E32  driver(&mySerial, 4, 5, 8);
    And of course connect the E32 hardware to pins 0 and 1.

    Obvious as this sounds, remember to connect E32 TXD to Teensy RX1 (pin 0) and E32 RXD to Teensy TX1 (pin 1). It's easy to get into the habit of connecting signals with the same name together, as that's how SPI and I2C work. Connecting RX-RX and TX-TX is a really common issue with serial signals.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,668
    Quote Originally Posted by KurtE View Post
    I see I still cannot open up examples with extension .pde in Arduino IDE2 (https://github.com/arduino/arduino-ide/issues/518)
    Although you can use the open menu to open the PDE file...
    I changed all the examples with .pde to .ino in the copy for Teensy.

    Or at least I thought I did. If you see any I missed, please let me know?

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    11,430
    Quote Originally Posted by PaulStoffregen View Post
    I changed all the examples with .pde to .ino in the copy for Teensy.

    Or at least I thought I did. If you see any I missed, please let me know?
    You are right, I had an older version of github installed in the library folder...

  7. #7
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Thanks for the advice, Paul and Kurt! So I tried Paul's code with SoftwareSerial and Kurt's code without SoftwareSerial, but the error still persists
    Name:  Screenshot from 2022-12-03 16-38-14.png
Views: 72
Size:  12.1 KB

    These were the only pins I could use for the MODE and AUX - M0: 10, M1: 8, and AUX: 12. Not sure if these could be causing the error but I included them anyway.
    Here are the only changes I made to the code everything else is the same as e32_client

    Code:
    #include <RH_E32.h>
    #define mySerial Serial1
    RH_E32  driver(&mySerial, 10, 8, 12); //M0 M1 AUX

  8. #8
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    11,430
    Sorry, as I don't have any of these devices, I cannot debug their code here.

    But can give suggestions on steps to debug.

    So far all I know is the init() call is failing. But why?

    So if you look at their init function, shown below, you might add some debug stuff.


    Code:
    bool RH_E32::init()
    {
      // When a message is available, Aux will go low 5 msec before the first character is output
      // So if we ever wait more than this period of time after Aux low, can conclude there will be no data
      _s->setTimeout(10);
    
      // Wait until the module is connected
      waitAuxHigh();
    
      if (!getVersion())
          return false; // Could not communicate with module or wrong type of module
      
      setMode(RHModeRx);
      clearRxBuf();
    
      if (!setDataRate(DataRate5kbps))
        return false;
    
      if (!setPower(Power21dBm))
        return false;
    
      //  if (!setBaudRate(BaudRate9600, Parity8N1))
      //  return false;
    
      if (!setFrequency(433))
        return false;
      
      return true;
    }
    Something like:
    Code:
    bool RH_E32::init()
    {
      Serial.println("RH_E32::init() called");
      // When a message is available, Aux will go low 5 msec before the first character is output
      // So if we ever wait more than this period of time after Aux low, can conclude there will be no data
      _s->setTimeout(10);
    
      // Wait until the module is connected
      waitAuxHigh();
    
      if (!getVersion())
          return false; // Could not communicate with module or wrong type of module
      Serial.println("After getVersion test");
      
      setMode(RHModeRx);
      clearRxBuf();
    
      if (!setDataRate(DataRate5kbps))
        return false;
      Serial.println("After setDataRate");
    
      if (!setPower(Power21dBm))
        return false;
      Serial.println("after setPower");
    
      //  if (!setBaudRate(BaudRate9600, Parity8N1))
      //  return false;
    
      Serial.println("after setbaudrate");
    
      if (!setFrequency(433))
        return false;
      Serial.println("after setFrequency");
      
      return true;
    }
    And build and run and see how far it gets. If it dont see the message after getVersion, then you go to that function and maybe instrument it...

    Good luck

    EDIT: Note: typed in the Serial.println() calls on the fly so can be typos...

    EDIT2: Also in cases like this, it could help if you posted pictures of your setup. For example, it might show if you are connected up to the wrong pins, or maybe missing a connection to ground. Or maybe you are using a breadboard and the solder joints from the Teensy to the pins has issues, like no solder or a solder bridge to another pin.

  9. #9
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,569
    Do you have a link to the E32 radio you are using?

  10. #10
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Thanks for that Kurt! I'll try it out, well I've already gotten the current setup to work with another library so I don't think there are any problems with the physical hardware connections.

    @mjs513, here's the link to https://www.ebyte.com/en/product-view-news.html?id=108

  11. #11
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,569
    Quote Originally Posted by moonman View Post
    Thanks for that Kurt! I'll try it out, well I've already gotten the current setup to work with another library so I don't think there are any problems with the physical hardware connections.

    @mjs513, here's the link to https://www.ebyte.com/en/product-view-news.html?id=108
    Thanks for the link. A couple reasons I was asking was that one I am always looking for telemetry radios and the second is that if you look at this http://www.airspayce.com/mikem/ardui...ead/index.html for the RH32 it states:
    RH_E32 Works with EBYTE E32-TTL-1W serial radio transceivers (and possibly other transceivers in the same family)
    so not sure its 100% compatible with your radion. Not that familar with these LoRa radios so can't say absolutely.

  12. #12
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    1,138
    RH_E32 Works with EBYTE E32-TTL-1W serial radio transceivers (and possibly other transceivers in the same family)
    so not sure its 100% compatible with your radion. Not that familar with these LoRa radios so can't say absolutely.
    From the manufacturers web site "E32-TTL-1Wcan be compatible with other E32 modules."
    I don't know why @Moonman does not use @KrisKasprzak's E32 library.
    He (@moonman) had previously said that he was going to use EByte E220 modules, now changed to E32.

  13. #13
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,569
    Quote Originally Posted by BriComp View Post
    From the manufacturers web site "E32-TTL-1Wcan be compatible with other E32 modules."
    I don't know why @Moonman does not use @KrisKasprzak's E32 library.
    He (@moonman) had previously said that he was going to use EByte E220 modules, now changed to E32.
    Didn't know Kris even had a E32 library. And you are right - should give it a try. As for compatibility, might be something slightly different, you know how that can be.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •