While working on one of my project involving Arduino and E45-TTL-100 LoRa 868MHz radio modules, I've discovered that it is not working exactly like expected. Documentation states:

(...) When the data inputted by user is up to 58 byte, the module will start wireless transmission (...)
(...) When the required transmission bytes is less than 58 byte, the module will wait 3-byte time and treat it as data termination (...)

If I understand this correctly, E45-TTL-100 should begin radio transmission when:

  • 58 bytes were sent via serial port
  • serial transmission stopped for 3 bytes. So, at 9600bps, 3ms pause whould trigger transmission
    void loop() {
        Serial.print("Test");
        delay(100);
    }

In theory, code from the able should send string "Test" every 100ms. Unfortunately, it was not happening. Second E45-TTL-100 was not receiving anything. Also SDR dongle was not catching any transmissions. Something was wrong. I even contacted CD Ebyte, but they were unable to help me and The Internet was equally useless. What was wrong? No idea... looks like some kind of E45-TTL-100 MCU bug...

The solution

The solution is, hmmm, surprisingly simple. You not only have to stop transmitting, but also end serial port (Serial.end()) and open it again (Serial.begin()) after short period of time. In my experiments I've determined that 20-30ms of closed port selves the problem. So, code from above should be replaced with following:

void loop() {
        Serial.print("Test");
        Serial.end();
        delay(30);
        Serial.begin(9600);
        delay(70); //The rest of requested delay. So 100 - 30 = 70
    }

It might not be the prettiest solution ever, but it works.