Hands on with LoRa in North America. #2

Public LoRa Configuration

In the previous post, I have explained how to configure Multitech Conduit and mDot module to communicate with each other, using private LoRa network mode. Today, we will change it to use public LoRa mode, however we still use just one device to observe incoming packets. We will be running Network Server together with a Gateway on our Conduit.

Let’s change configuration of the LoRa-network-server by editing /var/config/lora/lora-network-server.conf like below:

{
"lora": {
"netID": "010203", /* netID for beacon packets */
"frequencyBand": "915", /* US="915", EU="868" */
"frequencySubBand": 7, /* Sub-band for US operation, 1-8 */
"rx1DatarateOffset": 0, /* Datarate offset for mote rx window 1 sent in join response (0-3) */
"rx2Datarate": 12, /* Datarate for mote rx window 2 sent in join response (7-12) */
"maxTxPower": 14, /* Max Tx power (dBm), -6 to 26 default 14 */
"frequencyEU": 867500000 /* center freq for extra EU channels (Hz) */
},
"udp": {
"appPortUp": 1784, /* port for user-developed application use */
"appPortDown": 1786 /* port for user-developed application use */
},
"addressRange": {
"start": "00:00:00:01", /* address range used for mDots */
"end": "FF:FF:FF:FE"
},
"network": {
"public": true, /* set to false for private LoRa network with mDots + Conduit */
"leasetime": 1440, /* time until mDot join expires (minutes) */
"eui": "02:00:00:00:00:ee:ff:c0", /* configure network security */
"key": "2b:7e:15:16:28:ae:d2:a6:ab:f7:15:88:09:cf:4f:3c"
},
"log" : {
"console" : true,
"syslog" : false,
"level" : 30, /* error=10, warn=20, info=30, debug=50, trace=60, max=100 */
"path": "/var/log/lora-network-server.log"
},
"mqtt": {
"enabled": true
}
}

We can then restart the server by executing the following command:

/etc/init.d/lora-network-server restart

Now, we will connect to our mDot module, and using AT commands we will change it’s network mode to be a public mode plus we will provide network related information to match our Conduit system. Actually, we will be using the same network information which one would use to connect to The Things Network, in a future post we will show how to use the Packet Forwarder and connect to their Network Server.

Lets execute the following:

AT+PN=1      //set the public network mode

AT+NI=0,0200000000eeffc0     //set network id
AT+NK=0,2b7e151628aed2a6abf7158809cf4f3c //set network key

Run AT&V, and you should see something like that:

Device ID: 00:80:00:00:00:00:9e:be
Frequency Band: FB_915
Frequency Sub Band: 7
Public Network: on
Start Up Mode: COMMAND
Network Address: 00000001
Network ID: 02:00:00:00:00:ee:ff:c0
Network ID Passphrase:
Network Key: 2b.7e.15.16.28.ae.d2.a6.ab.f7.15.88.09.cf.4f.3c
Network Key Passphrase:
Network Session Key: cb.75.96.1a.ae.fa.d1.23.ca.86.f1.dc.97.6f.28.10
Data Session Key: 0c.5c.3c.ff.d9.16.9b.fe.a6.0c.6c.29.b8.b6.34.59
Network Join Mode: OTA
Network Join Retries: 2
Join Byte Order: LSB
Link Check Threshold: off
Link Check Count: off
Error Correction: 1 bytes
ACK Retries: off
Encryption: on
CRC: on
Adaptive Data Rate: off
Command Echo: on
Verbose Response: off
Tx Frequency: 0
Tx Data Rate: SF_9
Tx Power: 11
Tx Wait: on
Tx Inverted Signal: off
Rx Frequency: 903700000
Rx Data Rate: SF_9
Rx Inverted Signal: on
Rx Output Style: HEXADECIMAL
Debug Baud Rate: 115200
Serial Baud Rate: 115200
Wake Mode: INTERVAL

Wake Interval: 10 s
Wake Delay: 100 ms
Wake Timeout: 20 ms
Log Level: 0

Public LoRa
At this point you are ready to go, connect to your mDot and send something to your conduit looking either at logs or subscribing to mqtt topic as per instructions from the previous post

AT+JOIN

AT+SEND=hello world

In the next post, we will connect 3rd party, HopeRF LoRa radio with Teensy 3.2 MCU and then test it with our Conduit Public LoRa gateway

LoRa FAQ

PART 3->

Leave a Reply

Your email address will not be published. Required fields are marked *