Git Product home page Git Product logo

stm32-loragateway's Introduction

STM32-LoRaGateway

A STM32F103C8T6 (Blue Pill) LoRa Gateway. A STM32F103C8T6 (Blue Pill) LoRa Gateway. A gateway from LoRa to USB serial interface. Not a LoRaWAN gateway for the The Things Network!

This gateway is receiving and sending LoRa messages by using the HopeRF RFM95W chip.

Serial Channel

The serial channel on the uUSB connector is used to send and receive messages. Used protocol on the serial channel is like the RF12_Demo of JeeLabs.

LoRa communication

This LoRa gateway is using the Arduino LoRa lib for interfacing the RFM95W. InvertIQ is used to send messages to the nodes, the nodes do need to receive the messages with InvertIQ enabled. The nodes are sending the messages with InvertIQ disabled and the gateway is also receiving by the InvertIQ disabled. By using the technique a Gateway never receive messages from another Gateway and a Node never receive message from another Nodes, only Gateway to Node and vice versa.

How to connect the RFM95W to the STM32F103

RFM95W STM32F103
VCC 3V3
GND GND
MISO PA6
MOSI PA7
SCK PA5
NSS PA4
RESET PC14
DIO0 PA1

Programming the board

I'm using the Arduino IDE with STM32duino in the board manager. No need to flash the bootloader, flashing the board with STLink V2, with the STLink V2 there is no need to use the switch the boot jumpers. You can find here more information about the setup here: https://alselectro.wordpress.com/2018/11/18/stm32f103-bluepill-getting-started-with-arduino-core/

Usage

When the board is programmed, connect the micro-USB cable to the machine and startup a serial terminal program. Press 'h' to see the available commands:

Available commands:
<nn>n     - set Gateway node ID (standard node ids are 1..7)
...,<nn>s - send data packet to node <nn>
<n>x      - set reporting format (0: decimal, 1: hex, 2: hex+ascii)
<n>r      - set reporting of RSSI signal strength (0:off, 1:on)
v         - display board name and board id
h         - this help

Set NodeId

Default the Gateway Id is set to '1', but that can be changed.

Change the Gateway nodeId into '2':

2n

Receiving a LoRa message

CRC is by default enabled, the first byte is the nodeId.

OK <nodeId> <dataByte0> .. <dataByteX>

For example from nodeId 3, with 2 data bytes:

OK 3 1 2

Sending a LoRa message

<dataByte0>,<dataByteX>,<nodeId>s

For example to send 2 data bytes to nodeId 3:

1,2,3s

Get the RSSI signal strength of the received message

Switch on the RSSI reporting mode:

1r

That will get for example a receive message response like this:

OK 3 1 2 RSSI -62

Switch off the RSSI reporting mode:

0r

Message Ack

The Arduino LoRa library doesn't have any low-level message acknowledge implemented. I'm verifying a message on application level.

stm32-loragateway's People

Contributors

wooni005 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.