Hot![FAQ]Basic Commands for ABP Join

  • Total Posts : 49
  • Reward points : 0
  • Joined: 2015/11/06 20:05:06
  • Location: 0
  • Status: offline
2016/08/27 05:27:18 (permalink)
5 (1)

Basic Commands for ABP Join

The example below shows the essential commands needed to join a LoRaWAN network using ABP join. Also some optional commands are shown. This process uses mainly 'mac' level commands, although a few 'sys' commands are used as well. The test mode 'radio' commands are not needed when using the LoRaWAN mac protocol.
Activation By Personalisation (ABP) join relies on exchanging three essential pieces of information between the end node and the network server. These are the device address (devaddr) used to identify packets in the network, the network session key (nwkskey) used for authentication, and the application session key (appskey) used for payload encryption. These can be generated either by the end node or the server, but must match at both ends.
With ABP join, there is no over-the-air communication during the join process (see alternative method OTAA). The devaddr and keys are just being set up in the mac layer of the end node ready for use. For this reason the 'accepted" response doesn't actually prove that the end-node is communicating with a network, it just means the parameters have been set up in the mac layer correctly.
In the RN2483 example below, > indicates a command to the modem and < indicates a response from the modem:
// OPTIONAL - resets the module firmware to default values
> sys reset                                          < RN2483 1.0.1 Dec 15 2015 09:38:09
// OPTIONAL - resets the module firmware to default values, plus clears the EEPROM
> sys factoryRESET                                   < RN2483 1.0.1 Dec 15 2015 09:38:09
// OPTIONAL - reads the IEEE EUI of the module.  Can be useful for node serialisation
> sys get hweui                                      < 0123456789ABCDEF
// MANDATORY - in this example the least-significant half of hweui is used
> mac set devaddr 89ABCDEF                           < ok
// MANDATORY - unique per device & must match server
> mac set nwkskey 0123456789ABCDEF0123456789ABCDEF   < ok
// MANDATORY - unique per device & must match server
> mac set appskey 0123456789ABCDEF0123456789ABCDEF   < ok 
// OPTIONAL - default value is 34. Some private networks use 12
> mac set sync 34                                    < ok
// OPTIONAL - default is off, but ADR is healthy for battery life & capacity if supported by the network
> mac set adr on                                     < ok
// OPTIONAL - saves all the settings to EEPROM for future use
> mac save                                           < ok
// MANDATORY - prepares the LoRaWAN mac with the personalised settings
> mac join abp                                       < ok
                                                     < accepted
// DEFAULT - transmit an unconfirmed packet on port 1. "Hello World!"
> mac tx uncnf 1 48656c6c6f20576f726c6421            < ok
                                                     < mac_tx_ok
// OPTIONAL - transmit a confirmed packet on port 1. "Hello World!"
> mac tx cnf 1 48656c6c6f20576f726c6421              < ok
                                                     < mac_tx_ok
                                                     < mac_rx 1 23                       
// NOTE - cnf or uncnf uplinks may receive a downlink packet from the server. E.g. 0x23 on port 1 
In this example ASCII text is being sent, but the payload can be any hexidecimal bytes
post edited by @JDP - 2016/09/09 03:37:38

2 Replies Related Threads

    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2016/05/16 06:37:33
    • Location: 0
    • Status: offline
    Re: Basic Commands for ABP Join 2017/09/20 01:40:14 (permalink)
    I'm using DV164140-1 development kit. i have followed the steps described in reference document. So i'm able to send data to server.
    Then i tried above commands. Rn2483 module uplinking data to gateway. but module not receiving anything back from the server(down linking).
    How I can receive data from the server though gateway? 
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2007/03/12 02:59:04
    • Location: 0
    • Status: offline
    Re: Basic Commands for ABP Join 2017/09/22 00:12:35 (permalink)
    Bravo JDP for this article.
    Thank you for sharing
    Jump to:
    © 2017 APG vNext Commercial Version 4.5