<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.waterwaysinwhittlesea.org/index.php?action=history&amp;feed=atom&amp;title=MPPS_Pycom_LoRa_WAN_Gateway</id>
	<title>MPPS Pycom LoRa WAN Gateway - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.waterwaysinwhittlesea.org/index.php?action=history&amp;feed=atom&amp;title=MPPS_Pycom_LoRa_WAN_Gateway"/>
	<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;action=history"/>
	<updated>2026-06-27T20:29:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;diff=10114&amp;oldid=prev</id>
		<title>EdmondLascaris: /* MPPS-tiny-house-1 */</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;diff=10114&amp;oldid=prev"/>
		<updated>2024-02-23T23:37:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;MPPS-tiny-house-1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:37, 23 February 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= MPPS-tiny-house-1 =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= MPPS-tiny-house-1 =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Use in conjunction with Telstra 4GX Hotspot.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Ensure Hotspot is on before turning on Pycom LoRa Gateway. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== main.py ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== main.py ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>EdmondLascaris</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;diff=10113&amp;oldid=prev</id>
		<title>EdmondLascaris at 23:36, 23 February 2024</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;diff=10113&amp;oldid=prev"/>
		<updated>2024-02-23T23:36:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;amp;diff=10113&amp;amp;oldid=10112&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>EdmondLascaris</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;diff=10112&amp;oldid=prev</id>
		<title>EdmondLascaris: Created page with &quot;= MPPS-tiny-house-1 = == main.py ==  &lt;syntaxhighlight lang=&quot;python&quot;&gt; from network import WLAN import time import machine from machine import RTC import pycom  print('\nStarting LoRaWAN concentrator') # Disable Hearbeat pycom.heartbeat(False)  # Define callback function for Pygate events def machine_cb (arg):     evt = machine.events()     if (evt &amp; machine.PYGATE_START_EVT):         # Green         pycom.rgbled(0x103300)     elif (evt &amp; machine.PYGATE_ERROR_EVT):...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=MPPS_Pycom_LoRa_WAN_Gateway&amp;diff=10112&amp;oldid=prev"/>
		<updated>2024-02-23T23:35:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= MPPS-tiny-house-1 = == main.py ==  &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt; from network import WLAN import time import machine from machine import RTC import pycom  print(&amp;#039;\nStarting LoRaWAN concentrator&amp;#039;) # Disable Hearbeat pycom.heartbeat(False)  # Define callback function for Pygate events def machine_cb (arg):     evt = machine.events()     if (evt &amp;amp; machine.PYGATE_START_EVT):         # Green         pycom.rgbled(0x103300)     elif (evt &amp;amp; machine.PYGATE_ERROR_EVT):...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= MPPS-tiny-house-1 =&lt;br /&gt;
== main.py ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from network import WLAN&lt;br /&gt;
import time&lt;br /&gt;
import machine&lt;br /&gt;
from machine import RTC&lt;br /&gt;
import pycom&lt;br /&gt;
&lt;br /&gt;
print('\nStarting LoRaWAN concentrator')&lt;br /&gt;
# Disable Hearbeat&lt;br /&gt;
pycom.heartbeat(False)&lt;br /&gt;
&lt;br /&gt;
# Define callback function for Pygate events&lt;br /&gt;
def machine_cb (arg):&lt;br /&gt;
    evt = machine.events()&lt;br /&gt;
    if (evt &amp;amp; machine.PYGATE_START_EVT):&lt;br /&gt;
        # Green&lt;br /&gt;
        pycom.rgbled(0x103300)&lt;br /&gt;
    elif (evt &amp;amp; machine.PYGATE_ERROR_EVT):&lt;br /&gt;
        # Red&lt;br /&gt;
        pycom.rgbled(0x331000)&lt;br /&gt;
    elif (evt &amp;amp; machine.PYGATE_STOP_EVT):&lt;br /&gt;
        # RGB off&lt;br /&gt;
        pycom.rgbled(0x000000)&lt;br /&gt;
&lt;br /&gt;
# register callback function&lt;br /&gt;
machine.callback(trigger = (machine.PYGATE_START_EVT | machine.PYGATE_STOP_EVT | machine.PYGATE_ERROR_EVT), handler=machine_cb)&lt;br /&gt;
&lt;br /&gt;
print('Connecting to WiFi...',  end='')&lt;br /&gt;
# Connect to a Wifi Network&lt;br /&gt;
wlan = WLAN(mode=WLAN.STA)&lt;br /&gt;
wlan.connect(ssid='TPW4G_Cj7G2J', auth=(WLAN.WPA2, &amp;quot;&amp;lt;password-here&amp;gt;&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
while not wlan.isconnected():&lt;br /&gt;
    print('.', end='')&lt;br /&gt;
    time.sleep(1)&lt;br /&gt;
print(&amp;quot; OK&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Sync time via NTP server for GW timestamps on Events&lt;br /&gt;
print('Syncing RTC via ntp...', end='')&lt;br /&gt;
rtc = RTC()&lt;br /&gt;
rtc.ntp_sync(server=&amp;quot;pool.ntp.org&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
while not rtc.synced():&lt;br /&gt;
    print('.', end='')&lt;br /&gt;
    time.sleep(.5)&lt;br /&gt;
print(&amp;quot; OK\n&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Read the GW config file from Filesystem&lt;br /&gt;
with open('/flash/global_conf.json','r') as fp:&lt;br /&gt;
    buf = fp.read()&lt;br /&gt;
&lt;br /&gt;
# Start the Pygate&lt;br /&gt;
machine.pygate_init(buf)&lt;br /&gt;
# disable degub messages&lt;br /&gt;
# machine.pygate_debug_level(1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>EdmondLascaris</name></author>
	</entry>
</feed>