Shop OBEX P1 Docs P2 Docs Learn Events
pairing bluetooth module with cellphone — Parallax Forums

pairing bluetooth module with cellphone

t.mullert.muller Posts: 6
edited 2013-06-01 09:56 in General Discussion
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.

Comments

  • SRLMSRLM Posts: 5,045
    edited 2013-05-28 19:06
    By phone, I assume you mean Android. I like to use the Blueterm app for connecting. If you want to use Apple products you'll have to put in a bit more effort (since they require their peripherals to have a key).

    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.
  • t.mullert.muller Posts: 6
    edited 2013-05-28 19:50
    Thanks SRLM.

    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?
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-05-28 20:11
    We're using the very cheap HC05 and HC06 modules.

    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.
  • SRLMSRLM Posts: 5,045
    edited 2013-05-28 20:43
    t.muller wrote: »
    Thanks SRLM.

    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?

    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.
  • t.mullert.muller Posts: 6
    edited 2013-05-31 22:50
    After doing a lot of research, I'm looking to buy this device:
    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?
  • MicksterMickster Posts: 2,694
    edited 2013-06-01 03:13
    This is something that I am looking at: http://www.seeedstudio.com/wiki/Bluetooth_Bee

    Also, BASIC! runs directly on Android devices (no PC required) and supports BT comms, great for rapid development and experimenting.

    Regards,

    Mickster
  • SRLMSRLM Posts: 5,045
    edited 2013-06-01 07:54
    t.muller wrote: »
    After doing a lot of research, I'm looking to buy this device:
    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?

    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.
  • t.mullert.muller Posts: 6
    edited 2013-06-01 09:56
    SRLM wrote: »
    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.
Sign In or Register to comment.