Skip to main content
dmg0048
Associate III
November 14, 2013
Question

Help with SPBT2632 Bluetooth module

  • November 14, 2013
  • 1 reply
  • 650 views
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!
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    November 14, 2013
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..