0.0.7
Creates a Duplex stream (in object mode) which reads and writes to a LoRa radio link.
It can perform over-the-air activation of devices it knows about on behalf of your application.
Messages received from the radio link are made available to read from the Duplex and have the following properties:
nwk_addr (Buffer)
- Unique network address of the sending device.dev_eui (Buffer)
- Unique global device identifier (IEEE EUI64) of the sending device.dev_addr (Buffer)
- Combined identifier of your network (7 most significant bits) and the unique network address of the sending device (i.e. nwk_addr
, 25 least significant bits).payload (Buffer)
- The data which the sending device sent to your application.msg (Object)
- The raw packet received by packet_forwarder_shared. The format is described here.packet (Object)
- The decoded packet. Anthony Kirby's excellent lora-packet is used to do the decoding.reply (Object)
- This contains nearly everything needed to reply to the message. Your application just has to set the payload.
header (Object)
- The metadata required by packet_forwarder_shared to send the reply. See section 6 of here.encoding (Object)
- The fields required by lora-packet to encode the reply.payload (undefined)
- Your application must set this property to a Buffer containing the data you want to send back to the device.If your application wants to reply to the message, set reply.payload
to
the data that should be sent and then write reply
to the Duplex.
Extends stream.Duplex
(class)
The
Objection.js Model class
, or a subclass of it, already
configured for your database using Knex.js
.
(stream.Duplex)
lora-comms uplink stream
. Your application must
start
the
lora-comms
module first and then retrieve the uplink.
(stream.Duplex)
lora-comms downlink stream
. Your application must
start
the
lora-comms
module first and then retrieve the downlink.
(Object)
Configuration options.
Name | Description |
---|---|
options.appid Buffer
|
8-byte identifier of your application in the IEEE EUI64 address space. This is also known as the AppEUI and your OTAA devices must use the same value. |
options.netid Buffer
|
3-byte identifier of your network. The 7 least significant bits must be unique for neighbouring or overlapping networks. |
If the supplied device address is on the network configured
for this link (options.netid
) then return its unique
global device ID (IEEE EUI64).
(Buffer)
Combined device and network address.
(Buffer | null)
:
If the device is on the configured network then its IEEE EUI64 ID otherwise
null
.