Author Topic: LWMESH-OQPSK 1000kbps  (Read 32486 times)

0 Members and 1 Guest are viewing this topic.

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
LWMESH-OQPSK 1000kbps
« on: March 26, 2017, 08:01:17 am »
Hello,

We are using at86rf212b with LWmesh stack and configured to QOPSK1000 . we have connected 3 nodes to a receiver each node with data rate of 80byts per packaet (at 200 ms interval). we are facing data loss of more than 10% ( i.e. 6 packet missing per minit) the range is also low (all boards are placed on the same table)

Please suggest if some one has some experience with this...

Thanks,

Muthu
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #1 on: March 26, 2017, 08:19:04 am »
What is your hardware?

Also, 6 packets mer minute at 200 ms sending interval is not 10%, it is 2%. And depending on how exactly this data is sent, it may not be  that bad of a result.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #2 on: March 27, 2017, 07:05:07 am »
Hi Alex,
Sorry, we wrote it wrongly. 2% loss is for One transmitter to One Receiver network. When we connect 3 boards (transmitter), we see 10% loss. Coming to Operation, We read ADC-AD7124 in Interrupt method read. It means that ADC interrupt MCU to read sample from its data registers once ADC conversion completed. We set Our ADC to 70 Samples per second data rate. So, it will interrupt MCU every 14.28ms(1/70=14.28ms).If so, at the end of 200ms, we will get 14 samples.We will send these 14 samples over LWMESH. Each sample constitute of 5 bytes. One packet has 80 bytes. Out of 80 bytes, 70 bytes are 14 samples and 10 bytes for packet identification. For every seconds, we send 5 packets over LWMESH. When we test one transmitter to One receiver setup, we see 4 packets per second instead 5 packet per second approximately every 13 S duration. I tested above without ADC by sending 80 bytes for every 200ms from one SAM L21 development board (Transmitter) to other SAM L21 development board (Receiver) to ensure this problem not with ADC.  Testing with and without ADC for this 4 packets per second do not give any difference in result. In the attached excel log, you can see that 10s(5 packets per second) and 8s (4 packets per second) in the last column for every 13 Second. Also attached sniffer log, for 1 to 1 development board test case.

Thanks,
Muthu
« Last Edit: March 27, 2017, 07:25:41 am by muthukural001 »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #3 on: March 27, 2017, 07:07:32 am »
What any of this has to do with communication problems?

I'll ask again, what hardware do you use? Have you tried to simply send data, without involving other peripherals?

So do you actually loose frames of you just counting how many frames you receive in a second?
« Last Edit: March 27, 2017, 07:09:30 am by ataradov »
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #4 on: March 27, 2017, 07:28:10 am »
Hi Alex,
We are using AT86RF212B Sub-Ghz module to send packets, SAML21J18B MCU and AD7124-ADC. Yes,we determine it by counting per second.For a minute, we can receive 5 packets per second for 54-56 seconds but we see 4 packets per second case in the remaining 4 -6 seconds. This results in 4-6 packets loss per minute.


Note: Tested at OQPSK-1000kbps.

Thanks,
Muthu
« Last Edit: March 27, 2017, 07:57:05 am by muthukural001 »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #5 on: March 27, 2017, 07:32:09 am »
We are using AT86RF212B Sub-Ghz module to send packets, SAML21J18B MCU and AD7124-ADC.
What module? What is your antenna design? And what ADC has to do with network problems?

Is your claim of packet loss based on the actual measured packet loss, or only on calculating the expected number of packets? Can you just put a counter inside the frame and see if you are missing any frames that are actually sent?

You need to start giving relevant information. I'm not going to pull it from you.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #6 on: March 31, 2017, 06:19:22 am »
Hi Alex,
Thanks. Counter method which you said really helps me. Previously, due to some logic missing, I was getting that problem. In the Counter method test, I captured packets for 7 minutes.For this 7 minutes, I am not seeing any gap in the incremented value  in the captured packets and received 5 packets for every seconds as I expected. I tested above with 1 transmitter to receiver. But, When I connect one more transmitter to receiver,  I see gap between the incremented values in transmitter 1 packets and transmitter 2 packets due to packet loss.
In our application, we need to connect 5 Transmitters to receiver. Each transmitter will transmit packet/200ms(5 packets/second) Please suggest a solution to achieve this.

We have used ATZB-212B-XPRO module and off-the-shelf antenna which part number is 66089-0906 (915MHz Whip, Straight RF Antenna 3dBi Connector, U.FL Connector Mount ).


Thanks,
Muthu

 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #7 on: March 31, 2017, 06:22:52 am »
But, When I connect one more transmitter to receiver,  I see gap between the incremented values in transmitter 1 packets and transmitter 2 packets due to packet loss.
It is not necessarily packet loss. What does the status code say in the confirmation callback on the transmitters. It will probably be channel access failure.

How exactly did you set OQPSK-1000 mode?
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #8 on: March 31, 2017, 07:50:45 am »
Hi alex,
Below is the OQPSK setting of My project.

