Bluetooth + arduino + iphone

Discussion in 'Programmer's Corner' started by The_silverone, Dec 16, 2012.

  1. The_silverone

    Thread Starter New Member

    Dec 16, 2012
    2
    0
    Hello all,
    New to the forum and im glaD to be here. I appologize if im posting in the wrong category/subsection.

    Here is the issue I would like to address. I would like to build a project that has bluetooth capability and control using the iphone. I realize due to idevice SDK limitations serial over bluetooth is not supported, but its not what I am after and could frankly care less if there is no communication between the iphone and arduino over BT. The important part for me is for one of these three instances be true in simplest form:

    1) Arduino to control LED on/off. Arduino scans for available bluetooth devices and finds iphone bluetooth by MAC address (it is to my understanding that bluetooth MACs are broadcast prior to connection and ONLY in discoverable mode. *but i could be wrong and please correct me if I am. ) Upon noticing iphone bluetooth is within range, arduino turns LED on. Arduino polls for bluetooth to see if device is still within range andonce out of range or bt turned off on iphone, arduino turns LED off. The next issue in this scenario is to be able for the arduino to *identify multiple devices and with some simple code, leave the state of the led as is until no allowed devices in range.

    2) Arduino to control LED on/off. iphone connects to arduino bluetooth, arduino turns LED on. Once disconnected or out of range or bt turned off on iphone, arduino turns LED off. The next issue in this scenario is to be able to *allow connection of *multiple devices and with some simple code, leave the state of the led as is until no devices connected.

    3) since the first three instances seem a little out there, I'm also thinking of using an HID BT profile as I'm sure iPhone can connect to these and then somehow get the duino to recognize the connected iPhone. The only issue with this instance is that I believe this profile allows for not more than one connection at a single time.

    In closing, if this works with iphone, it should work with any bt device.

    Any help is greatly appreciated. And please no LMGTFY,I have spent hours doing that on my own and i dont ask questions unless a last resort.


    THANKS,
    ROB pk
     
  2. rstevenson

    New Member

    Apr 5, 2011
    21
    1
    I don't have an Iphone but my android only stays visible for 2 minutes max so i dont think the first one is feasible.
    edit: my ipod touch stays visible but i still dont know how you would check the Mac addresses from the module

    I've only worked with serial bluetooth with my droid and the bt module that connected to it was the slave so the phone connected with it. It may be possible to connect to multiple with a bt master module but I am not sure where you can get one or if it would work.
     
  3. The_silverone

    Thread Starter New Member

    Dec 16, 2012
    2
    0
    Ok, well what about using a BT w/ an HID profile. the phone would in this case, poll for the device and connect when in range. So in theory, this should allow me to connect my iPhone. Is there a way to make an arduino run a command on BT connect?
     
Loading...