LMIC transmit example for NAmote-72 with GPS
Dependencies: lib_gps lib_mpl3115a2 lmic_MOTE_L152RC mbed
Deprecated and replaced with
Import programLoRaWAN-NAMote72-Application-Demo
Demonstration of Class-A LoRaWAN device using NAMote-72
LoRaWAN Network Configuration (in Config.h)
For Over the Air (OTA) activation of an End-Device, it must be configured with the following parameters:
DEVEUI
(8 Bytes) : Fist 3 Bytes is the Organizationally Unique Identifier (OUI) followed by 5 bytes of unique ID.APPEUI
(8 Bytes)APPKey
(or DEVKEY) (16 Bytes) The parameters can be entered as shown in the figure below
LoRaWAN Transmission Configuration (in Config.h)
- Inter-Frame Delay :
One can change the delay between each frame transmission using
MS_DELAY_NEXT_TX
It is advisable thatMS_DELAY_NEXT_TX
is greater than or equal to 3sec.
- Payload Length :
The lenght of the payload (in bytes) to be transmitted can be configured using
PAYLOAD_LENGTH
- Data Rate :
The data rate can be configured as per LoRaWAN specification using the paramter
FIXED_DR
- Channel Configuration :
In the case where the End-Device is transmitting over frequencies corresponding to a block of 8 channels, the block can be specified using
CHNL_HYBRID
. The value 0 corresponds to Block A, 1 corresponds to Block B and so on. When the End-Device transmits over more than 50 channels,CHNL_HYBRID
needs to be commented out
- Transmit Power :
The power of the data to be transmitted can be configured using the parameter
FIXED_TX_POWER
. The maximum transmit power allowed is as per FCC regulation, depending upon the mode of transmission.
Serial Terminal Display
By using a serial port connection using applications such as teraterm or putty, one can view the status of the End-Device. Once the End-Device Joins the network, transmission parameters such as payload data, transmit power, battery level etc. are displayed on the terminal.
Default Application Payload
This application defaults to sending uplink data to logical port 5. The application payload consists of:
Sample Application Payload Calculation for Longitude/Latitude
Payload => 00 19 F6 352BBA A94C20 FFFF
Temperature Calculation
19H => 2510
Temp = 25/2 = 12.5 oC
Battery Level
FFH => 100 %
F6H => 96.5 %
Longitude Calculation
longitude = A94C20H => 1109507210
longitudinal coordinate = -360 + (longitude10 x 180/(223))
longitudinal coordinate = -121.93
Latitude Calculation
latitude = 352BBAH = 348460210
latitude coordinate = (latitude10 x 90/(223-1))
latitude coordinate = 37.39
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
8:26682f47bff1 | 2016-03-02 | ubhat | Restructure Main.cpp & config.h |
7:7de55330772d | 2016-01-15 | dudmuck | use released mbed library |
6:0b2b2d196ddd | 2015-10-21 | dudmuck | prevent lost TX packet when OP_TXRXPEND is set. Testing reversed appeui & deveui. |
5:6244f45b15f2 | 2015-09-21 | dudmuck | CHNL_HYBRID defined with value 0 to 7 |
4:f9aaf0f82c00 | 2015-07-18 | dudmuck | shorted TX delay to 400ms |
3:d81e4a63fb2e | 2015-07-17 | dudmuck | enable HSI for ADC from deep sleep, add TX limit for low battery |
2:a8f00db60fdb | 2015-07-02 | dudmuck | support V3 mote board |
1:c3b55f1c9f7a | 2015-06-18 | dudmuck | using latest mbed-src |
0:a5e3347bad61 | 2015-06-04 | dudmuck | LMIC transmit demo for NA-mote72 with GPS |