This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

S120 throughput

Hi to all!

I have few questions about throughput when using s120:

  1. What is the max number of packets that could be send/received in one connection interval when using S120? (s120 specification, chapter 13 says 1tx/1rx, Hung Bui in post says 2tx/1rx, other definitions i didn't find...)
  2. A bit more tricky... In my project, my device connects up to 5 devices, some of them are smart devices. Now I'm wondering what is the best way of setting up connection interval?

Considering that smart devices have different limitations e.g. if I set min connection interval to 20 ms and max to 50ms then some of "smart" devices will set connection interval to 37.5ms. There is no problem until some other device can't communicate at such interval (Is this possible?). Who or what gurantee to me that devices will have a common factor? If not probably there will occure some collisions and connections could get dropped if supervision timeout is not realy long long.

If i refer to equation in s120 specs, chapter 11.4 where is written that connection interval should be >= "Number of devices" * Teeo + scanWindow + Tscan_reserved... During testing with 20ms connection interval some of devices get disconnected. Increasing it up to 50ms helps and connections get stable, but now is throughput 400KBps (1 packet per interval * 20 * 1/0.05) and it's to low... Is there something i can do (maybe more sophisticated way to set connection intervals) or this is the max what can i reach with s120?

Thank you!

BR Matej

  • @Matej: Could you let me know which equatoin in S120 spec you were refer to ? Section 11.2 in the S120 Spec v2.1 give you an example of having scan interval = connection interval and scanWindow ≤ connectionInterval - (8*tEEO + tScanReserved) ms. However, it's the suggestion value so that you don't have any packet loss.

    I don't think it's applied for your application since your connection interval < 8*tEEO + tScan Reserved.

    The trick is how to select the connection interval = scan interval so that they won't collide. We know that the scan window will first start synchronously with the first connection event at 8xtEEO = 18ms. We have to select a connection interval to avoid that 18ms time stamp + the scanwindow + tScanReserved.

    If we choose 10ms (means second connection event will occurs at 20ms) as connection interval we will still have collision because the scan period will occupy from 18ms to 18+ ScanWindow + tScanResevered =>21.5ms .

    I would suggest you to start with 12ms connection & scan interval and 2.5ms or 3ms scan window. The second connection event will happens at 24ms time stamp and you should have at least 2 connection slots before the next scan event happens at 30ms time stamp.

    If you have more connections than two I would suggest you to stick with slighly larger then 20ms connection & scan interval to give space for scan window.

Related