Author Topic: Simblee GZLL performs worse than RFduino GZLL?  (Read 1146 times)

mjkuwp94

  • RFduino Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Simblee GZLL performs worse than RFduino GZLL?
« on: March 18, 2017, 06:18:24 AM »
Hello,

Previously I had excellent results with GZLL on RFduino modules, typically sending 2 to 4 byte packets each 8.3 ms.

This year I made a new system using Simblee and found some gaps in my data.  There are periodically chunks of 5 or 6 data packets in a row (approximately 60ms lost time) that do not arrive and thus do not receive an ack.  I have a packet counter and check the ack against this counter.

I have the same code, switchable between RFduino and Simblee modules with #define statements.  On the RFduino the communication is very reliable unless I push the packet rate to each 3ms, and even then I just lose the occasional single packet.

NOTE: I have tested this with Simblee dev boards as the transmitter and receiver.  I did this to confirm that my hardware was not the root cause.  Also, I am not using any Bluetooth or Simblee for Mobile.

QUESTIONS:

1. What can be happening to interrupt transmission of GZLL packets?  difficult question of course!

2. Can the Simblee modules be programmed with an image that would convert them to be RFduino?  That would be preferred if the root cause of this difference is the library.

3. I tried to compile a new GZLL library using the batch file in the sources but it fails because many files required by the batch program are missing.  Could these be made available?

4. What are the differences between GZLL on Simblee and GZLL on RFduino?  Maybe I can adjust the registers to accommodate the difference.

5. Is Simblee still an active project or is it cancelled or abandoned?

Thanks in advance for any help or advice!

Mark
« Last Edit: April 08, 2017, 03:27:45 AM by mjkuwp94 »

tolson

  • Global Moderator
  • *****
  • Posts: 866
  • Karma: +20/-0
    • View Profile
    • Thomas Olson Consulting
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #1 on: March 18, 2017, 08:46:52 AM »
Hi Mark,
All good questions people want to know.

I forwarded your post to the RF Digital team.

I wish we could burn in whatever version we want. Simblee, RFduino, Nordic, our own. etc. at will, and go back.

I think the Simblee hardware is absolutely the best smallest complete solution as far as the Nordics nRF51 is concerned. And boocoo more Simblee modules could be sold if it wasn't closed source... just because it is the best smallest complete nRF51 solution.
Ultimately it would be nice if we had access to 1). source code to fix things faster. 2) ability to reload RFduino/Simblee bootloader/firmware.
« Last Edit: March 22, 2017, 08:06:16 AM by RFD_Nelson »

mjkuwp94

  • RFduino Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #2 on: March 18, 2017, 09:01:57 AM »
Thanks! for your prompt response and assistance.

The last thing I did is that I had my Simblee sending data to an RFduino GaZeLL Dongle.    The results are the same so I think the problem is on the transmitter side.

I am trying to confirm as quickly as I can whether the Simblee hardware itself could be the cause of transmission issues or the particular silicon version or most likely the specific libraries.  I need to determine if a re-spin of my hardware is required.  After that it may be a matter of choosing the next toolchain.  As a worst case I need to code my software to work around the lost packets but obviously that is not ideal at all. 

Of course the RFduino and Simblee systems have been great to a point but as you may have implied the closed nature is a huge detraction.  My next choices will be based on how well I can stand alone and be bare metal (not mbed, for example).
« Last Edit: March 18, 2017, 10:55:56 AM by mjkuwp94 »

tolson

  • Global Moderator
  • *****
  • Posts: 866
  • Karma: +20/-0
    • View Profile
    • Thomas Olson Consulting
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #3 on: March 18, 2017, 09:22:47 AM »
Of course the RFduino and Simblee systems have been great to a point but as you may have implied the closed nature is a huge detraction.  My next choices will be based on how well I can stand alone and be bare metal (not mbed, for example).

If you are comfortable with MBED development you can use the MBED compiler and it's advanced methods to obtain a .HEX file that you can then load onto the Simblee using the JTAG(SWD) interface and blow away the Simblee bootloader in the process.  I don't know if MBED nRF51 support includes the Nordic Gazell protocol library though.

RFD_Nelson

  • RFduino Team
  • *****
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #4 on: March 22, 2017, 08:07:22 AM »
Hi mjkuwp94,

Thanks for your interest in Simblee!

To help you further, can you post a copy of your sketch or send it to us at: support@rfdigital.com?

We'd be happy to take a look and help you out!

mjkuwp94

  • RFduino Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #5 on: March 25, 2017, 06:10:50 AM »
thank you!

