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.

TM4C123G, Bluetooth WT12 - Connection problems

Setup:

  • Tiva C Series - TM4C123G
  • BOOSTXL SENSHUB
  • Custom board with WT12 Bluetooth module connected and configured on the UART1 on the TM4C123G.

Intention of project
Send over orientation data from the BOOSTXL-SENSHUB to my mobile. So I developed an app which sends a start/stop command to the WT12 and the TM4C123G, that then sends back the orientation data. This works in most cases and I receive the correct values sent from the TM4C123G. However, the problem is to establish the connection.

Problem:
When trying to initiate a connection from the mobile with the Bluetooth, it results in a connection failure. However, when pressing the reset button for a couple of times (random), typically 3-5 times, and then trying to connect again, it connects successfully. What is remarkable though is that if I start the program on the TM4C123G by run it in debug mode and first load the program onto the board, this problem never occurs (i.e. mobile connects successfully at the first try). The Bluetooth module is not using flow control (hardware/software).  I’m not sure if this problem is related to a timing error on the board or if it depends on the settings on the Bluetooth module?

Note:
Before all this, I've paired the mobile with the WT12 successfully.

After a successful connection with the mobile, I wanted to know what happened if I turned off the Bluetooth on the mobile. So I did that and turned it back on and tried to connect to the Bluetooth module again. This wasn’t possible since I got a connection failure on the mobile. Since I don’t the settings of the Bluetooth module, these settings could maybe causing this behavior. 

Regards Robin

  • Hello Robin

    I believe the issue may be occurring if the BT module sends over the UART to the TM4C123 without waiting for the TM4C123 to start correctly. Can you connect the Reset of the BT module to a GPIO of TM4C123, configure TM4C123 first for UART communication and then release the reset to the BT module?