lnlp / LMIC-node

LMIC-node | One example to rule them all. LMIC-node is an example LoRaWAN application for a node that can be used with The Things Network. It demonstrates how to send uplink messages, how to receive downlink messages, how to implement a downlink command and it provides useful status information. With LMIC-node it is easy to get a working node quickly up and running. LMIC-node supports many popular (LoRa) development boards out of the box. It uses the Arduino framework, the LMIC LoRaWAN library and PlatformIO.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add MAC commands to uplinks?

BNNorman opened this issue · comments

commented

I want to use the linkCheckReq MAC command. The server should report the gateway margin and number of gateways which picked up the signal.

This could be very useful when installing nodes to ensure there is gateway redundancy (more reliability). The gateway margin indicates the chances of being able to decode the received signal - if my reading/interpretation of the LoRaWAN spec is correct.

I know I have to expose gwmargin and ngws from lmic.h and lmic.c but I tried calling put_mac_uplink_byte(0x02); (after exposing the method) but didn't see any evidence in the V3 console that the MAC command was received, just the normal uplink messages on Port 10.

Can anyone help? I have posted a similar question on github for the MCCI library and asked for an enhancement to the library but no-one has commented in 5 days. (mcci-catena/arduino-lmic#823)

Hi @BNNorman,

I'm sorry but this is not an LMIC-node related issue but MCCI LMIC related. I will therefore close the issue.

I see that you created a feature request in the MCCI LMIC repository. Posting it as a question could possibly help you get a quicker response. Other options are to try the repository's Discussions or post a question on the MCCI forum.

As far as I'm aware the user of (MCCI) LMIC is more or less isolated from MAC commands.
It is possible to manually decode MAC command requests/responses from the data buffer of downlinks but I have no experience with this. Whether it is possible to send your own MAC commands via uplinks with LMIC I don't know.