cancel
Showing results for 
Search instead for 
Did you mean: 

I have a B-L072Z-LRWAN1 development board. I am learning the basics of Lora modules and can someone help me out by providing links for any tutorials. I also need to know how to connect B-L072Z device to LoRa network without a gateway?

VSrin
Associate II
 
8 REPLIES 8

>>I also need to know how to connect B-L072Z device to LoRa network without a gateway?

So point-to-point LoRa as a radio vs LoRaWAN as a network?

The ping-pong example doesn't use LoRaWAN (or a gateway), devices take turns as being a talker or a listener. Basically you could have multiple listeners as radio is that type of medium.

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

Is there a way to configure the development board and sxs1276 transceiver using bare metal programming

Sure, they are stock STM32L072 and SX1276 parts, the Reference Manual / Data Sheet should be adequate to do register level coding, or use semtech libraries, or whatever you choose.

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

Can you suggest any ide for bare metal programming for stm32 devices and one more question is that if I have to connect to lora network I need a gateway right?

Thanks for your support

ST has a free Keil license for Cortex-M0(+) devices https://www2.keil.com/stmicroelectronics-stm32/mdk

LoRaWAN would require some kind of gateway device.

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

I have a quick question for you. I could not see the variables not getting incremented. The keyword "Click" remains zero all the time. Please see the code and let me know if I made any mistake

#include <iostm8l.h>

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <stdint.h>

#include <math.h>

#include "defs.h"

static int click = 0;

void delay(unsigned long dd)

{

  unsigned long i;

  for (i=0;i<dd;i++) nop(); 

}

void RTC(void)

{

unsigned long j = 0;

PE_ODR |= 0x80; // led indication for reset 

if( click == 2) // reset module

{

click = 0;

 PC_ODR &= ~(1<<3); //pc3 in place of push button - turn it off here

 for(j = 0;j<20;j++)

 {

  delay(_250ms_); // 4.3 seconds in real

 }

}

if(click == 1) // on module

{

click++;

PC_ODR &= ~(1<<3); //turn it off

for(j = 0;j<8;j++)

 {

delay(_250ms_); // wait

 }

}

if (click == 0) // off module

{

PC_ODR &= ~(1<<3); //turn it off

click++;

 for(j = 0;j<8;j++)

 {

delay(_250ms_); // wait

 }

  PC_ODR |= (1<<3); // turn it on

 for(j = 0;j<8;j++)

 {

delay(_250ms_); // wait

 }

 PC_ODR &= ~(1<<3); //turn it off

 for(j = 0;j<8;j++)

 {

delay(_250ms_); // wait

 }

}

RTC_ISR2=0x00; // clear interrupt flags

}

void SetupTimers(void)

{

CLK_CRTCR=0x04; // use iternal LSI/1 clock @ ~38KHz

 RTC_WPR=0xCA;

RTC_WPR=0x53;

RTC_CR2=0x00; // disable wakeup timer for register update

while(!(RTC_ISR1 & 0x04));

  RTC_CR1=0x04; // set 1hz clk

RTC_WUTRH=0x00; // change here for time change

RTC_WUTRL=0x78; //2 min timer

RTC_CR3=0x00; 

RTC_CR2=0x44; // turn on timer and interrupt

RTC_WPR=0xFF; // lock the device

}

main()

{

CLK_DIVR = 0x00; // Set the frequency to 16Mhz

CLK_PCKENR2 = 0x07; // clock for timer1

 PC_DDR = 0x08; //direction input for push button

PC_CR1 = 0x08; //floating input pc3

PE_DDR = 0x80; // direction output for led

 PE_CR1 = 0x80; // fast push pull mode

SetupTimers();

_asm("rim\n"); // enable interrupt

while(1)

{

PC_ODR |= (1<<3); // turn it on

PE_ODR &= ~(0x80);

}

}

It is about the programming I believe. And by the way I posted that question too