Skip to content

AFSK not working on LILYGO T3_V1.6.1 #1123

Closed
@fagci

Description

Describe the bug
AFSK not working. Close to #190

Using LILYGO T3_V1.6.1. Pinout is same for DIO1, DIO2.
Checked pins using multimeter, 20 Ohms for each ESP GPIO - sx1278 DIO.
Tried to use GPIO12, GPIO25 for DIO2, no luck.
Also tried to set GPIO pins HIGH before transmitting.

To Reproduce

#include <RadioLib.h>
#include <SPI.h>

const uint8_t LORA_MOSI = 27;
const uint8_t LORA_MISO = 19;
const uint8_t LORA_SCLK = 5;
const uint8_t LORA_CS = 18;
const uint8_t LORA_DIO0 = 26;
const uint8_t LORA_DIO1 = 33;
const uint8_t LORA_DIO2 = 32;
const uint8_t LORA_RST = 23;

SX1278 radio = new Module(LORA_CS, LORA_DIO0, LORA_RST, LORA_DIO1);
AFSKClient audio(&radio, LORA_DIO2);

RTTYClient rtty(&audio);

float TXfreq = 434.0;

void setup() {
  Serial.begin(115200);
  SPI.begin(LORA_SCLK, LORA_MISO, LORA_MOSI);

  int state = radio.beginFSK();
  if (state == RADIOLIB_ERR_NONE) {
    Serial.println(F("success!"));
  } else {
    Serial.print(F("failed, code "));
    Serial.println(state);
    while (true)
      ;
  }

  state = rtty.begin(434.0, 170, 45);
  if (state == RADIOLIB_ERR_NONE) {
    Serial.println(F("success!"));
  } else {
    Serial.print(F("failed, code "));
    Serial.println(state);
    while (true)
      ;
  }

rtty.idle();
  delay(500);
  rtty.println("Test test test");
  rtty.standby();

  // for (int i = 0; i < 10; ++i) {
  //   audio.tone(1000+i * 1000);
  //   delay(100);
  // }
  // audio.noTone();
}

void loop() {}

Expected behavior
Frequency change instead of carrier.

Screenshots
image

Additional info (please complete):

  • MCU: ESP32
  • Wireless module type: SX1278
  • Arduino IDE version: 2.3.2
  • Library version: 6.6.0

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingresolvedIssue was resolved (e.g. bug fixed, or feature implemented)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions