<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
  <siteinfo>
    <sitename>Sunna</sitename>
    <dbname>mediawiki</dbname>
    <base>http://iot.siarq.com/sunna/wiki/index.php/Main_Page</base>
    <generator>MediaWiki 1.34.1</generator>
    <case>first-letter</case>
    <namespaces>
      <namespace key="-2" case="first-letter">Media</namespace>
      <namespace key="-1" case="first-letter">Special</namespace>
      <namespace key="0" case="first-letter" />
      <namespace key="1" case="first-letter">Talk</namespace>
      <namespace key="2" case="first-letter">User</namespace>
      <namespace key="3" case="first-letter">User talk</namespace>
      <namespace key="4" case="first-letter">Sunna</namespace>
      <namespace key="5" case="first-letter">Sunna talk</namespace>
      <namespace key="6" case="first-letter">File</namespace>
      <namespace key="7" case="first-letter">File talk</namespace>
      <namespace key="8" case="first-letter">MediaWiki</namespace>
      <namespace key="9" case="first-letter">MediaWiki talk</namespace>
      <namespace key="10" case="first-letter">Template</namespace>
      <namespace key="11" case="first-letter">Template talk</namespace>
      <namespace key="12" case="first-letter">Help</namespace>
      <namespace key="13" case="first-letter">Help talk</namespace>
      <namespace key="14" case="first-letter">Category</namespace>
      <namespace key="15" case="first-letter">Category talk</namespace>
    </namespaces>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>95</id>
      <parentid>93</parentid>
      <timestamp>2020-11-27T10:44:46Z</timestamp>
      <contributor>
        <username>Jordi</username>
        <id>1</id>
      </contributor>
      <minor/>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text xml:space="preserve" bytes="4812">= LoRa RMM v3.0 =
[[Image:RMM_3D_v3.0.png|center|RMM v3.0 - 3D Design View]]

== Board ==
[[File: RMM_v3.0_front.png]]
[[File: RMM_v3.0_back.png]]

== Connectors ==
=== Plastic Box Wall Connectors ===
==== SMA ====
868MHz Antenna plugged at SMA wall connector. To avoid malfunctions, it is important to connect antenna before power LoRa RMM v3.0 device up.

==== 4 pin connector ====
 1- 3V3
 2- NC (not connected)
 3- Rx (MPPT's Tx)
 4- GND


Wall Connector View:

[[File: SunnaWallConn4.jpg]]

=== PCB Connectors ===
==== ANT ====
uFL connector. SMA / uFL antenna pigtail is connected on ANT.

==== PRG ====
'''J2''': Firmware programming connector. Also, it can be used for debugging.

To avoid power supply issues, it is suggested powering device '''only''' by COMM connector (''J1'').

==== COMM ====
'''J1''': It is connected to 4 pin external connector.

 GND: BLACK
 RX:  '''RED'''    &lt;- '''Be careful!'''
 Tx:  WHITE  &lt;-- Not Connected
 3V3: '''YELLOW''' &lt;- '''Be careful!'''

== Modes ==
=== Firmware Programing ===
Button sequence:
 1- Pressing '''RST''' button
 2- Pressing '''IO0''' button
 3- Releasing '''RST''' button
 4- Releasing '''IO0''' button

[[File: SunnaRmmPrgFw00.mp4]]

Firmware programming requires a 3V3 UART board attached at PRG connector:

[[File: SunnaRmmPrgFw01.mp4]]

=== Setting LoRa Keys ===
[http://iot.siarq.com/sunna/sunnaDeviceList.ods Spreadsheet with current TTN keys]

==== Registering device at TheThingsNetwork backend ====
[https://console.thethingsnetwork.org/ The Things Network backend]

[[File: RegisteringTtnDevice.mp4]]

==== Using LoRa's Setting Tool ====
Button sequence to load LoRa keys in LoRa RMM v3.0 device:
 1- Pressing '''RST''' button
 2- Pressing '''WEB''' button
 3- Releasing '''RST''' button
 4- Releasing '''WEB''' button

[[File: SunnaRmmWebSetting02.mp4]]

LED is flashing while looking for WiFi and requesting IP from DHCP server. When it has got an IP, LED remains during 1 second on.

 Access Point '''SSID''': iotcat
 Access Point '''Password''': 1234567890a

Access Point should have Internet connection without Captive Portal.

After button sequence, open [http://iot.siarq.com/sunna/lora.html LoRa's Setting Tool]:
 5- Clicking on '''Accept MAC''' button. Then, message '''Press IO0 button''' is shown.
 6- Pressing once '''IO0''' LoRa RMM v3.0 button. Then, MAC is shown at '''Accept MAC''' button.
 7- Connection with device can be tested pressing '''Test ON''' (it lits LED on) and '''Test OFF''' (it lits LED off).
 8- Press '''Read''' button to read current keys in LoRa RMM v3.0 device (a lot of '''F''' means it is first time uploading LoRa keys).
 9- Copy keys from The Things Network backend and paste on LoRa's Setting Tool. ('''Device Address''', '''Network Session Key''' and '''App Session Key''')
 10- Set '''Spread Factor''' (ranging from 7 to 12) and '''Deep Sleep''' in minutes.
 11- Press '''Send''' to upload LoRa RMM v3.0 device values.
 12- Press '''Clear''' to clear values on web and press '''Read''' to verify new values have been uploaded.

[[File: LoadingTtnKeysToDevice.mp4]]

=== Normal Mode ===
There is not button sequence. It is by default mode when powering LoRa RMM up. Coming from other modes, normal mode can be reached pressing '''RST''' button.

Testing TTN (The Things Network) keys have been uploaded properly:

[[File: TestingTtnKeysOnDevice.mp4]]

In above video, after powering device up, '''RST''' has been pressed again to test it was working as expected.

It has been programmed to wake up every 10 minutes:

[[File: Sunna06atTTN.png]]

&lt;!--
&lt;strong&gt;MediaWiki has been installed.&lt;/strong&gt;

Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.

== Getting started ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]
--&gt;

== Troubleshooting ==
=== Flashing continuously ===
==== Normal Mode ====
LoRa RMM device has not TTN keys loaded.

'''Reason''': Because it is first time using it.

[[File: SunnaRmmTroubleshooting04.mp4]]

'''How to solve it?''': Uploading TTN keys to LoRa RMM device.

==== Setting LoRa Keys ====
Check if any other device (like a mobile phone) is able to connect to an Access Point with these settings:

 Access Point '''SSID''': iotcat
 Access Point '''Password''': 1234567890a

Reset and try it again.</text>
      <sha1>2aztocm8fsy9xrwqs3tcj9p2pd3wt82</sha1>
    </revision>
  </page>
</mediawiki>
