Other Parts Discussed in Thread: CC2564
Hello everybody!
I am a German engineer (please excuse my english) and new to this forum. Currently I am working on a custom designed heating control with remote access via smartphone. The basic hardware consists of a TiWi uB2 bluetooth module and a STM32F1 controller. As the TI Bluetopia stack does not support the ST controller I have to build my own stack from scratch.
My goal is to establish a connection between the uB2 and an Android smartphone (no BLE) and transmit data packets with the SPP profile. The pairing process between the two devices should proceed in a secure manner with numeric comparison. The user should enter a key which will be displayed on the screen of the heating control.
After spending a lot of time and reading uncounted articles and posts in various forums I am at the point that my smartphone can find the module by its name and I am able to initiate a connection to it. The problem starts here. After starting the connection process I get a "Connection request" event from the uB2 which is responded by a "Accept connection request" command by the host. The "Command status" event immediately received after sending the "Accept connection request" command follows a "Connection complete" event after approximately five seconds. Although I made serveral trials with encryption, simple pairing etc. activated, I never get a prompt to enter a pin code.
A prompt from the smartphone to enter a pin code appears when I start the connection process but simple pairing is disabled! Now I can enter the pin code, however there is no reaction from the uB2 (no events) when I confirm the pin code with OK on the smartphone.
So I think there is something wrong with my configuration of the CC256x.
The device setup is done as following:
- HCI Reset
- Download Base Patch for CC256x
- enable supported features for Secure Simple Pairing, Secure Connections (Host + Controller)
- set event mask (all events active)
- set host buffer size
- write local name
- write device class
- write pin type (variable)
- write simple pairing mode (enable)
- write authentication (enable)
- write default link policy settings (enable sniff mode)
- write connection accept timeout (5sek)
- write scan enable (inquiry + page scan enable)
I would be grateful for any help! Thanks a lot!
Sebastian