Class C Downlink Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-31 10:15 AM
Hi,
I have B-L072Z-LRWAN1 board from ST running I-CUBE-LRWAN software for LoRaWAN, and RHF0M301 gateway from RisingHF.
I am testing a class C and I have an issue in downlink, here is the scenario:
- Node transmit an uplink to server, then a delay for 30s to transmit the next packet.
- During that time I send a packet from server, it is received by gateway ( INFO: [down] a packet will be sent in �immediate� mode)
- But it is not sent to node immediately, node receives the packet before the timeout, then process the next uplink immediately. (For example, at 28s it receives the packet, at 30s it process the next uplink)
So, what is the reason of this problem? How can I solve it?
In my viewpoint, It could be caused by the gateway (no immediate transmit), or configurations in node.Best regards.
#lora #lorawanSolved! Go to Solution.
- Labels:
-
LoRa
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-06 12:25 PM
I found out my mistake and solved the problem.
I added a delay function in
OnTxNextPacketTimerEvent function for scheduling next packet transmissions. What is correct is to modify
TimerSetValue instead of modifying in other functions.
case DEVICE_STATE_SEND:
{ if( NextTx == true ) { PrepareTxFrame( ); NextTx = SendFrame( );}
if( ComplianceTest.Running == true ) { // Schedule next packet transmission as soon as possible TimerSetValue( &TxNextPacketTimer, 5000); /* 5s */ TimerStart( &TxNextPacketTimer ); } else if (LoRaParamInit->TxEvent == TX_ON_TIMER ) { // Schedule next packet transmission TimerSetValue( &TxNextPacketTimer,50000
); // add delay here TimerStart( &TxNextPacketTimer ); }DeviceState = DEVICE_STATE_SLEEP;
break; }- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-05 8:49 AM
Update:
I disabled Tx in node, and enabled only Rx. Then, I sent multiple downlinks and were received without any issue (except it takes almost 4 seconds till the action is executed, using default RX2 - SF 12)
Any ideas about the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-05 9:22 AM
Hi
Turvey.Clive.002
‌Any thought about my problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-05 10:45 AM
You should perhaps use the Semtech LoRa Calculator to determine the flight time of the data packet being sent.
There are a lot of delays in the LRWAN code, one needs to be wary of timeouts, and that the node isn't listening in TX and IDLE modes.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-05 1:54 PM
the software in the concentrator may not be top level.
Maybe you should try a different concentrator brand, not from china
'the time of flight' I calculated yesterday:
I use 9600 baud to send the packet to the module:
and then 2400 baud ' air rate'
time of flight = {Packet length} *10 / 9600; // 10 bits to a byte, transmit to module
time of flight += {Packet length} *12 / 2400; // 12 bits per byte, over the air. // includes bit stuffing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-06 8:11 AM
Not really in a position to analyze the problem further. You can better instrument the LRWAN code to understand the state it is in. The concentrator is a black box, you could change for a multitech or laird box which would likely have more robust and trustworthy firmware.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-06 12:25 PM
I found out my mistake and solved the problem.
I added a delay function in
OnTxNextPacketTimerEvent function for scheduling next packet transmissions. What is correct is to modify
TimerSetValue instead of modifying in other functions.
case DEVICE_STATE_SEND:
{ if( NextTx == true ) { PrepareTxFrame( ); NextTx = SendFrame( );}
if( ComplianceTest.Running == true ) { // Schedule next packet transmission as soon as possible TimerSetValue( &TxNextPacketTimer, 5000); /* 5s */ TimerStart( &TxNextPacketTimer ); } else if (LoRaParamInit->TxEvent == TX_ON_TIMER ) { // Schedule next packet transmission TimerSetValue( &TxNextPacketTimer,50000
); // add delay here TimerStart( &TxNextPacketTimer ); }DeviceState = DEVICE_STATE_SLEEP;
break; }- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-06 12:30 PM
Turvey.Clive.002
‌Marsh.Nick
I really appreciate your help and effort.
As I mentioned above, I did a mistake and solved it.
Now, I want send MAC commands from node. Any idea or reference code?
Also, I face another problems in the code, is there another place in ST where I get a support other than community?
Best regards.
