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

Gateway Pi showing received data in gibberish #74

Closed
jaygould opened this issue Mar 29, 2023 · 3 comments
Closed

Gateway Pi showing received data in gibberish #74

jaygould opened this issue Mar 29, 2023 · 3 comments

Comments

@jaygould
Copy link

Hi all, I am sending data from a RFM98 (attached to an ESP32) to the other RFM98 attached to a Raspberry Pi 4b running LoRa gateway. The sending module is using arduino-lora.

The Pi is receiving the data but it's showing an incorrectly formatted string which looks like it's not been decoded correctly:

Screenshot 2023-03-29 at 15 20 14

Not sure what the issue could be. Here's my sending code for reference:

#include <SPI.h>
#include <LoRa.h>

int counter = 0;

void setup() {
  Serial.begin(9600);
  while (!Serial);
  LoRa.setPins(4, 2, 15);
  LoRa.setSignalBandwidth(125E3);
  LoRa.setCodingRate4(7);
  LoRa.setSpreadingFactor(7);
  LoRa.enableCrc();

  if (!LoRa.begin(434E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}

void loop() {
  Serial.print("Sending packet: ");
  Serial.println(counter);

  LoRa.beginPacket();
  LoRa.print("$$hadie,");
  LoRa.print(counter);
  LoRa.print(",10:42:10,53.786244,-2.290401,27799.3,1:10\n");
  LoRa.endPacket();

  counter++;

  delay(4000);
}
@PiInTheSky
Copy link
Owner

PiInTheSky commented Mar 29, 2023 via email

@jaygould
Copy link
Author

jaygould commented Mar 29, 2023

@daveake I've been banging my head against the wall since yesterday afternoon and all it took was to change the mode from 0 to 1. Thank you so much! 🙂

@daveake
Copy link
Contributor

daveake commented Mar 29, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants