Pages: [1]   Go Down
Author Topic: How To Detect Bluetooth ID  (Read 1638 times)
0 Members and 1 Guest are viewing this topic.
New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm interested in building an Arduino + Bluetooth project where the Arduino would unlock a door when it detected the bluetooth ID from my phone. I'm not looking for an app running on the phone or anything. I'd want the Arduino to be listening for bluetooth devices and looking for the ID of my phone. When it detects my phone (iPhone 4S) it would trigger one of the outputs to turn on a relay to unlock a door. I've built a few Arduino projects, but I've never done anything with Bluetooth. Would this be hard to do? It would also be nice if I could detect the strength of the bluetooth signal so the Arduino would only keep the door unlocked if the signal strength above a certain level. I'd appreciate any suggestions on how to get started.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unless set to "Discoverable" Bluetooth hosts do not broadcast their presence.

Unlike some phones (*cough*Blackberry*cough*), the iPhone does not exist in Discoverable mode usually.  It only becomes discoverable when you open the Bluetooth preferences.  It is constantly listening for paired devices.  However, since it doesn't support the serial profile, pairing with a serial-based Bluetooth device might be difficult.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Delray Beach, FL USA
Offline Offline
Full Member
***
Karma: 0
Posts: 113
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably be better off running the arduino bluetooth in slave mode and having the phone detect it, connect, and send a (hopefully secure) password to unlock the door, or just leave the door unlocked - probably be about as secure :-).
Logged


Belgium
Offline Offline
Full Member
***
Karma: 0
Posts: 187
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i don't want to discourage you, but i've heard from several persons that the bluetooth from the iphone is blocked in a certain way z-so it can only communicate with other iphones and computers. So it should be possible, but i think it will be easier with a non-apple phone
Logged


New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I put the Arduino bluetooth in slave mode and paired it to my iphone, would the iphone then automatically pair with the Arduino bluetooth when I was in range?  If so, would I be able to use Arduino code to see what it was paired with my particular phone.

I've paired my iphone with bluetooth headsets and bluetooth speakers that were not made by Apple and never had a problem, so I don't see how the iphone bluetooth protocal could be restricted to other iphone or computers.
Logged

New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i don't want to discourage you, but i've heard from several persons that the bluetooth from the iphone is blocked in a certain way z-so it can only communicate with other iphones and computers. So it should be possible, but i think it will be easier with a non-apple phone

You may be onto something with this iphone and bluetooth.  I found this article on Make magazine website that says iphone's don't work with Arduino bluetooth modules, but the new Bluetooth 4.0 might.

http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreaking-no-mfi/#comment-413239

Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i don't want to discourage you, but i've heard from several persons that the bluetooth from the iphone is blocked in a certain way z-so it can only communicate with other iphones and

It's fun when I get to repeat myself.

1. The iPhone doesnt stay in discoverable mode unless initiated by the settings screen.
2.  The iPhone doesn't support the serial profile, so your device won't automatically see your the phone when it is in range.

If you can use a Bluetooth device that supports the HID profile, you might have better luck...
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


It's fun when I get to repeat myself.

1. The iPhone doesnt stay in discoverable mode unless initiated by the settings screen.
2.  The iPhone doesn't support the serial profile, so your device won't automatically see your the phone when it is in range.

If you can use a Bluetooth device that supports the HID profile, you might have better luck...

I was hoping that since I'm not really trying to communicate or pair with the iphone (just detect and ID), some of these limitation may still let me get my project to work.  But it sounds like I should wait for a Bluetooth 4.0 shield.  Instead of using bluetooth to unlock the door, maybe I'll just use the thumbprint reader that Adafruit just came out with.  I like the bluetooth project a lot.  I think it would be really cool if a door unlocked as I approached.  But I'm not going to switch phones just for this.
Logged

Delray Beach, FL USA
Offline Offline
Full Member
***
Karma: 0
Posts: 113
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Weird. This new bluetooth 4 shield still looks and talks like a UART, but isn't using the RFCOMM profile? What profile does it use? (By the way, I think not all android phone talk RFCOMM either, but fortunately my Motorola does speak it).
Logged


Pages: [1]   Go Up
Jump to: