cancel
Showing results for 
Search instead for 
Did you mean: 

How to initiate LoRa and Transmit - Receive data through LoRa in B-L072Z-LRWAN1. I am using UART and USB to transmit and receive data earlier. Now I wanted to do this through LoRa, but I have no clue about this, if anyone help it would be useful.

Kranthi Reddy
Associate II
 
9 REPLIES 9
vchau.2
Associate III

Download STM32CubeExpansion_LRWAN_V2.1.0 firmware. and customize the firmware as per your requirement

Do we have to configure LoRa in .ioc? If we have to configure, what to configure? I tried including LoRa libraries in my main.c file but its showing error as "Unresolved Inclusion". How to configure LoRa or how to install libraries related to it, in STM32CubeExpansion_LRWAN_V2.1.0 there is no .h file to copy from there but code is getting executed, when i try to customize that code my costomized code is showing error, so it would be better in understanding if someone says about configuration of LoRa in .ioc configurations?

vchau.2
Associate III

No, NO .ioc file in this project, You have to implement your code in existing code.

let me know "what configuration you want to change in LoRa"

I want to configure B-L072Z-LRWAN1 Board-1 to transmit data through USB device only(CDC) and one another board-2 to receive data, if board-2 after receiving data, if it send some data then board-1(which is connected to PC) have to receive it.

Hello. I am searching to send a "Hello_World" by Lora (not LoraWan) too.

Did you already do this? And how ?

I am using a STRKT01 eval Board.

I search in the Lora.c - radio.c - ...

I don't find any clue for this.

Could you help Me ?

Thanks a lot

The ping-pong examples should show Rx and Tx level packet usage at the Radio level. I've used those to build a radio modem implementation.

This thread is mostly about the Disco/Murata board​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Use ping pong example available in st.com or in github and modify Ping and Pong with your data, then put it in buffer or you can also use radio.send function to send data through radio by loRa.

FBard.2
Associate

Hello.

I am sorry. But i don't understand how to set the Lora (and not Lorawan) configuration to transmit a simple Hello World with the STRKT01 board.

It's a pity, i did not succeed with the pong ping (or reverse) program. As it mentioned the subghz_phy. and i did not find it in the fp-atr-Lora software.

In my opinion, i have to search in the SX1276 and the radio library.

In radio -> with the RadioModems_t struct :

  • Set modem Lora
  • Set Tx Transmission

and after that use the -> ( *Send )( uint8_t *buffer, uint8_t size );

Maybe i took it to simple.

Is someone can help me on this ?

Regards

The older library, materially something along the lines of...

  // GPIOs and related peripherals, etc
  HW_Init();
 
  // Radio initialization
  RadioEvents.TxDone = OnTxDone;
  RadioEvents.RxDone = OnRxDone;
  RadioEvents.TxTimeout = OnTxTimeout;
  RadioEvents.RxTimeout = OnRxTimeout;
  RadioEvents.RxError = OnRxError;
 
  Radio.Init(&RadioEvents);
 
  Radio.SetChannel(RF_FREQUENCY);
 
  Radio.SetTxConfig(MODEM_LORA, TX_OUTPUT_POWER, 0, LORA_BANDWIDTH,
                    LORA_SPREADING_FACTOR, LORA_CODINGRATE,
                    LORA_PREAMBLE_LENGTH, LORA_FIX_LENGTH_PAYLOAD_ON,
                    true, 0, 0, LORA_IQ_INVERSION_ON, 3000);
 
  Radio.SetRxConfig(MODEM_LORA, LORA_BANDWIDTH, LORA_SPREADING_FACTOR,
                    LORA_CODINGRATE, 0, LORA_PREAMBLE_LENGTH,
                    LORA_SYMBOL_TIMEOUT, LORA_FIX_LENGTH_PAYLOAD_ON,
                    0, true, 0, 0, LORA_IQ_INVERSION_ON, true);
 
 while(1)
 {
    // Management Loop
  ..
 
Handle States
      case IDLE::
 
        Radio.Send(Buffer, BufferSize); // When Idle
 
      case TX:
      case TX_TIMEOUT:
      case LOWPOWER:
 
Handle LowPower
 }

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..