Skip to content

Commit 39762f3

Browse files
committed
Pygate updates
1 parent 9748fa8 commit 39762f3

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

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/PyGate.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The Pygate is an 8-channel LoRaWAN gateway. This page will help you get started
66

77
To connect your Pygate to a LoRa server, follow these steps:
88

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.
9+
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.
1010
1. Attach the LoRa Antenna to the Pygate.
1111
1. Flash the Pycom Device with with a firmware build where Pygate functionality is enabled.
1212
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.
13+
1. Create a `main.py` that creates an uplink (wifi, ethernet or lte) and runs the LoRa packet fowarder.
1414
1. Run the `main.py`.
1515
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.
1616
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 +23,16 @@ Make sure you supply a config matching your region (EU868, US915, etc), e.g. htt
2323

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

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`
26+
1. log in to https://console.thethingsnetwork.org/
27+
1. go to Gateways and register a new gateway
28+
1. select "I'm using a legacy packet forwarder"
29+
1. make up a EUI (8 byte hexadecimal value) and register it on the TTN website
30+
1. enter the EUI in your `config.json` under `gateway_ID` (Just enter the hex digits without the "eui-" prefix and without spaces)
31+
1. select your Frequency Plan
32+
1. select a router - also enter the hostname in your `config.json` under `server_address`
33+
1. enter your wifi SSID and password in `main.py`
34+
1. upload `config.json` and `main.py` and reset the board
35+
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.
3336

3437

3538

@@ -70,7 +73,7 @@ print("Wifi Connection established")
7073

7174
# Sync time via NTP server for GW timestamps on Events
7275
rtc = RTC()
73-
rtc.ntp_sync(server="0.nl.pool.ntp.org")
76+
rtc.ntp_sync(server="0.pool.ntp.org")
7477

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

0 commit comments

Comments
 (0)