OQPSK Setting:
config.h:
#ifdef PHY_AT86RF212B
  #define APP_CHANNEL             0x03
  #define APP_BAND                0x00
  #define APP_MODULATION          0x2E  ---->OQPSK-SIN-1000-SCR-ON
#else


Setting following in PHY_Init() and phySetChannel() respectively:

                                     phyWriteRegister(RF_CTRL_0_REG, reg | 0X02); /* GC_TX_OFFS =2 for OQPSK */

                                      /*short acknoweldgement setting */
                                   reg = phyReadRegister(XAH_CTRL_1_REG) & ~0x04;
                                   phyWriteRegister(XAH_CTRL_1_REG, reg | 0x04);



Coming to status code, I have read that appDataConf callback function gives status of the last packet transmitted. Can you tell me a proper way to check status code of multiple boards when I use more than one board?

Thanks,
Muthu
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #9 on: March 31, 2017, 04:32:02 pm »
Your settings seem to be fine. I would try to to do the same test with no modifications at all, just to get baseline. I personally have no experience with proprietary high-speed modes.

And also reduce the power. It is possible that you are saturating the radio, and unless you have a signal analyzer, you will never know.

WSNDemo checks the status, check that as an example. You can get the status in req->status.

You don't really need to look at it on multiple nodes at the same time. Just pick one and observe how its status behave while others are running on their own.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #10 on: April 02, 2017, 09:50:52 am »
Hi Alex,
Thanks. I will check status code as you said.And we have been working on this project for 6 moths. Project is 10 transmitters transmit 80 bytes of temperature value for every 200ms to Receiver.  It is not working for even Two transmitters. How should we approach further to achieve Our application?. Please suggest a solution.



Thanks,
Muthu 
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #11 on: April 02, 2017, 05:05:04 pm »
Project is 10 transmitters transmit 80 bytes of temperature value for every 200ms to Receiver.
So that's 50 full length frames in a second from a few devices. Just for reference, in 2.4 GHz range and at a standard 250 kbps data rate, a single device can realistically send to another device ~100 frames per second. This is the limit of the channel.

I don't have a whole lot of experience with non-n standard modes, so I don't know where the limit is there.

It is not working for even Two transmitters.
This is a bit strange.

How should we approach further to achieve Our application?
First of all get those status codes. You really need to be able to get information like this right away, if you want to debug this in a reasonable amount of time.

Then, start with standard data rate modes, since they do less processing magic. And try to reduce TX power.

Eventually, you may have to arrive at some time-synchronization scheme, so devices only send in their assigned time slots. You are running very close to the realistic channel limit.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #12 on: April 03, 2017, 02:41:12 pm »
Hi Alex,
Thanks. We have captured status code of one Transmitter while Two transmitters were transmitting to Receiver. In the captured Status code log,I see most of times SUCCESS(0) status and some time NWK_PHY_NO_ACK_STATUS(6). Attached code which I used to get status code and status log which contains two status that are 0 for SUCCESS and 6 for NWK_PHY_NO_ACK_STATUS. I used dev board which has serial port  as One transmitter and Our custom board which don't have serial port for other transmitter. We have used Serial port to get status code of Dev board transmitter.As our custom board don't have serial port, we are not able to do status code checking on the second board. 



Thanks,
Muthu


« Last Edit: April 03, 2017, 02:56:25 pm by muthukural001 »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #13 on: April 03, 2017, 05:03:06 pm »
NWK_PHY_NO_ACK_STATUS(6).
So the frame is sent, but never acknowledged. This may be an indication of the problems on the receiving end. What kind of processing you do to the data there? Can you show your appDataInd() function, of whatever your indication callback is called?

As our custom board don't have serial port, we are not able to do status code checking on the second board. 
It is always advisable to have a debug port, even if just on test points, just for cases like this.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #14 on: April 04, 2017, 11:01:16 am »
Hi Alex,
Below is the appDataInd callback function code,

static bool appDataInd(NWK_DataInd_t *ind)
{
   for (uint8_t i = 0; i < ind->size; i++)
   {
      ethernet=ind->data;
   }
   tcp_write(gs_pcb,ethernet,MAXLENGTH,TCP_WRITE_FLAG_COPY); //---->tcp_write & tcp_output to send RF module data over Ethernet
   tcp_output(gs_pcb);
   LED_Toggle(LED0);
   return true;
}
 Here, I am using TCP function to send received data from RF module(LWMESH) through Ethernet cable.

Thanks.We are trying to add debug(serial) port in our custom board.

Thanks,
Muthu

 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #15 on: April 04, 2017, 04:42:00 pm »
   tcp_write(gs_pcb,ethernet,MAXLENGTH,TCP_WRITE_FLAG_COPY); //---->tcp_write & tcp_output to send RF module data over Ethernet
   tcp_output(gs_pcb);

This is probably the source of your problems. How long do tcp_write() and tcp_output() take? If they take more than 5-10 ms, then you will have dropped frames.

When appDataInd() is blocked, only one other frame can be buffered in the radio for further processing, the rest of them will be rejected.

