moononournation / T-Deck

All Lilygo T-Deck stuff
30 stars 1 forks source link

Radio not online! #6

Closed maxbrito500 closed 4 months ago

maxbrito500 commented 4 months ago

Hello,

I've followed the example using PlatformIO and two T-Decks acquired this month (May 2024) with LoRa 868 MHz. Compilation went well following the tutorial:

I'm familiar with PlatformIO and similar development in the past, so I've compiled and uploaded the code without changes. It was uploaded but then the debug message just says: "Radio not online!"

Any idea why the radio is not starting?

Many thanks in advance.

moononournation commented 4 months ago

had you upload the keyboard firmware?

maxbrito500 commented 4 months ago

Hello, yes.

I was able to solve the problem thanks to this method: https://github.com/moononournation/T-Deck/issues/5

All you need to do is upload the following code on LoRa.h at line 37:

digitalWrite(TDECK_SDCARD_CS, HIGH); //testing Nds
digitalWrite(TDECK_RADIO_CS, HIGH);
digitalWrite(TDECK_TFT_CS, HIGH);
SPI.end();
SPI.begin(TDECK_SPI_SCK, TDECK_SPI_MISO, TDECK_SPI_MOSI); //SD

After that it was working as expected.

Can you please update LoRa.h accordingly? Many thanks! (and thank for sharing the messenger code)

moononournation commented 4 months ago

In latest LvglLoRaMessenger.ino, the calling sequence is:

  digitalWrite(TDECK_SDCARD_CS, HIGH);
  digitalWrite(TDECK_TFT_CS, HIGH);
  setupRadio();

This should already fix the problem.