SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By Cannonball2134
#35592
Hello

I hope someone can help me i haven't had much luck with replies on this forum.

Anyway, my problem is:

I have bought a bluetooth module, direct from the module i have connected it to the UART on my microcontroller. i can connect and send AT commands from my computer. what i need to find out is: do i have to set the bluetooth module as master or slave in order to send data from my computer to the bluetooth module which then sends it out it's UART to my micro-controller. At the moment i can't seem to receive any data over the UART to my microcontroller. I have spent almost two weeks trying to figure out whats wrong, could someone please put me out of my misery.

Thanks.
By YvesB
#35839
If your PC is initiating the connection to your Bluesmirf (BS), then your PC is master and BS is slave. If BS is initiating the connection, then it is master.

In your case, your BS is SLAVE.

Make sure your uController UART is TTL like your BS, if not, you need level converter like MAX232 or something.

Make sure your UART Tx goes to Rx on BS and UART Rx goes to Tx on BS. Make sure they share common ground. make sure both communicate at same baud rate, stop, parity, etc.. If RTS/CTS lines are not used (no hardware handshake) ties the RTS/CTS lines on BS together but soldering the back jumper points.

Remember to use the +++ and AT commands only to configure. Your BS operates in two modes, data and command mode. You want it to be in data mode NOT command mode (not +++) for it to redirect the characters coming in via the air out to it's physical pins.

Cheers,
By Cannonball2134
#35863
Hi,

Thanks for the Post.

I have connected the CTS and the RTS together, the RX to my TX and the TX to my RX from the micro-controller to the bluetooth module (Which is the DIP module).

Since i made the post i have managed to receive data over the connection but for some odd reason i can't send data, i can send commands but not data, odd and annoying.

Both the bluetooth module and the micro-controller are powered by different devices, but both are connected to the mains power so i believe that's the common ground delt with.

I have noticed on my bluetooth connections that i have both an incoming and outgoing connection on different ports and since on the terminal you can only connect to one port i may only be able to receive, but on the other hand if i can send commands to the bluetooth module and can receive data on the same port then this shouldn't be a problem.

I'm so much closer than i was before, but I'm still totally stuck trying to figure out what the exact problem is and how i can fix it and if i can fix it.

Any thoughts?