cancel
Showing results for 
Search instead for 
Did you mean: 

I can't receive a message downlink immediately in LoraWAN Class C.

pragnesh
Associate III

hello there

I am useing stm32L496 with SX1262DVK1DAS lora module.

As firmware, I am using the latest firmeware I-CUBE-LRWAN 2.1.0

As lorwan server is am useing public lorawan network.

I am testing my device with CLASS_A and CLASS_C modes.

my Lorawan perameters are 

ACTIVE_REGION                             LORAMAC_REGION_US915
 
APP_TX_DUTYCYCLE                               30000
 
LORAWAN_USER_APP_PORT                            2
 
LORAWAN_DEFAULT_CONFIRMED_MSG_STATE    LORAMAC_HANDLER_CONFIRMED_MSG
 
LORAWAN_ADR_STATE                      LORAMAC_HANDLER_ADR_ON
 
LORAWAN_DEFAULT_DATA_RATE                      DR_1
 
LORAWAN_DEFAULT_ACTIVATION_TYPE          ACTIVATION_TYPE_ABP
 
LORAWAN_DEFAULT_PING_SLOT_PERIODICITY           4
 
US915_MAX_NB_CHANNELS                           72
 
US915_TX_MIN_DATARATE                          DR_1 
 
US915_TX_MAX_DATARATE                          DR_4
 
US915_RX_MIN_DATARATE                          DR_8
 
US915_RX_MAX_DATARATE                          DR_13
 
US915_DEFAULT_DATARATE                         DR_1
 
US915_MIN_RX1_DR_OFFSET                         0
 
US915_MAX_RX1_DR_OFFSET                         3
 
US915_MIN_TX_POWER                          TX_POWER_14
 
US915_MAX_TX_POWER                          TX_POWER_0
 
US915_DEFAULT_TX_POWER                      TX_POWER_0
 
US915_DEFAULT_MAX_ERP                         30.0f
 
US915_DUTY_CYCLE_ENABLED                        0
 
US915_MAX_RX_WINDOW                            3000
 
US915_RX_WND_2_FREQ                          923300000
 
US915_RX_WND_2_DR                              DR_8
 
US915_DEFAULT_UPLINK_DWELL_TIME                 0
 
US915_PING_SLOT_CHANNEL_FREQ                923300000
 
US915_BEACON_NB_CHANNELS                        8
 
US915_BEACON_SIZE                               23
 
US915_RFU1_SIZE                                 5
 
US915_RFU2_SIZE                                 3
 
US915_PING_SLOT_CHANNEL_DR                     DR_8
 
US915_MAX_NB_BANDS                              1
 
US915_FIRST_RX1_CHANNEL             ((uint32_t) 923300000)
 
US915_LAST_RX1_CHANNEL              ((uint32_t) 927500000)
 
US915_STEPWIDTH_RX1_CHANNEL          ((uint32_t) 600000)

To convert code from class A to class C.

I am chang variables according to below.

/* For class A  */
#define LORAWAN_DEFAULT_CLASS                       CLASS_A
 
/* For class C */
#define LORAWAN_DEFAULT_CLASS                       CLASS_C

(https://github.com/gotthardp/lorawan-server/blob/master/doc/Handlers.md#downlink) Form this reference link. I am sending my data on my node via CLASS_C and CLASS_A mode.

CLASS A JSON 

{
"data":"07080001000000000000000000000000000000000000",
"port":2
}

CLASS C JSON 

{
"data":"07080001000000000000000000000000000000000000",
"port":2,
"time":"immediately"
}

when is sent data on my module via class A it works.

In CLASS_C I expect an immediate response because the RX window is always open in class C.

In my log, I observe that my RX window is open after TX.

0693W00000QMpQDQA1.png 

when is sent data on my module via class C it's not working.

I also debug my getaway it works fine with classes A and C.

But my node does not receive data on class C.

Are there any parameters we Rely on in class C please suggest what I am missing.

please suggest me.

2 REPLIES 2
Imen.D
ST Employee

Hello @pragnesh​,

Do you have an error when you don't receive the downlink ?

Maybe you should change your node config!

I advise you to review the following resources with the basic information to know about LoRa Technology and several helpful links to get started with:

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello @Imen DAHMEN​ 

thank you for the reply

>Do you have an error when you don't receive the downlink?

My node's CLASS_C Rx window will be open but I didn't get any response from the controller side. but in getaway send data to node successfully.

In CLASS_A. data received in the gateway to the node.

0693W00000QMxMJQA1.png 

In CLASS_C. data not received in the gateway to the node.

0693W00000QMxMOQA1.png 

I am confused because my device works fine with CLASS A but does not work with CLASS C

Thank you for providing a resource.

I am familiar with these things and according to the above resources.

As per the network server, I am also using https://gotthardp.github.io/lorawan-server.

when I configure Node with CLASS_A. bi-direction communication with node to "https://gotthardp.github.io/lorawan-server" works fine.

In CLASS_C my node will successfully data transmit to the server but I am not able to receive data from server to node.

So I need suggestions on which configuration is affected when I configure CLASS_A to CLASS_C.