Programming lora-e5-mini with arduino

Hi,
i am trying to program lora-e5-mini module with arduino ide,
I’m following this guide LoRa-E5-mini - RevSpace
i downloaded the example on git. ( GitHub - bertrik/lora-e5: Basic Arduino projects with the LoRa e5 module)
the blink program works without problems, but instead the hello world program, I can’t compile it.

This is the error : helloworld.ino.cpp:(.text.setup+0x2c): undefined reference to HAL_SUBGHZ_Init' && helloworld.ino.cpp:(.text.loop+0x72): undefined reference to HAL_SUBGHZ_ReadRegisters’

yet I can navigate within the inclusion, #include “stm32wlxx_hal_subghz.h”
and I found the HAL_SUBGHZ_Init function

has anyone already found this error? or do you know another guide to program this board with arduino?
my intent is to have two cards that communicated with each other

I found an interesting library ( GitHub - chandrawi/LoRaRF-Arduino: Arduino library for basic transmitting and receiving data using LoRa and FSK modulation ) allows you to communicate with the rfm module via spi.
looking at the manual of the card (stm32wl5) I found the internal pins of the SPI, in this case SUBGHZSPI ( Datasheet - STM32WLE5xx STM32WLE4xx - Multiprotocol LPWAN 32-bit Arm® Cortex®-M4 MCUs, LoRa®, (G)FSK, (G)MSK, BPSK, up to 256KB flash, 64KB SRAM)

the problem is that i still can’t initialize the lora module, can someone help me?

#include <BaseLoRa.h>
#include <SX126x.h>
#include <SX126x_driver.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial (PB7, PB6);

SX126x LoRa;

// Message to transmit
char message[] = "HeLoRa World!";
uint8_t nBytes = sizeof(message);
uint8_t counter = 0;




void setup() {
  // put your setup code here, to run once:
  mySerial.begin(9600);
  mySerial.println("Begin LoRa radio");
  
  SPIClass SPI_2(PA7,PA6,PA5); //mosi,miso,clk
  LoRa.setSPI(SPI_2, 16000000); // 12MHz to 16MHz

  // Begin LoRa radio and set NSS, reset, busy, IRQ, txen, and rxen pin with connected arduino pins
  // IRQ pin not used in this example (set to -1). Set txen and rxen pin to -1 if RF module doesn't have one
// irqPin = PB3 
  int8_t nssPin = PA4, resetPin = PA11, busyPin = PA12, irqPin = -1, txenPin = -1, rxenPin = -1;

  if (!LoRa.begin(nssPin, resetPin, busyPin, irqPin, txenPin, rxenPin)){
    mySerial.println("Something wrong, can't begin LoRa radio");
  }
  mySerial.println("End setup");
}

Hi Niki. Did you get past this?
I had the same problem. I had to load the STM32 core from github instead of from the arduino board manager. That cleared this linking issue for me.

SPIClass SPI_2(PA7,PA6,PA5); //mosi,miso,clk

While this seems like it should work, it doesn’t. The PA7, PA6, PA5 pins can be set up for debugging. They only output the SPI that is going on between the processor and radio internally on the chip. It seems like there should be some virtual pins that could be used to adapt existing libraries to work the radio, but I have not found any. I did find this pull request that is a step in the right direction: add the STM32WL SUGGHZSPI to the SPI library by majbthrd · Pull Request #1803 · stm32duino/Arduino_Core_STM32 · GitHub
Unfortunately, the response so far seems to be – we are working on it…

Pls post if you find something that works. I have some IOT modules that use Arduino and RFM95 radios, but I would love to be able to do the same thing in one module with the LORA-E5.

Hi Spike,
A few days ago I wrote to you in another forum ( SUBGHZSPI - Arduino for STM32 (stm32duino.com))
I found a digi-key article explaining the debug pins and I was hoping to be able to access the internal spi via these pins. ( Mapping the Internal STM32WL Sub-GHz Radio Interface Signals to GPIO Pins - eewiki / Microcontroller - Engineering and Component Solution Forum - TechForum │ Digi-Key (digikey.com))
I went to look at the processor reference manual to figure out the pins and that’s why I set those pins in the code.
i would like to work with arduino ide, but I can also use stm32 ide. With both ide I was unable to program a ping pong system. I tried to follow the PingPong example for the stm32wl55 processor, but without success.
which ide do you use to program? have you already managed to make a communication program with the lora-e5 card?
sure, as soon as I have news I will inform you.

Ahhh. I hadn’t checked that forum in a while. It looks like we are the only people that have much interest in this.
I have a home IOT system using MySensors code: https://www.mysensors.org/
It is done in Arduino because the whole idea is it is supposed to be accessible for beginners. They have support for RFM95 and SX126x radios, among others. So it seems like it would be easy to adapt for the LORA-E5 if subghzspi just worked with the Arduino SPI library.
I’ll keep looking for a solution and report if I find one.

The problem with this card is how to access the subghzspi.
Yesterday I tried to adapt the lorawan code ( GitHub - danak6jq/Seeed-LoRa-E5: LoRaWAN end node built from scratch using CubeMX for WLE5x in the LoRa-E5) to make it an example ping pong. I can compile the code with stm32cubeide, but the two boards cannot communicate.
In the other forum, I saw that a guy is trying to access debug pins, we hope he can do something, however I am continuing to try and search the internet.
The funny thing is that this morning with a Nucleo-32 board, an arduino nano board and 2 lora modules, I was able in a short time to get them to communicate with each other.

No updates on the subject?

guys any updates on this?

Yes, there are.
I think in the version 2.4 of stm32duino there is the support of spi ghz.
Next week end I will try it