I took some time and pared the sketches down toward the minimum for the demo.  Each sketch can be changed between Simblee and RFduino by changing line 3.  There is a line to change to SimbleeCOM but I didn't test that code.  I don't understand what SimbleeCOM is so I am hesitant to go down that rabbit hole.

The attached .zip file has some example output in addition to the two sketch files and a helper script written in Python.  The Python code isn't necessary but it was helpful to me in making the results just a bit more clear on the receiving end.

It is enough to change just the Device (switch between Simblee/RFduino) and leave the Host the same but to validate things I changed board types at both ends.

The Device code runs for 20 seconds and then stops on purpose. This length of time is sufficient to notice the differences.  Small packets are sent each 8ms and there is a counter from 0 to 31 used to track the 'ack' of each specific packet.  With either setup there can be moments when the communication time varies enough that it appears to be a lost packet according to the time between receiving them.  However with the RFduino no packets are lost as indicated by the counter.  When the Simblee is sending as the Device there are several instances of time gaps in receipt corresponding to 6 missing packets. 

Summary:
Simblee sending - 6 instances of 6 lost packets in a row within 20 seconds (about 50ms gap)
RFduino sending - jitter but no lost packets.


thanks,
Mark


PS
I am using bone stock RFdigital dev boards, 2 Simblee boards (one is the large one with all pins), 2 RFduino boards and 2 USB serial converter boards.

tolson

  • Global Moderator
  • *****
  • Posts: 866
  • Karma: +20/-0
    • View Profile
    • Thomas Olson Consulting
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #6 on: March 25, 2017, 09:32:33 AM »

 I don't understand what SimbleeCOM is so I am hesitant to go down that rabbit hole.

I am using bone stock RFdigital dev boards, 2 Simblee boards (one is the large one with all pins), 2 RFduino boards and 2 USB serial converter boards.

SimbleeCOM is a RF Digital propriatary modification of  BLE protocol that only works on the Simlbee firmware and not supported on RFduino firmware or other BLE devices. It is not applicable to a mixed Simblee/RFduino/Competitor BLE environment, nor a GZLL project per se.

So whatever is going on with GZLL Simblee vs RFduino needs to be figured out.



mjkuwp94

  • RFduino Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #7 on: March 31, 2017, 05:42:40 AM »
Hello RF-Digital team.

Do you have any thoughts based on my upload?  I posted my code last week on Saturday (March 18) after you  had offered to look at it.

RFD_Nelson

  • RFduino Team
  • *****
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #8 on: April 07, 2017, 04:38:24 AM »
Hi mjkuwp94,

I apologize for the delay in response. Our Engineering team is taking a look at your example code (thanks!).

RFD_Nelson

  • RFduino Team
  • *****
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL
« Reply #9 on: April 07, 2017, 04:59:39 AM »
Engineering has taken a look at the sketch and we have a few questions:

1. How far apart are the two Simblee's? How far apart are the two RFduinos?
2. According to your results, the Simblee communication is much more stable than the RFduino in terms of jitter. What happens if you increase the packet timing? Every 10ms? 20ms? Does everything come across ok on both devices?
3. What is the cutoff timing that you're seeing? You said the RFduino seems to be able to do 3ms, do you have an excel sheet with results for that timing? How about on the Simblee?

SimbleeCOM is a highly-optimized protocol for sending data between many, many devices on a Simblee network. You could easily broadcast information with 3ms packet latency and 10us jitter to over 100 nodes, or more!

I see that you already have SimbleeCOM functionality built in to your sketch, have you tried this same demo using SimbleeCOM?

You said that you didn't want to go down that rabbit hole, but I highly recommend that you take a look. We would be happy to help in any way we can! There are videos on our YouTube channel (youtube.com/simblee), and in this forum, along with code that shows how to utilize SimbleeCOM, and we have many knowledgable users that I'm sure would be willing to chime in as well!

Again, I'm sorry for the delay in response, I look forward to hearing back from you!

mjkuwp94

  • RFduino Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL?
« Reply #10 on: April 08, 2017, 06:20:42 AM »
hi, thanks for your help!

The Simblees and RFduinos are about 1 meter apart in these tests. (in my family room on the couch )

With Simblee+Gazell and 20ms packet spacing everything comes through including ACK over the 20 second test period
  with same and 10ms spacing there are 5 instances of packet loss, 4 contiguous packets each time over 20 seconds
  with same, the faster one sends packets, the more packets are lost in a row (more details below)

RFduino+Gazell works down to 2ms packet spacing (fastest I tried) with no packet loss but there are gaps of up to 12ms between receipt of the packets.  Of course the subsequent packets come in quite fast.  In other words the jitter is high.

