Other Parts Discussed in Thread: CC2564, MSP430F5438A, MSP430F5529, CC2564MODN, CC2564C
A few years ago we successfully ran SPP server using Classic Bluetooth (BT) on the original CC2564 in an LSR module on an MSP430 Experimenter Board. We are now in final testing of our product using the CC2564MODA which contains the CC2564B, no longer running the Experimenter Board, and are having issues with the SPP server and client. We have configured one of our products as an SPP server and the other as SPP client. We can successfully pair with no problem, but the call to SPP_Open_Remote_Port() returned 0xFFB8 = -72 which is BTPS_ERROR_RFCOMM_UNABLE_TO_CONNECT_TO_REMOTE_DEVICE. We have captured all HCI, GAP, and SPP events, and there are no SPP events. There are only GAP and HCI events related to pairing. In particular, there are NO HCI event callbacks after pairing completes. I would think that the call to SPP_Open_Remote_Port() would result in some sort of HCI activity.
We are using the latest CC2564B patch (service pack) file version 1.8, released just a few months ago. Since we are using only classic BT at this time (not LE), the BasePatch array does not include the portions "#ifdef __SUPPORT_LOW_ENERGY__" or "#ifdef __SUPPORT_AVPR__".
Is it possible that the CC2564B is not properly being initialized? But if that were the case, wouldn't there be a problem with secure simple pairing?
Here is the list of all HCI callback events from pairing. No additional callbacks occurred after the call to SPP_Open_Remote_Port().
Event Number |
Enum Value Hex |
Enum Value Decimal |
HCI Event |
1 |
02 |
2 |
etConnection_Complete_Event |
2 |
23 |
35 |
etRead_Remote_Extended_Features_Complete_Event |
3 |
14 |
20 |
etLink_Key_Request_Event |
4 |
29 |
41 |
etIO_Capability_Request_Event |
5 |
2A |
42 |
etIO_Capability_Response_Event |
6 |
2B |
43 |
etUser_Confirmation_Request_Event |
7 |
2E |
46 |
etSimple_Pairing_Complete_Event |
8 |
15 |
21 |
etLink_Key_Notification_Event |
9 |
05 |
5 |
etAuthentication_Complete_Event |
10 |
04 |
4 |
etDisconnection_Complete_Event |
11 |
02 |
2 |
etConnection_Complete_Event |
12 |
23 |
35 |
etRead_Remote_Extended_Features_Complete_Event |
13 |
14 |
20 |
etLink_Key_Request_Event |
14 |
05 |
5 |
etAuthentication_Complete_Event |
15 |
07 |
7 |
etEncryption_Change_Event |
16 |
04 |
4 |
etDisconnection_Complete_Event |
I can provide all GAP call backs as well, but again, they all relate to pairing, no additional GAP callbacks occurred after SPP_Open_Remote_Port().
Below are the essential calls made to pair with and then attempt to open the serial port on the remote device. Both are using the Stonestreet One Bluetopia SDK v1.5R2 linking in the provided CCS COFF library libBluetopia.a:
BluetoothStackID = BSC_Initialize(&HCI_DriverInformation,BSC_INITIALIZE_FLAG_NO_SCO);
HCI_Register_Event_Callback(BluetoothStackID, HCI_Event_Callback, (unsigned long)NULL);
GAP_Set_Pairability_Mode(BluetoothStackID, pmPairableMode_EnableSecureSimplePairing);
GAP_Register_Remote_Authentication(BluetoothStackID, GAP_Event_Callback, (unsigned long)0);
GAP_Initiate_Bonding(BluetoothStackID,Remote_BD_Addr,btDedicated,GAP_Event_Callback,(unsigned long) 0);
All the above returned status OK, and we verified that pairing was completed successfully.
The remote server port was opened on ServerPort 4, so the call below uses this same port number:
SPP_Open_Remote_Port(BluetoothStackID,Remote_BD_Addr,4,SPP_Event_Callback,(unsigned long)0);
The above call returned error -72 which is BTPS_ERROR_RFCOMM_UNABLE_TO_CONNECT_TO_REMOTE_DEVICE in 10.7 msec.
We can register callbacks for other protocols if desired, such as L2CAP and RFCOMM, if capturing of those callbacks would be helpful.