Try enabling your HCI tracing capabilities in your application_init(). For example, the hello sensor app is enabled for tracing by default, and it has to be disabled otherwise. I think a search on "tracing" will reveal quite a number of threads on this.
I am using wiced Avnet IOT starter kit. I want to debug some issues with pairing. So is there any APIs that I should enable so as go get all the logs enabled at stack and HCI level.