This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am using MSP432E401Y with CC2564MODA Bluetooth module. At this moment I am able to communicate with the module using the bluetopia stack.
I am calling InitializeApplication() function successfully we can find on SPPDemo.c file (\Samples\SPPDemo). After initialize the Bluetooth Stack, I am able to open the SPP server using OpenServer() and I call periodically BTPS_ProcessScheduler(). But at this point, my device is not advertising neither accepts Bluetooth connections.
When running my code, this output is provided on the debug console:
OpenStack().
Bluetooth Stack ID: 1
Device Chipset: 4.1
BTPS Version : 4.0.3.0
Project Type : 6
FW Version : 7.26
LOCAL BD_ADDR: CC:78:AB:7D:84:B8
Local Device Name(): MY_BTH_DEVICE
Server Opened: 1.
All mode are OK when I query for the current mode parameters using GAP_Query_Connectability_Mode(), GAP_Query_Discoverability_Mode() and GAP_Query_Pairability_Mode().
Can someone tell me what procedures should I take to detect any anomalies?
Best Regards
Nuno Dias
----------------------------------------------------------
Bellow some code snippets I am extracted from bluetopia stack samples:
int bluetooth_init(void)
int bluetooth_init(void) { DEBUG_MSG(""); int Result; BTPS_Initialization_t BTPS_Initialization; HCI_DriverInformation_t HCI_DriverInformation; HCI_HCILLConfiguration_t HCILLConfig; HCI_Driver_Reconfigure_Data_t DriverReconfigureData; /* Configure the hardware for its intended use. */ HAL_ConfigureHardware(); /* Configure the UART Parameters nd Initialize the Bluetooth Stack. */ HCI_DRIVER_SET_COMM_INFORMATION(&HCI_DriverInformation, 1, HAL_HCI_UART_MAX_BAUD_RATE, cpHCILL_RTS_CTS); HCI_DriverInformation.DriverInformation.COMMDriverInformation.InitializationDelay = 100; /* Set up the application callbacks. */ BTPS_Initialization.GetTickCountCallback = getTickCountCallback; BTPS_Initialization.MessageOutputCallback = msgOutputCallback; /* Initialize the application. */ Result = InitializeApplication(&HCI_DriverInformation, &BTPS_Initialization); if (Result > 0) { /* Save the Bluetooth Stack ID. */ BluetoothStackID = (unsigned int)Result; Result = OpenServer(SPP_PORT_NUMBER_MINIMUM); } else { DisplayFunctionError("Initialize the application", Result); }
int InitializeApplication(HCI_DriverInformation_t *HCI_DriverInformation, BTPS_Initialization_t *BTPS_Initialization)
/* The following function is used to initialize the application */ /* instance. This function should open the stack and prepare to */ /* execute commands based on user input. The first parameter passed */ /* to this function is the HCI Driver Information that will be used */ /* when opening the stack and the second parameter is used to pass */ /* parameters to BTPS_Init. This function returns the */ /* BluetoothStackID returned from BSC_Initialize on success or a */ /* negative error code (of the form APPLICATION_ERROR_XXX). */ int InitializeApplication(HCI_DriverInformation_t *HCI_DriverInformation, BTPS_Initialization_t *BTPS_Initialization) { int ret_val = APPLICATION_ERROR_UNABLE_TO_OPEN_STACK; /* Initialize some defaults. */ SerialPortID = 0; bthRole = BTH_ROLE_NONE; NumberofValidResponses = 0; /* Next, makes sure that the Driver Information passed appears to be */ /* semi-valid. */ if((HCI_DriverInformation) && (BTPS_Initialization)) { /* Try to Open the stack and check if it was successful. */ if(!OpenStack(HCI_DriverInformation, BTPS_Initialization)) { /* The stack was opened successfully. Now set some defaults. */ /* First, attempt to set the Device to be Connectable. */ ret_val = SetConnect(); /* Next, check to see if the Device was successfully made */ /* Connectable. */ if(!ret_val) { /* Now that the device is Connectable attempt to make it */ /* Discoverable. */ ret_val = SetDisc(); /* Next, check to see if the Device was successfully made */ /* Discoverable. */ if(!ret_val) { /* Now that the device is discoverable attempt to make it*/ /* pairable. */ ret_val = SetPairable(); if(!ret_val) { /* Attempt to register a HCI Event Callback. */ ret_val = HCI_Register_Event_Callback(BluetoothStackID, HCI_Event_Callback, (unsigned long)NULL); if(ret_val > 0) { /* Assign a NULL BD_ADDR for comparison. */ ASSIGN_BD_ADDR(NullADDR, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); /* Save the maximum supported baud rate. */ MaxBaudRate = (DWord_t)(HCI_DriverInformation->DriverInformation.COMMDriverInformation.BaudRate); /* Return success to the caller. */ ret_val = (int)BluetoothStackID; } else DisplayFunctionError("HCI_Register_Event_Callback()", ret_val); } else DisplayFunctionError("SetPairable", ret_val); } else DisplayFunctionError("SetDisc", ret_val); } else DisplayFunctionError("SetDisc", ret_val); /* In some error occurred then close the stack. */ if(ret_val < 0) { /* Close the Bluetooth Stack. */ CloseStack(); } } else { /* There was an error while attempting to open the Stack. */ Display(("Unable to open the stack.\r\n")); } } else ret_val = APPLICATION_ERROR_INVALID_PARAMETERS; return(ret_val); }
Did, you make any modifications to the SDK release demo or HAL? Can, you take FW logs to check?
Hi Hari Nagalla,
First of all thanks for sharing this document about logger tool. It will be very useful in the future.
I have used SPP Demo (MSP432P401R) as base of my code. But I made some modifications on HAL since I am using a custom board containing a MSP432E401Y and SimpleLink MCU SDK Driver API.
Communication between the MCU and the CC2564 appears to be OK.
Bellow, I provide a link containing the logs acquired both when I used cpHCILL_RTS_CTS and cpUART_RTS_CTS defined as HCI Serial Protocol: https://drive.google.com/drive/folders/1yJUdcLMiEfilllAJrZLhV9Ku5VSbLquG
Best regards
Nuno Dias
It looks like a board customization issue. It is difficult to say what is going wrong. Is the hardware flow control configured properly?
Visualizing the signals in a logic analyzer seems all OK. Moreover, the settings appear to be correctly set, because when I query those settings after initialization, it is provided correctly.
On the logger tool I am getting this errors at the end. Is it the normal behavior?
It appears, some corruption is happing during patch download. Do, you have a MSP432 and CC2564C reference board/platform to try with released MSP432Bluetopia SDK?
Thanks
Hi Hari Nagalla
We have a Launchpad MSP-EXP432E401Y evaluation board (https://www.ti.com/tool/MSP-EXP432E401Y) and a CC2564MODNEM (https://www.ti.com/tool/CC2564MODNEM).
I never used both because they are not pin compatible. I don't have any MSP-EXP432P401R board at this moment.
This way I am unable to test samples contained on MSP432Bluetopia SDK.
I can make some wire connections to connect CC2564MODNEM board to my Launchpad and check problems are on Firmware (HAL) or on Hardware side.
Meanwhile, can you please tell me if there is any sample test code/project available to be used with MSP-EXP432E401Y Launchpad or what additional steps can I take?
Best Regards
Nuno Dias
The Bluetopia SDK for MSP432 was tested only with MSP-EXP432P401R LaunchPad. The intent of these SDKs is to showcase BT profiles and stack.
Hi Hari Nagalla
Tested with Launchpad MSP-EXP432E401Y and CC2564MODNEM and the results are pretty the same. Logs available on: LINK (Google Drive)
I tested it connecting all UART signals (Tx, Rx, RTS, CTS) and Shutdown pin.
I tried on my setup with MSP-EXP432P401R LP with BOOST-CC2564MODA (CC2564B) and it worked just fine, with TI Bluetopia SDK release.
/* Configure the UART Parameters. */
HCI_DRIVER_SET_COMM_INFORMATION(&HCI_DriverInformation, 1, HAL_HCI_UART_MAX_BAUD_RATE, cpHCILL_RTS_CTS);
Thanks
Hari Nagalla: Are you able to collect logs on your setup so I can compare with logs on my side?:
Hi Hari Nagalla,
Can you take a look on my logs collected after I swap the Base Patch from "\Bluetopia\btpsvend\CC256XB.h" to "\Bluetopia\btpsvend\CC256X.h" setting __SUPPORT_CC256X_PATCH__ define macro: LINK
Now I don't get any errors after the stack is initialized. Despite that, I still can't advertise the modem.
Hi Hari Nagalla,
URL link to the logs was on the previous post: https://drive.google.com/file/d/1lnXj4yhFhkEZU3EZympaC8SZkMDt7DT6/view?usp=sharing
The logs look fine.. I will compare with my setup logs and get back.
Thanks