Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AFSK not working on LILYGO T3_V1.6.1 #1123

Closed
fagci opened this issue Jun 13, 2024 · 2 comments
Closed

AFSK not working on LILYGO T3_V1.6.1 #1123

fagci opened this issue Jun 13, 2024 · 2 comments
Labels
bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented)

Comments

@fagci
Copy link

fagci commented Jun 13, 2024

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
@jgromes
Copy link
Owner

jgromes commented Jun 13, 2024

I was able to replicate this issue on a Lilygo T-Beam. The root cause was a breaking change in ESP_IDF > 5.0.0, that chagned the API of the LEDC component which is used to emulate tone(). It is fixed in the comit mentioned above, thanks for reporting!

@jgromes jgromes closed this as completed Jun 13, 2024
@jgromes jgromes added bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented) labels Jun 13, 2024
@fagci
Copy link
Author

fagci commented Jun 13, 2024

Thank you for your work! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented)
Projects
None yet
Development

No branches or pull requests

2 participants