I also tried the SimbleeCOM communication and this does create somewhat different results.  The packets are typically more evenly spaced but there are some limits, at least with my code.
 - faster than 25ms packet spacing, I cannot send ACK back to the sender
 - at 15ms packet spacing, attempting to send ACK seems to cause packet loss of 50%

so, I changed to not send an ACK
 - without sending an ACK, communication is good down to 12ms spacing, but not below.
 - example, at 8ms packet spacing 66% of packets come through (one each 12ms)

nevertheless, I am intrigued by the SimbleeCOM protocol and may decide to use this at a rate of 16ms.  My data is created at about 8ms intervals but I may not have any loss of accuracy if I use a bit of filtering and send at a 16ms rate.  If this rate has less jitter it is even better : ) due to the way my host uses the data.

My next task in the coming weeks will be to check the actual physical lag using a logic analyzer.  I am curious to know how much latency there is of the data across the radio link.  This is also of some significant importance in my system.

thanks again!

Mark

PS

I attached the code use for these tests - simplified somewhat from the previous attachment.

Here are the notes I took as I performed the tests

Code: [Select]
#define MS_BETWEEN_GAZELL_PACKET_TX 9

/* Simblee Gazell RESULTS
  20ms setting, NO packets lost in 20 seconds
  19ms setting, NO packets lost in 20 seconds, occasional jitter to 32ms gap
  18ms setting, varies (0 to 6 packets lost in 20 seconds) 1 packet per bunch
  17ms setting, 1  packet  lost per bunch, 1 to 5 bunches total in 20 seconds
  15ms setting, 2  packets lost per bunch, 1 bunch   total in 20 seconds
  10ms setting, 4  packets lost per bunch, 5 bunches total in 20 seconds
   8ms setting, 6  packets lost per bunch, 5 bunches total in 20 seconds
   5ms setting, 11 packets lost per bunch, 8 bunches total in 20 seconds
*/
/* RFduino RESULTS
 * 
  8ms setting, NO packets lost in 20 seconds, up to 22ms between packet max (jitter)
  5ms setting, NO packets lost in 20 seconds, up to 12ms between packet max (jitter)
  3ms setting, NO packets lost in 20 seconds, up to 8ms between packets max (jitter)
  2ms setting, NO packets lost in 20 seconds, up to 12ms between packets max (jitter)
*/

/* Simblee COM with ACK
  30ms setting, NO packets lost in 20 seconds, VERY low jitter, ACK works
  25ms setting, NO packets lost in 20 seconds, VERY low jitter, ACK works
  -------------------------------------------
  24ms setting, two packets were +6ms/-6ms jitter no ACKS came through
  23ms setting, packets are timed properly but no ACKS come through
  22ms setting, packets are timed properly but no ACKS come through
  20ms setting, packets are timed properly but no ACKS come through
  15ms setting, about every OTHER packet comes through, 30ms between events
 
*/

/* Simblee COM without ACK
  16ms setting
  15ms setting, everything comes through little jitter
  12ms setting, everything comes through little jitter
  9ms setting,
   8ms setting, packets are spaced each 12ms, so 66% of packets come through.
 
*/
« Last Edit: April 08, 2017, 06:59:42 AM by mjkuwp94 »

RFD_Nelson

  • RFduino Team
  • *****
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL?
« Reply #11 on: April 10, 2017, 05:11:07 AM »
Hi mjkuwp94,

Thanks for posting this, we'll take a look at the new data. Try something for me please, add SimbleeCOM.mode = LOW_LATENCY; in your setup() before you start SimbleeCOM, and let me know what you get for packet timings.

mjkuwp94

  • RFduino Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Simblee GZLL performs worse than RFduino GZLL?
« Reply #12 on: April 14, 2017, 07:23:01 PM »
hi, sorry for the delay in responding.  We had a family vacation this week and for once I didn't bring the hardware with me  ;)


With this

Code: [Select]
SimbleeCOM.mode = LOW_LATENCY; //new
  SimbleeCOM.begin();

There is a difference.  At 8ms gap between packets being sent I can now employ an ACK from the host to the device and the packets come through at 8ms intervals for the most part.  In one test there was a 16ms gap for one data point. The times were:

(...,8,8,16,1,6,9,8,8,...) ms

and no packets are lost
I modified the Python script so that both Device and Host could send data to the uart to be timed.  With this method it seems like the packets are recieved 11ms after they are sent.  I realize using a UART is not a great way to check timing so my next step is to work out a scheme with the GPIO pins so I can track the timing of the specific packets.  I think the SimbleeCOM protocol will work well for me - thanks!

 

anything