You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-9
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,26 @@
1
1
# LoRa-To-MQTT Gateway
2
2
## Introduction
3
3
This repository gives you everything you need to easily build (it's a DIY project!) a great quality LoRa-To-MQTT gateway, based on EByte LoRa modules and an ESP32 and works either with Wi-Fi or Ethernet, running off 5V. There are two different versions of the gateway, details on those versions and which you should pick down below:
4
-
- One with an EByte E32
5
-
- One with EByte E220
4
+
- One using an EByte E32
5
+
- One using an EByte E220
6
6
7
7
For giving the board Ethernet capability, I'm using the [QuinLED ESP32 Ethernet Hat](https://quinled.info/quinled-esp32-ethernet/). Of course, It's natural that I *should* have also used a [QuinLed ESP32](https://quinled.info/quinled-esp32/), but I had a few spare standard ESP32 devboards laying around with no use for, so I designed the board around these. But that said, I might one day design a version completely based on the QuinLED-ESP32.
8
8
9
9
To easily switch between Wi-FI and Ethernet, there's a jumper on the board to do just that. This even works with the board powered; no need to cut power.
10
10
11
11
## What do I need to do to get one?
12
-
Again, this is a DIY project! So first off, you need a few soldering skills and I highly recommend either a SMD hot plate or hot air gun to solder the Ebyte E32 module. Its **impossible** to solder it with just an iron.
12
+
Again, this is a DIY project! So first off, you need a few soldering skills and I highly recommend either a SMD hot plate or hot air gun to solder the Ebyte E32 module. Its **very very hard** to solder it with just an iron!
13
13
14
14
### 1. Get the PCBs
15
15
So you want to get the PCBs printed at a PCB prototype factory of your choice, like JLCPCB or PCBWay. I've included the Gerber files for both in the respectiv folder. If you want to use a different service provider, you need to check if they may accept these gerbers or generate them yourself.
16
16
17
17
I also **highly recommend** that you order this PCB with a stencil, otherwise you gonna have a hard time putting the paste on the pads of the EByte module!
18
18
19
19
### 2. Get the components
20
-
***TBD:** I'll generate a BOM file per board version and throw it into its respective folder
21
-
* Components you need for both boards:
20
+
* Look up the iBOM files to get a list of components you need:
21
+
*[E32 version iBOM](https://github.com/ezcGman/lora-gateway/blob/master/pcbs/LoRa-Gateway-E32/ibom/LoRa-Gateway-E32.html)
22
+
*[E220 version iBOM](https://github.com/ezcGman/lora-gateway/blob/master/pcbs/LoRa-Gateway-E220/ibom/LoRa-Gateway-E220.html)
23
+
* Additional links for the ESP32 and QuinLED Ethernet hat:
22
24
* Regular ESP 32 DevKit (pick one with 2x15 pins!!): https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20220311122647&SearchText=esp32+devkit
23
25
**(optional, if you want Ethernet)* QuinLED ESP32 with Ethernet hat:
@@ -30,7 +32,7 @@ Each PCB folder has an iBOM HTML file which gives you nice soldering instruction
30
32
### 4. Install the software
31
33
Source is available in the `src` folder. Download Arduino IDE, check the `config.h` file and replace the placeholders with your settings, compile and upload to the ESP32. That should be it and the gateway should pop up in your MQTT server and send health check messages every 5 seconds.
32
34
33
-
How you can now have your sensors and boards have LoRa messages sent to it can be found in the "Source Code / Software" section below.
35
+
How you can now have your sensors and boards have LoRa messages sent to it can be found in the ["Source Code / Software"](#source-code--software) section below.
34
36
35
37
## PCBs
36
38
### General design
@@ -131,7 +133,27 @@ Now you can easily:
131
133
* Define the struct that describes it
132
134
133
135
### How can I actually send messages?
134
-
TBD actual example here after we refactored sending
136
+
Take a look at the [`sendLoRaMessage`](/src/lora-gateway-e32/lora-ids.h#L160) function:
For this we take a look at how the actual message is constructed that is sent via LoRa. The *basic idea* is stolen from the Arduino-LoRa library, which uses singly bytes to identify senders, receivers, etc.
@@ -143,5 +165,3 @@ Looking at a single message:
143
165
* 3rd byte is the message ID
144
166
* 4th-255th byte is the message we will split up
145
167
* The message simply has all values joined together by a `|`. So taking the `mailbox` message example from above, the value for the message could look like this: `12345|3.56|44.55|27.4`
146
-
147
-
I will soon release my mailbox sensor PCB and source code, so you can see the sender implemeted :)
0 commit comments