cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to change the channel in lorawan board B-L072Z-LRWAN1 in run time in ping pong example?

ARana.2
Associate II

I have made one MASTER and one SLAVE using B-L072Z-LRWAN1 ST board. 

I'm using Lora Phys layer to establish peer to peer network. I have modified Ping-Pong example. 

Task: I'm trying to achieve communication between MASTER and multiple SLAVE (typically 14 slaves) in INDIA region. MASTER first start listening on initial channel (for example CH_1) and then switching between all 7 channels of IND865 band. Each slave is sending data on fixed channel to master. (each slave is having particular wake-up time)

Problem: while switching to different channel in run time on master using setchannel function . device not adapting new channel. 

see below image in which master_init_CH_1_after_that_switching_and_Slave_CH0

0693W00000HqAwqQAF.png 

--> Initial channel on master is CH1 after that master is switching between CH0 and CH1, slave is having fixed CH0 and sending IMG on 10 seconds interval. 

in this case master is not receiving any data from slave. 

--> But if i modify slave channel to CH1, and initial MASTER channel is CH1. 

then master is able to receive data from slave even if switching between CH0 and CH1. 

master_init_CH_1_after_that_switching_and_Slave_CH1.png

0693W00000HqAwhQAF.png 

So master is listening on initial channel only, if I change value run time it is not set on device. Is it possible to change channel on run time? I have tried few things by pausing and resuming the ping_pong process. 

3 REPLIES 3

https://community.st.com/s/question/0D50X00009fGfzZSAS/can-bl072zlrwan1-build-a-lora-network?t=1640916037255

My guess would be you're not in an idle mode. I'd recommend walking the sx1276 library source, and most current data sheet, noting the discrepancies of docs vs code.

Changing frequencies on the fly typically requires specific state transitions in the radio, or hopping settings.

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

Hello @Community member​ 

Thanks, 😀

I'm able to establish network between master and multiple slave,

master is hoping between different channels on fixed spreading factor.

I'm able to send and receive 64 bytes payload, But due to some reason it is not able to receive 65 byte payload in that example. According to regional parameters by LoRa alliance it should be able to send large payload on SF7 and SF8.

Can you give some input on this?

STM32CubeExpansion_LRWAN_V1.3.1\Drivers\BSP\Components\sx1276\sx1276.h

{ MODEM_LORA, REG_LR_PAYLOADMAXLENGTH, 0x40 }, <---- this is why, the Semtech chip will abort if it sees anything longer, use 0xFF for maximal

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