Skip to content

Commit 0eb35cf

Browse files
authored
Merge pull request #272 from pycom/pygate_fixes
Pygate fixes
2 parents 9748fa8 + b82755a commit 0eb35cf

File tree

6 files changed

+57
-18
lines changed

6 files changed

+57
-18
lines changed

config.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,19 @@ theme = "doc-theme"
359359
parent = "tutorials@all"
360360
weight = 10
361361

362-
[[menu.main]]
363-
name = "PyGate"
364-
url = "/tutorials/all/PyGate/"
365-
identifier = "tutorials@all@PyGate"
366-
parent = "tutorials@all"
367-
weight = 10
362+
[[menu.main]]
363+
name = "PyGate"
364+
url = "/tutorials/all/PyGate/"
365+
identifier = "tutorials@all@PyGate"
366+
parent = "tutorials@all"
367+
weight = 10
368+
369+
[[menu.main]]
370+
name = "PoE"
371+
url = "/tutorials/all/PoE/"
372+
identifier = "tutorials@all@PoE"
373+
parent = "tutorials@all"
374+
weight = 12
368375

369376
[[menu.main]]
370377
name = "WLAN"

content/firmwareapi/pycom/machine/pygate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ aliases:
66
- chapter/firmwareapi/pycom/machine/pygate
77
---
88

9-
The Pygate is an 8-channel LoRaWAN gateway. You connect a WiPy or Gpy board to the Pygate and flash a firmware build where the Pygate functionality is enabled. See the [Pygate tutorial](/tutorials/all/pygate) to get started.
9+
The Pygate is an 8-channel LoRaWAN gateway. Connect a WiPy, Gpy or LoPy4 board to the Pygate and flash the Pygate firmware. See the [Pygate tutorial](/tutorials/all/pygate) to get started.
1010

1111
## Methods
1212

content/firmwareapi/pycom/network/eth.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ The ETH class enables the use of an ethernet connection via the PyEthernet board
1010

1111
---
1212
*NOTE* :
13-
Ethernet support is only available in special Gpy or WiPy firmware builds where this feature has been enabled.
13+
Ethernet support is only available in the Pygate firmware build.
14+
15+
---
16+
17+
*NOTE2* :
18+
The PyEthernet board is connected via SPI bus 3 and GPIO's 17-19 and 21-23. So this bus and pins cannot be used concurrently with ethernet. This also means that on a LoPy4 with Pygate firmware, the LoRa module of the LoPy4 is disabled, since it is also connected via SPI 3. Of course you can still use the LoRa gateway functionality since this uses the LoRa modules on the the Pygate board itself.
1419

1520
---
1621

content/tutorials/all/PoE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "PoE"
3+
aliases:
4+
- tutorials/all/PoE.html
5+
- tutorials/all/PoE.md
6+
- chapter/tutorials/all/PoE
7+
---
8+
9+
The PyEthernet module has onboard Power over Ethernet (PoE) power supply. This means that you can power your hardware with only an ethernet cable coming from a power injector. However, since the PoE is non-isolated, you must adhere to the following warning!
10+
11+
WARNING:
12+
13+
PoE power supply of PyEthernet module has no galvanic isolation. This means, that in accordance with
14+
IEEE 802.3-2005 standard you must make sure that when powered from PoE power injector there are no other external connections to any part of the module or other hardware where it is installed. Such as USB cable, serial to USB bridge, logic analyser, an oscilloscope, etc.
15+
16+
As in certain hardware configurations it can lead to unrecoverable damage of not only the PyEthernet module but all hardware connected to it.
17+
18+
Be aware - violation of that requirement voids Pycom warranty.
19+
20+
The use of battery with PoE is allowed.
21+
22+
![](/gitbook/assets/PoE-NI.png)

content/tutorials/all/PyGate.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
The Pygate is an 8-channel LoRaWAN gateway. This page will help you get started with it.
44

5+
The Pygate board can have an PyEthernet adapter connected which allows an ethernet connection. The PyEthernet also support PoE. Do check the separate [page and warning for PoE-NI!](/tutorials/all/poe)
6+
57
### Quickstart
68

79
To connect your Pygate to a LoRa server, follow these steps:
810

9-
1. Attach a Wipy, or GPy to the Pygate. The RGB LED of the development board should be aligned with the USB port of the Pygate.
11+
1. Attach a WiPy, GPy or LoPy4 to the Pygate. The RGB LED of the development board should be aligned with the USB port of the Pygate.
1012
1. Attach the LoRa Antenna to the Pygate.
1113
1. Flash the Pycom Device with with a firmware build where Pygate functionality is enabled.
1214
1. Create a `config.json` for your Pygate and upload it.
13-
1. Create a `main.py` that creates an uplink and runs the Pygate packet fowarder.
15+
1. Create a `main.py` that creates an uplink (wifi, ethernet or lte) and runs the LoRa packet fowarder.
1416
1. Run the `main.py`.
1517
1. Now it is operational. The communication from other LoRa nodes such as a LoPy4 will now reach the gateway and will receive up and downlink via the PyGate.
1618
1. To stop the Pygate at any time press Ctrl-C on the REPL and run `machine.pygate_deinit()`. It will take a few seconds to stop the gateway tasks and safely power-off the concentrator.
@@ -23,13 +25,16 @@ Make sure you supply a config matching your region (EU868, US915, etc), e.g. htt
2325

2426
The following example shows the script and json file to run the Pygate over Wifi connecting to [The Things Network](https://www.thethingsnetwork.org/).
2527

26-
* log in to https://console.thethingsnetwork.org/
27-
* go to Gateways and register a new gateway
28-
* select "I'm using a legacy packet forwarder"
29-
* enter a EUI (8 byte hexadecimal value) - also enter this in your `config.json` for `gateway_ID` (Just enter the digits without the "eui-" prefix)
30-
* select your Frequency Plan
31-
* select a router - also enter the hostname in your `config.json` for `server_address`
32-
* enter your wifi SSID and password in `main.py`
28+
1. log in to https://console.thethingsnetwork.org/
29+
1. go to Gateways and register a new gateway
30+
1. select "I'm using a legacy packet forwarder"
31+
1. make up a EUI (8 byte hexadecimal value) and register it on the TTN website
32+
1. enter the EUI in your `config.json` under `gateway_ID` (Just enter the hex digits without the "eui-" prefix and without spaces)
33+
1. select your Frequency Plan
34+
1. select a router - also enter the hostname in your `config.json` under `server_address`
35+
1. enter your wifi SSID and password in `main.py`
36+
1. upload `config.json` and `main.py` and reset the board
37+
1. you will see how it creates the uplink connection and then start the LoRa GW. It will print out some debug information while it is running. After some initialization it will print "LoRa GW started" and the LED will turn green.
3338

3439

3540

@@ -70,7 +75,7 @@ print("Wifi Connection established")
7075

7176
# Sync time via NTP server for GW timestamps on Events
7277
rtc = RTC()
73-
rtc.ntp_sync(server="0.nl.pool.ntp.org")
78+
rtc.ntp_sync(server="0.pool.ntp.org")
7479

7580
# Read the GW config file from Filesystem
7681
fp = open('/flash/config.json','r')

static/gitbook/assets/PoE-NI.png

48 KB
Loading

0 commit comments

Comments
 (0)