Skip to main content
Kim ElQ
Associate II
August 23, 2017
Question

LoRa Communication with STM32

  • August 23, 2017
  • 17 replies
  • 5194 views
Posted on August 23, 2017 at 13:15

Hello everyone,

I'm working on a LoRa project, using Murata's module ( stm32l082 & semtech's SX1276) , The aim of the project is to send some datas ( temperature, pressure .. ) to a gateway.

I want to know if someone has succeed to modify the example program given in I-CUBE-LRWAN 1.1.0 for B-L072Z-LRWAN1 in order to send datas without using the shield. Or there is any other solution ( code ) should i start with ?

Thank you,

    This topic has been closed for replies.

    17 replies

    Tesla DeLorean
    Guru
    August 23, 2017
    Posted on August 23, 2017 at 15:05

    I'm not sure why the shield plays a role, do you mean a stand-alone Murata module, not on a DISCO board? How do you perceive that is materially different beyond the VCP and debugger connectivity?

    http://www.st.com/en/evaluation-tools/b-l072z-lrwan1.html

     
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 23, 2017
    Posted on August 23, 2017 at 17:07

    The primary code available is the

    I-CUBE-LRWAN 1.1.0

    , you'll need to work from that. If your hardware differs marginally from the DISCO implementation you'll need to fork that code into a branch which addresses your board's differences.

    You don't need to use the shield connector on the DISCO, the pins should be exposed on the headers, and might need solder-bridges made/changed.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Kim ElQ
    Kim ElQAuthor
    Associate II
    August 23, 2017
    Posted on August 23, 2017 at 17:16

    Thank you clive one for your answer. Actually, i'm using murata's module CMWX1ZZABZ, with some sensors, so the hardware differs completly, and it's not evident to modify the code, i want to know if someone has succeed before doing this.

    Tesla DeLorean
    Guru
    August 23, 2017
    Posted on August 23, 2017 at 19:57

    But the bulk of the code and the radio pins will be the same on the STM32 side, you just need to modify the 'Board Support Package'

    ie you're going to need to start by creating the equivalent to this that uniquely describes your board/implementation

    Drivers\BSP\B-L072Z-LRWAN1\b-l072z-lrwan1.c

    You're going to have to add in code to initialize SPI or I2C buses to which you've attached sensors, and add code to talk with those sensors.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Vitaliy Chernobay
    Senior
    August 24, 2017
    Posted on August 24, 2017 at 10:22

    my project with LoRa & Nucleo

    https://github.com/golf2109/LoRa-HopeRF96-with-Nucleo-board

    After Forever
    Senior III
    August 24, 2017
    Posted on August 24, 2017 at 10:45

    Nice work, but if someone wants to use this code they should know that it's not LoRaWAN, Vitaly is just using the RF module as a general purpose radio transmitter/receiver without all the cool parts that LoRaWAN brings.

    Vitaliy Chernobay
    Senior
    August 24, 2017
    Posted on August 24, 2017 at 10:57

    RFM module from HopeRF with LoRa SX1272 from Semtech

    Goran Mahovlic
    Associate
    August 24, 2017
    Posted on August 24, 2017 at 14:45

    I have manage to get

    I-CUBE-LRWAN 1.1.0 code to work with new murata module .

    In keil you just need to change CPU to 83CZ

    And login to murata and download new reference sheet.

    I had few design mistakes so here there are...

    VDD_USB must be on VCC (to provide voltage to PB12)

    you need to connect VDD_TCXO to PA12/USB_DP for LoW power 

    or you can connect 

    VDD_TCXO to VCC but it will constantly drain around 40mA

    I am not sure but I did connect TCXO_OUT to PH0-OSC_IN

    but best is to fallow reference from murata

    And in old reference on antena part is capacitor with value of 0ohm (probably should be resistor)

    And in new is resistor (maybe best thing is to just put wire)

    Kim ElQ
    Kim ElQAuthor
    Associate II
    August 24, 2017
    Posted on August 24, 2017 at 14:52

    Thank you for your advices Goran Mahovlic, actually i already past this step, i have a card with sensors connected in I2C, i need to modify the ST's provided code. 

    could you tell me please what are the exact modifications to do ?
    Goran Mahovlic
    Associate
    August 24, 2017
    Posted on August 24, 2017 at 14:59

    I use CubeMx and build only I2C sensor  (or whatever you want) to get it work.

    When that is working I just check what I need to copy paste into LoRa code...

    Goran Mahovlic
    Associate
    August 24, 2017
    Posted on August 24, 2017 at 15:03

    This code seems nice to  ...

    https://github.com/gimasi/GMX-LR1