Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years ago.
reading/sending LoRa MAC commands in mdot node
Hello everybody.
I am trying to exchange MAC commands between the Conduit (i.e., a simple network server in it implemented with JS and mosquitto) and the mdot. I can read and writte MAC commands in the Conduit, but I do not know how to send MAC commands from the mdot to the gateway (for example, sending a 0x02 for a LinkCheckReq) nor reading the MAC commands in the incoming message from the gateway (for example, the response LinkCheckAns 0x022001). I have used the functions
injectMacCommand
and
getMacCommands
but I have failed. I would appreciate if anyone can help me with this (either read MAC from incoming messages, or sending specific MAC commands from my application running in the mdot).
Thanks in advance.
1 Answer
7 years ago.
injectMacCommand
is used to 'fake' MAC commands coming in from the network. Useful for stuff like switching RX2 frequency in testing. Nothing will actually go over the line.
You can receive MAC commands by overriding the MacEvent
handler in RadioEvents.h (if you're using Dot-Examples). Check the flags
pointer for presence of the LinkCheck
bit. Alternatively, if you want to change the link check implementation, take a look at the NetworkLinkCheck
function, you can override it in your RadioEvents.
Sending MAC commands should be simple, just send it over the line on the right port, nothing special needed.