Device to device communication (D2D)
Set D2D device credentials
The command sets the required information in order this device (listener, class C) to accept D2D packets from another device.
The two necessary parameters are the DevEUI and App Key of the device (sender device, class A).
One listener device can be associated with up to 6 sender devices.
Make sure you set up the two parameters correctly, if there is an error in either the DevEUI or App Key, D2D communication will not be established.
This command is available for devices with firmware version β₯ 1.2.
Byte index
Hex value / Meaning
0
D0 - command code
1
XX - Index the position the device information will be stored at: 0-5
2
XX - DevEUI byte 0 (Most significant)
...
9
XX - DevEUI byte 7 (Least significant)
10
XX - AppKey byte 0 (Most significant)
...
25
XX - App Key byte 15 (Least significant)
Example command: 0xD00070B3D52DD80009A2AA6C900C51AAF17E905DEB0AB683E7E3
The command instruct the device to accept D2D related packets from a device with:
DevEUI 70B3D52DD80009A2
AppKey AA6C900C51AAF17E905DEB0AB683E7E3
This information is stored at index 0 (out of a total of 6) in the device.
Hex value β Meaning
Byte index
Sent request
Received response
0
D1 - The command code.
D1 - The command code.
1
Device index - 0-5.
XX - Device index - 0-5.
2-9 10-25
DevEUI as represented in D0 command. AppKey as represented in D0 command.
Example command: 0xD100
Example response: D10070B3D52DD80009A200112233445566778899AABBCCDDEEFF
Device index is 00;
DevEUI is 70B3D52DD80009A2;
AppKey is 00112233445566778899AABBCCDDEEFF.
Remove all stored D2D credentials
The command removes the entire list of credentials stored via the 0xD0 command (both the DevEUI and App Key). Essentially any D2D device association will be removed after executing the command.
In case you want to add a sender device to the list of the receiver again, you need to reset the sender device in order for the communication chain to be established (even if the sender device was previously in the list).
This command is available for devices with firmware version β₯ 1.2.
Byte index
Hex value / Meaning
0
D2 β command code
Example command: 0xD2
Get D2D radio settings
Π’hese radio settings mirror the ones used for the LoRaWAN RX2 window. Since the default values can be modified by MAC command, the current command is used to retrieve them (as they might have changed through the the time the device has been operational).
These parameters are still used for D2D communication, even if the device is not pat of or is not able to join a LoRaWAN Network. We recommend using a spreading factor no greater than SF9 for D2D communication in order to keep the air time short (this will limit interference, network congestion and optimize battery life).
This command is available for devices with firmware version β₯ 1.2.
Byte index
Hex value / Meaning
Received response
0
D3 β The command code.
D3 β The command code.
1
XX β Bandwidth.
00 β 125kHz;
01 β 250kHz;
02 β 500kHz.
2
XX β Spreading factor. Value in the range 7-12.
3
XX β frequency bits [23:16].
4
XX β frequency bits [15:8].
5
XX β frequency bits [7:0].
Resultant frequency in hertz can be calculated by the equation:
f, [Hz] = frequency bits [23:0] * 100
Example command: 0xD3
Example response: 0xD3000984ADD2 β The device radio receiver is configured on SF9, 125kHz bandwidth and the channel frequency is 0x84ADD2 * 100 = 869.525MHz.
Last updated
Was this helpful?