IW612: Connection getting slower after 4 devices connected

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IW612: Connection getting slower after 4 devices connected

703 Views
marmottus
Contributor III

Hello,

I am using the IW612 connectivity chip and noticed that the performance degrades after connecting to 4+ devices.

I am using the chip with btnxpuart driver and firmware SDIW612---18.99.2.p66.17-MM6X18437.p3-GPL-(FP92) on a 6.6 kernel.

My application is acting as a central and is supposed to support up to 10 simultaneous connections with the peripherals.

I have noticed that after connecting a 4th device, the connection is slowing down, same for the next devices.

The steps are the following

  • The first peripheral starts advertising
  • My application connects to the peripheral
  • The second peripheral starts advertising
  • My application connects to the peripheral
  • And so on until the 10th device

I am connecting with the LE Extended Create Connection (0x08|0x0043) HCI command using 30/50ms as a connection interval.

 

 

< HCI Command: LE Extended Create Connection (0x08|0x0043) plen 26
        Filter policy: Accept list is not used (0x00)
        Own address type: Public (0x00)
        Peer address type: Random (0x01)
        Peer address: DF:FE:50:C3:94:53 (Static)
        Initiating PHYs: 0x01
        Entry 0: LE 1M
          Scan interval: 60.000 msec (0x0060)
          Scan window: 60.000 msec (0x0060)
          Min connection interval: 30.00 msec (0x0018)
          Max connection interval: 50.00 msec (0x0028)
          Connection latency: 0 (0x0000)
          Supervision timeout: 3000 msec (0x012c)
          Min connection length: 0.000 msec (0x0000)
          Max connection length: 0.000 msec (0x0000)

 

 

 

Once connected, BlueZ will start automatically discovering services, I calculated the delta between the connection time and the last characteristic discovered.

Here are the connection+discovery times in seconds:

  • 2.263
  • 2.313
  • 2.189
  • 2.201
  • 4.208
  • 6.810
  • 8.423
  • 11.295
  • 13.099
  • 15.474

From 1-4 devices, the average is around 2.2 seconds but starting with the 5th device it is already at 4.2s and keeps increasing the more devices are connected.

I am not doing anything more than scanning and connecting to the devices.

Is this expected or is there some fine tuning I could be doing?

I would like to keep the connection interval < 60ms.

I attached the btmon logs

 

Labels (1)
0 Kudos
9 Replies

645 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

 

Could you please help me with the following information?

  • What host are you using?
  • What wireless module are you using?
  • The 10 connections are successful but slow, am I right?
  • Do you use the BlueZ command line interface (bluetoothctl)?

 

Regards,

Daniel.

0 Kudos

619 Views
marmottus
Contributor III

Hello Daniel,

What host are you using?

I'm on a Raspberry Pi Zero 2W, using the chip over SDIO-UART.

What wireless module are you using?

Panasonic PAN9019

The 10 connections are successful but slow, am I right?

Yes, exactly. they are established but get slower.

Do you use the BlueZ command line interface (bluetoothctl)?

I used both, I did a test with bluetoothctl using the two commands

  • scan on
  • connect BDADDR

and the test from which I attached the traces was directly by using hcitool but with BlueZ daemon still running of course:

 

#!/usr/bin/env bash

devices_addr=(
	"DF:FE:50:C3:94:53"
	"ED:32:D5:32:D5:57"
	"F1:78:70:EB:EE:89"
	"C2:BD:C5:68:39:F3"
	"D6:F0:3F:73:EC:0E"
	"D3:B2:09:EE:53:34"
	"C0:D0:C7:E3:A4:70"
	"E3:5C:EC:8E:D3:B4"
	"CB:7A:4E:48:95:64"
	"D2:43:74:5F:42:B5"
)


for addr in ${devices_addr[@]}; do
	echo "${addr}"
	addr_reversed="${addr:15:2} ${addr:12:2} ${addr:9:2} ${addr:6:2} ${addr:3:2} ${addr:0:2}"
	sudo hcitool cmd \
		 08 0043 \
		 00 \
		 00 \
		 01 \
		 ${addr_reversed} \
		 01 \
		 60 00 60 00 \
		 18 00 28 00 \
		 00 00 \
		 2C 01 \
		 00 00 \
		 00 00
	sleep 20
done

 

 

We are also seeing the range decreasing the more we connect devices, with 2-3 devices we can achieve great lengths (>50m) but as soon as we connect 4+ it goes down to 10-ish meters.

 

0 Kudos

546 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

Thanks for sharing. I'm taking a look to this. 

When you say "slower", you mean the connection time between peripheral and central, am I right? Is this affecting the communication as well i.e. sending data, etc? 

 

Regards,

Daniel.

0 Kudos

498 Views
marmottus
Contributor III

When you say "slower", you mean the connection time between peripheral and central, am I right? Is this affecting the communication as well i.e. sending data, etc? 

Yes, the connection between the 2 is slower, the discovery of services is significantly slower after connecting the 5th device as if the latency was increased even though 45ms is chosen.

I will need to check to make sure that also afterwards it stays slow but as far as I remember it does not get better.

0 Kudos

472 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

It is expected that the connection time increases while adding more connections to your DUT. 


In your application, are you just connecting the peripherals? Are you reading any information from them? What are the profiles? Does they have any security enabled?

Regards,

Daniel.

0 Kudos

461 Views
marmottus
Contributor III

Hi,

It is expected that the connection time increases while adding more connections to your DUT. 

To what extent is this expected? I also tried on a Raspberry Pi Zero 2W with the onboard Bluetooth chip and I do not see such slow down with 10 peripherals connected.

In your application, are you just connecting the peripherals? Are you reading any information from them? What are the profiles? Does they have any security enabled?

We are using the GATT profile to communicate with the peripherals. No security in use, just a normal connection.

Once we've connected and discovered the services, we exchange data over characteristics with the peripherals both ways (write and notify) but not extensively, it's mostly the peripheral sending small payloads (not more than 100 bytes) at random times which can vary between 5 and 30s.

 

 

 

0 Kudos

445 Views
marmottus
Contributor III

I also want to highlight that we are seeing range discrepancies between the 10 devices.

We tested indoors and the first 4 connected devices will disconnect (timeout) from a distance of approximately 40m while the other can achieve a distance of up to 75m.

0 Kudos

324 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Thanks for the feedback. 

Is there a way you can try this, in a different environment? Just to verify if the main cause of this is the noise. The performance will decrease if the environment is very noisy.

Regards,
Daniel.

0 Kudos

106 Views
marmottus
Contributor III

Hi,

The case is now handled internally via ticket.

 

0 Kudos