At this data rate, you need to accumulate data from many devices and send it in one chunk. And this sending must be fast, or it must be split into smaller section using state machines.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #16 on: April 05, 2017, 05:01:30 am »
Hi Alex,
Thanks. I think that the best way to judge that use sniffer instead Ethernet for monitoring packets. Ok, in the Receiver side, I will disable Ethernet function. But, I see difficulty in counting packets in Wireshark log when I capture from two boards. Is there anyway to extract the useful data(80 bytes) from Wireshark log and export it to excel?. So that I can see whether there is any packet loss or not over long period.



Thanks,
Muthu
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #17 on: April 05, 2017, 05:12:58 am »
Thanks. I think that the best way to judge that use sniffer instead Ethernet for monitoring packets. Ok, in the Receiver side, I will disable Ethernet function. But, I see difficulty in counting packets in Wireshark log when I capture from two boards. Is there anyway to extract the useful data(80 bytes) from Wireshark log and export it to excel?. So that I can see whether there is any packet loss or not over long period.

That's why you need debug UART :)

Wireshark can probably export into some text-based file format. It is not necessarily going to be only your data, but a simple Python script will do the rest.

Or you can just scroll through the log. You will see frames that got PHY_NO_ACK status by a very characteristic 4 retries in a row without Ack frames in between them. If you see that - this frame is lost. And that's also a thing to keep in mind when doing analysis on the logs -  the frame is sent, and sniffer has received it, but intended recipient did not. So you need to be smart about your parsing, not just look at counters.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #18 on: April 12, 2017, 04:49:15 am »
Hi Alex,
In the Receiver side, I tested with Serial communication instead Ethernet communication for sending the received Packets from Receiver board to PC. I set baud rate  to 115200. With this baud rate, 80 byte transmission takes 6.9ms only. However, Still I see Packet loss that is same Ethernet communication when I connect two transmitter boards to Receiver. In the attached serial port excel log, in the packets per sec for two boards column, you can see 2,3,4,5,6,7,8,9 and 10 packets per second . What we have expected was 10 packets per seconds.


Thanks,
Muthu
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #19 on: April 12, 2017, 05:05:06 am »
Don't send 80 bytes. Don't send anything at all during the test. 7 ms is still a relatively long time. Why do you need to send 80 bytes anyway?

Just count the frames, and print the counters every second. Restart the counting timer only after printout is completed.

I would try to start with one of the standard modes as well. OQPSK-250 should be fine.

Also, you really should not expect 100% delivery all the time. There will be loses.

In this case, it look like two transmitters are just fighting for the receiver. You need to look at the sniffer log. You need to look at everything at the same time, you can't just look at the transmitters side, a week later look at the receiver side, and a week later look at some logs. You need to correlate that loss on the application level to what's going on on the air at the same time.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #20 on: April 13, 2017, 04:14:26 am »
Hi Alex,
In the actual application, I need to send 80 bytes (1 packet) for every 200ms from transmitter. So, I have implemented 80 bytes transmission.
Last 10 bytes of these 80 bytes include frame counter. Here, I am testing without changing structure .


Q1: Do you want me to send less than 80 bytes for every transmission?


Thanks,
Muthu
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #21 on: April 13, 2017, 04:18:29 am »
In the actual application, I need to send 80 bytes (1 packet) for every 200ms from transmitter. So, I have implemented 80 bytes transmission.
But it does not have to be blocking. Your application is critical to timing, so you will have to use interrupts and buffering. Or you will have to implement some sort of time synchronization between the senders, so they don't try to send close to each other.

Q1: Do you want me to send less than 80 bytes for every transmission?
At this point you need to evaluate your radio performance, so you don't need to sens anything at all. Just count and exit from the indication function as fast as possible. And then once a second (or even less often) print that counter, and then reset the timer.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #22 on: April 13, 2017, 04:28:02 am »
Hi Alex,
If I am right, you are talking about Receiver. Instead sending received packets over either ethernet or serial port, you want me to put frame counter in appDataInd function of the Receiver  and reset that counter after 1 second.



Thanks,
Muthu



 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: LWMESH-OQPSK 1000kbps
« Reply #23 on: April 13, 2017, 04:35:11 am »
If I am right, you are talking about Receiver. Instead sending received packets over either ethernet or serial port, you want me to put frame counter in appDataInd function of the Receiver  and reset that counter after 1 second.
Exactly. It would be helpful to do similar procedure on the senders as well, and see how many frames they send successfully.
Alex
 

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Re: LWMESH-OQPSK 1000kbps
« Reply #24 on: April 20, 2017, 04:31:54 am »
Hi Alex,
Sorry.As I was traveling last week, I couldn't reply in time.Due to timers that I used in transmitter for sending packets for every 200 ms and in receiver for frame counting for 1s is not synchronized, I am not able to count frame in Receiver side Precisely. Actual packets should I receive for 1 second is 5 packets. But I am receiving most of the times 5 packets and some times 4 packets.
[/quote] But it does not have to be blocking. Your application is critical to timing, so you will have to use interrupts and buffering. Or you will have to implement some sort of time synchronization between the senders, so they don't try to send close to each other.

 I didn't work with any time synchronization. Can you tell me that how to implement time synchronization between senders?

Thanks,
Muthu
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf