I am trying to send a message to my TTN application using ABP encryption mechanism through RN2483 LoRaWAN microchip and Raspberry Pi 3. In this case, I am using ArduPi extension board and enable UART and then raise GPIO4 (as HIGH) to make the processes successful. However, command line reference mentioned that how to transmit command which include both mac and radio command

# at page 22-23
mac tx <type> <port> <hex_data>  

# at page 45-46
radio tx <hex_data>

mac pause and mac resume has been executed before each radio commands. The device has successfully joined with the ABP configuration on the TTN. The mac and radio commands is giving the expected response as mentioned in the command reference. By the way, TTN doesn't get any message from LoRaWAN module.


  1. Does mac tx and radio tx commands are used for same purpose? I mean can I transmit a message by any of them?
  2. Why messages are not transmitting to TTN? Do I need to have a gateway here?
  • This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center. -- You should ask this question on IoT SE.
    – M. Rostami
    Mar 26, 2020 at 7:59

1 Answer 1


Well, this should be asked into IoT and maybe they'll tell you to ask into Electronics. With rpis being catch-all wizards I guess I'll drop you a line anyway.

Does mac tx and radio tx commands are used for same purpose?

Absolutely not. It's better to start from the raw radio tx. Look at the example:

radio tx 48656c6C6F
// Transmits a packet of [0x48][0x65][0x6c][0x6C][0x6F]; Hello.

You can also read a bit below:

The mac pause command must be called before any radio transmission or reception, even if no MAC operations have been initiated before.

And right at payload description:

data: hexadecimal value representing the data to be transmitted, from 0 to 255 bytes for LoRa modulation and from 0 to 64 bytes for FSK modulation.

Note there are a few low-level details here. If you go to page 44 you can read the description of the various commands:

tx This command configures a simple radio packet transmission according to prior configuration settings

Then go to page 12 and see figure 1-2 showing the relationships between MAC and Radio commands. Radio commands are also referred as 'transceiver' commands.

Let's go back to mac tx. As you can see at page 22 this has knowledge of some LoRaWAN notions such as type and portno.

What this latter function will do is to wrap your data in a valid LoRaWAN compatible envelope (bigger) and send the result to radio tx. In other words, radio tx is the low-level packetized raw send allowing use of the radio as a pure 'emitter', perhaps with LoRa modulation but without the WAN part. This is very convenient to build your own protocol.

Why messages are not transmitting to TTN? Do I need to have a gateway here?

Certainly. In theory the raspberry is fairly well set up to be the gateway itself and then you need someone to send data to you. You are omitting too many details to make any reasonable guess but I would encourage in using the raw radio first and build in small steps. Example: "here"... where?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.