Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Multi peripheral with windows device API (BluetoothLEDevice/C#

Hi,

I'm using s140 trying to connect up to 8 devices to windows BLE adapter and BluetoothLEDevice object, I have 2 problems,

1- the maximum throughput with different configurations,  connection interval (7.5ms , 11.25ms , 20.25ms , 40ms) or opt.common_opt.conn_evt_ext.enable = 1/0 or different tx queue size,it is always about 220K, no matter to set tx/rx PHY as BLE_GAP_PHY_2MBPS or BLE_GAP_PHY_1MBPS , I read https://devzone.nordicsemi.com/f/nordic-q-a/37591/nrf-connect-for-desktop-max-throughput/144881#144881 hte maximum speed with windows can be 260kbps. Is there anything to do to improve the speed? I was thinking if achieving higher speed is impossible is it good idea to use one NRF52 dongle as central with USB connection to the PC and collect data from peripheral devices? what would be maximum speed we can achieve in this topology?

2- the very strange problem is as soon as connecting second device in my PC application is written by C# and windows device API(BluetoothLEDevice) the first device speed gets extremely decreased about 30kb to 8kb/s even thought the second device is not sending data. I used virtual sniffer tools  and WireShark to see if there is some hidden communication but there isn't!, I tried decrease NRF_SDH_BLE_GAP_EVENT_LENGTH to the half of connection interval and tested with different intervals but the only effect is it reduces the maximum speed but the problem still is remained which is reducing first device speed without any reason! Is that related to how windows communicate with multiple devices? if so why when i connect BT headphone it does not such an effect? 

the problem is second device as soon as connected to host application occupies almost all bandwidth and doesn't let to receive packet form the first one. We need to connect more than 8 devices to PC so is there any idea to fix this problem?

Thank you

#define NRF_SDH_BLE_GAP_EVENT_LENGTH MSEC_TO_UNITS(7.5, UNIT_1_25_MS) 

#define APP_ADV_INTERVAL                300                                     /**< The advertising interval (in units of 0.625 ms. This value corresponds to 187.5 ms). */
#define APP_ADV_DURATION                30000                                   /**< This should the same as auto shutdown timeout of PSOC. The advertising duration (300 seconds) in units of 10 milliseconds. */
#define APP_BLE_OBSERVER_PRIO           3                                       /**< Application's BLE observer priority. You shouldn't need to modify this value. */
#define APP_BLE_CONN_CFG_TAG            1                                       /**< A tag identifying the SoftDevice BLE configuration. */

#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(30, UNIT_1_25_MS)        /**< Minimum acceptable connection interval (7.5 ms). */
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(50, UNIT_1_25_MS)			/**< Maximum acceptable connection interval (30 ms). This is required by iOS */
#define SLAVE_LATENCY                   0                                       /**< Slave latency. */
#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)         /**< Connection supervisory timeout (4 seconds). */

#define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(500)                   /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */
#define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(500)                  /**< Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */
#define MAX_CONN_PARAMS_UPDATE_COUNT    30                                       /**< Number of attempts before giving up the connection parameter negotiation. */

Parents
  • I tested more devices for the problem 2, so device #A and #B have this effect but (A# with #C ) or (B# with #C ) working fine, so is there any id or some identification number which causes conflict between 2 specific devices? or is there any RF Frequency conflict between this 2 devices? 

Reply
  • I tested more devices for the problem 2, so device #A and #B have this effect but (A# with #C ) or (B# with #C ) working fine, so is there any id or some identification number which causes conflict between 2 specific devices? or is there any RF Frequency conflict between this 2 devices? 

Children
No Data
Related