We have two separate products that use TI wireless modules. One uses the C2564MODN and the other uses the WL1837MOD. We noticed a difference in behavior between the C2564MODN version and the WL1837MOD version regarding the success of powering-on the chip and also the amount of time it takes to enable Bluetooth. Below are recorded times of successful power-ons of each stack:
C256x:
- BluetopiaPM daemon restart: 1.152 sec
- Set Power-On command sent and completed by BluetopiaPM: 3.414 sec
- Post-power-on configuration commands sent and completed by BluetopiaPM: 0.419 sec
- Set baud rate
- Set name
- Set class-of-device
- Set CODEC
- Register authentication
- Register Headset Profile event callback
- Register Hands-Free Profile event callback
- Enter discovery
- Total startup time with no retries: 4.987 sec
WL18xx:
- BluetopiaPM daemon restart: 7.250 sec
- Set Power-On command sent and completed by BluetopiaPM: 9.215 sec
- Post-power-on configuration commands sent and completed by BluetopiaPM: 0.283 sec
- Total startup time with no retries: 16.749 sec
You can see that the WL18xx daemon takes ~6 more seconds to start, and then ~6 more seconds to power-on the chip as compared to the C256x version. Additionally, we never saw the need with the C256x build to implement any retry mechanism (i.e., it always seems to start without any issue); so the C256x BT-on time appears to be always around 5 seconds. However, one of the weird issues we had to resolve was making sure the WL18xx build's bluetooth would start reliably — our solution was any time the Set Power command failed we would reinitialize the BluetopiaPM daemon and retry the Set Power command. While testing this I found that the WL18xx bluetooth will always eventually start up, but there is a good chance (e.g., ~17% of the time) the BluetopiaPM startup will run into a failure and the process needs to be reset. Normally the failure occurs with the power-on command, so we are looking at seeing the need to retry after 16.5 seconds and then performing the retry. So a single-retry version of starting it would be around 33 seconds; if a second retry is needed we are looking at 50 seconds or so. Statistically over 80% of the time it should be about 16 seconds for bluetooth to come up on WL18xx.
Is there a better way to retry the Set Power-on command once it fails — as near as I can tell if this failure occurs the only way to recover is by restarting the daemon which is pretty time-consuming. Additionally, is there any way to speed up the WL18xx start-up times?