When using raw LoRa, you do not have to register your module in any way. The modules can talk to each other directly.
In order to connect your LoRa capable Pycom module to a LoRaWAN network you will have to register your device with the desired network. We are unable to provide instructions for all LoRaWAN networks but below you will find some generic instructions, along with links to any specific guides we are aware of.
Firstly you will need to get your modules
Device EUI, this can be achieved using the following code:
from network import LoRaimport ubinasciilora = LoRa(mode=LoRa.LORAWAN)print(ubinascii.hexlify(lora.mac()).upper().decode('utf-8'))
The output will be a hex string like:
70B3D5499585FCA1. Once you have this you will need to provide it to your LoRaWAN network which will then provide you with the details need to connect via Over-the-Air Activation (OTAA) or Activation by Personalisation (ABP)
If you wish to connect via OTAA (which is the recommended method) the network will provide you with an
Application EUI and
Application Key. The former identifies what application your device is connecting to, the latter is a shared secret key unique to your device to generate the session keys that prove its identity to the network. Once you have these you can use the LoRaWAN OTAA example code to connect to the network.
With ABP the encryption keys enabling communication with the network are preconfigured in the device. The network will need to provide you with a
Network Session Key and
Application Session Key. Once you have these you can use the LoRaWAN ABP example code to connect to the network.