pairing bluetooth module with cellphone
t.muller
Posts: 6
Hi all,
I've given myself a project just to get into doing hardware sides of things (I'm very comfortable with programming). Just need some help to jump start this.
I want to pair a phone to a bluetooth module and just want to control an LED connected to be on during pair and off when not paired.
What is your recommendation on which bluetooth module to use? I'd prefer one that is programmable so there's no need for an additional microcontroller to control LED logic side of things.
Thanks.
I've given myself a project just to get into doing hardware sides of things (I'm very comfortable with programming). Just need some help to jump start this.
I want to pair a phone to a bluetooth module and just want to control an LED connected to be on during pair and off when not paired.
What is your recommendation on which bluetooth module to use? I'd prefer one that is programmable so there's no need for an additional microcontroller to control LED logic side of things.
Thanks.
Comments
You could use either the RN-41 or RN-42 modules (sold by Parallax and Sparkfun). The RN modules have one of the GPIO pins (GPIO2) already dedicated to the connected/disconnected LED functionality.
If you want to have it controllable (aka, send command and have pin change) then look in the documentation, do a search for GPIO. If you get a module that does not have all the pins broken out you will have to use a fine tipped soldering iron and a steady hand to make some of the connections.
I'm looking at some RN-41 datasheets and having the pins broken out is a very good idea.
How is the the chip interfaced with a PC to write code to it? Does it require a dongle of some kind?
These have places for the LED to pairing/connect status. The ones mounted on 0.1 spacing come with at least one LED.
I have some notes here http://code.google.com/p/propforth/wiki/LittleRobotBluetooth
PropellerPowered carries the mounted HC06 and these work well; I think I like the HC05 better but I haven't bought them mounted yet.
I believe all control is done via the Bluetooth or serial connection: you don't write any code that is burned onto the RN modules. You'd have to look at the datasheet and manual for that info, however.
http://www.ebay.ca/itm/JY-MCU-HC-06-v1-40-Bluetooth-Transeiver-RF-Module-5V-FAST-SHIP-US-Seller-/181139753268?pt=LH_DefaultDomain_0&hash=item2a2cc54934
In the description it says that I must load code to an Arduino ....so that's kind of confusing me...
Can't I just use a normal RS232 cable and connect the TX and RX pins to the module for communication with PC? Do I need an arduino board?
Also, BASIC! runs directly on Android devices (no PC required) and supports BT comms, great for rapid development and experimenting.
Regards,
Mickster
The Arduino that they mention is on the "remote" side, and is mentioned as the possibility for interacting with the RX and TX lines. You need something there if you want to communicate data.
Second, why would you hook the module up to a computer via the serial lines? In almost all cases you'd want to connect the module via the bluetooth connection, rather than a hard connection. But if you did, you'd want a USB->Serial device (such as the FTDI devices (ex. prop-plug)) and connect it that way.
Oh, it's because my laptop doesn't have bluetooth. I guess it's better that I buy a bluetooth dongle. Save me the soldering time.