cancel
Showing results for 
Search instead for 
Did you mean: 

Help with SPBT2632 Bluetooth module

dmg0048
Associate II
Posted on November 14, 2013 at 14:55

I plan to use an UART interface to communicate with my bluetooth module and I plan to wire the RTS, CTS, RX and TX pins to my uC, and until the components arrive, I would like to build some code to test it.

SPBT2632 Bluetooth datasheet mentions to leave unused pins not grounded, disconnected, my question is that if I wire the those four pins , will I still be able to communicate with my Bluetooth with an UART configured with hardware control = none, RTS and CTS wired but not functional? This is for testing purposes.

I would also appreciate some directions regarding AT2 commands through an UART interface, from the information I have gathered I believe it should be something along these lines:

For example, for AT2 command EnableBond:

send_data(''AT+AB EnableBond'');

Where send_data is a function which calls the USART_SendData() and checks the appropiate transmission flag. What troubles me is the correct syntax of the parameter I should give to send_data to make it recognizable for the Bluetooth as a AT2 command.

Thanks in advance!
1 REPLY 1
Posted on November 14, 2013 at 15:28

void SendString(char *s)
{
while(*s)
{
while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET); // Wait for Empty
USART_SendData(USART1, *s++);
}
}
SendString(''AT+CREG?

''); // Delimit command with CR/LF

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..