Announcement

Collapse
No announcement yet.

How to make iBeacon out of iPhone

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to make iBeacon out of iPhone

    How to make iBeacon out of iPhone for the purpose of presence detection. Cheap ESP32 boards can recognize iBeacons easily making easy presence detection of someone carrying iPhone (always the case in our family. they may forget to put on their pants but iPhone is always with them).

    Googling the topic doesn't yield a good results and neither does searching iPhoe apps . Wondering if someone here has a good experience and willing to share it.

    There are many apps for iPhone that do the opposite thing - rcognizing other iBeacons. The problem at hand here is to make the iPhone itself act as an iBeacon.

    Thanks,

    #2
    I don't have an iphone, but try this How to Configure your iPhone as an iBeacon Transmitter (passkit.com)

    Comment


      #3
      mterry63

      Thanks. I found this one as well. It simply doesn't work. It has 1 star rating for the same reason.

      Comment


        #4
        Smartphones intentionally randomize their MAC address so become very poor iBeacons since MAC is what is normally used to identify iBeacons and Eddystone. There is manufacturer data that may be available in a BLE advertisement so a manufacturer (e.g. Apple) can make a proprietary advertisement that their App will be able to recognize while ignoring the MAC address. With my ESP32, RPi, and Windows implementations of Beacon identification I only use the extended data to identify the manufacturer of the beacon and for HS4 do not even go that extra step.

        Comment


          #5
          I was using Estimote Beacons a number of years ago which were relatively reliable for presence tracking but never updated them once the batteries ran out and upgrading my phones.

          Comment


            #6
            Right here :https://www.room-assistant.io/


            Eman
            TinkerLand : Life's Choices,"No One Size Fits All"

            Comment


              #7
              Originally posted by Eman View Post
              ????????

              Comment


                #8
                Originally posted by Michael McSharry View Post
                Smartphones intentionally randomize their MAC address so become very poor iBeacons since MAC is what is normally used to identify iBeacons and Eddystone. There is manufacturer data that may be available in a BLE advertisement so a manufacturer (e.g. Apple) can make a proprietary advertisement that their App will be able to recognize while ignoring the MAC address. With my ESP32, RPi, and Windows implementations of Beacon identification I only use the extended data to identify the manufacturer of the beacon and for HS4 do not even go that extra step.
                Thanks Michael,

                This is a great idea actually. I do have mfr data available (see below the data for one scan and obviously multiple BT devices found) and it seems to be steady. The trick is to find out which one is the iPhone but this is easy by just turning BT of the iPhone off and look which record disappears from the scan.

                23:18:14.124 -> BLE Advertised Device found: Name: , Address: 08:4d:47:61:f3:04, manufacturer data: 0600010920025640009e381fe954bd40a2d8616ecec02ca63a68386217
                23:18:14.124 -> BLE Advertised Device found: Name: , Address: 4b:cf:59:d2:96:eb, manufacturer data: 4c0010067b1ea8279143, txPower: 7
                23:18:14.178 -> BLE Advertised Device found: Name: , Address: 3d:f1:77:27:74:fa, serviceUUID: 0000fd6f-0000-1000-8000-00805f9b34fb
                23:18:14.225 -> BLE Advertised Device found: Name: , Address: 7e:38:3b:df:a2:1a, manufacturer data: e00001e4ca961540, serviceUUID: 0000fe9f-0000-1000-8000-00805f9b34fb
                23:18:14.278 -> BLE Advertised Device found: Name: , Address: 66:c7:8b:ba:42:4a, manufacturer data: 4c0010050d1867def6, txPower: 12
                23:18:14.479 -> BLE Advertised Device found: Name: , Address: 74:0d:99:e9:0b:15, manufacturer data: 4c001006001ae36c0392, txPower: 12
                23:18:14.479 -> BLE Advertised Device found: Name: , Address: 5f:6f:97:5b:d9:40, manufacturer data: e0000199ca61ee7f, serviceUUID: 0000fe9f-0000-1000-8000-00805f9b34fb
                23:18:15.382 -> BLE Advertised Device found: Name: , Address: 7b:98:09:b7:f1:75, manufacturer data: e00001e9ca537917, serviceUUID: 0000fe9f-0000-1000-8000-00805f9b34fb

                Comment


                  #9
                  Originally posted by risquare View Post

                  ????????
                  What you can do with mqtt, you're are already doing...

                  Code:
                  [B]ESP32-mqtt-room[/B]
                  
                  
                  [URL="https://jptrsn.github.io/ESP32-mqtt-room/"]ESP32-mqtt-room[/URL]
                  
                  integrates with the Home Assistant Core [URL="https://www.home-assistant.io/integrations/mqtt_room/"]mqtt_room[/URL] component to deliver room presence data for BLE devices. This is great as ESP32s are quite cheap, but it also requires you to either carry a BLE beacon around or have an app open on your Android phone at all times. room-assistant supports many more integrations, including [URL="https://www.room-assistant.io/integrations/bluetooth-classic"]Bluetooth Classic[/URL], which allows you to track your phone even without a special app running. That way you can track iOS devices and smart watches as well
                  Unrelated but applies...https://www.youtube.com/results?sear...room+assistant
                  • Not taking it literary but referenced...

                  Eman.
                  TinkerLand : Life's Choices,"No One Size Fits All"

                  Comment


                    #10
                    Eman

                    Thanks for the reference. It's great to know what's going on around the world in the HomeAutomation sphere.

                    Comment


                      #11
                      Michael McSharry

                      I tested your idea, unfortunately no luck. Attached below is the result of my BLE scan in 3 parts

                      1. iPhone BT on
                      2. iPhone BT off
                      3. iPhone BT on again

                      simulating an environment where presence detection should work after iPhone is on and off and on.

                      As you can see there are 4 records with "Manufacturer data". The suspect for iPhone (that disappears and re-appears after iPhone's BT is on/off/on) is the record with Manufacturer's data

                      4c001006311a3a62e937, txPower: 8

                      but after on/off/on cycle same data changed to

                      4c001006371ad1cf268d, txPower: 8

                      If I'm to assume that this is the iPhone than it seems that iPhone does change "Manufacturer's data" as well as "Address".

                      The only bright spot is that the first 9 characters are the same.

                      4c0010063

                      Is this enough to identify iPhone based on your experience Michael ?

                      blescan.txt

                      Comment


                        #12
                        Is this enough to identify iPhone based on your experience Michael ?
                        I have never tried to decode manufacturer data beyond the case were the data was a hyperlink or similar data. I would imagine that any data that is present that could identify a specific end point would be encrypted. Making it difficult to identify the location of the phone is the intention of the security provisions of these mobile devices that happen to use Bluetooth for user features such as audio.

                        Comment


                          #13
                          risquare, seems like you pushing the cutting edge. I'm running the receiver process that Eman linked earlier (room-assistant) which was developed for integration with the Home Assistant platform. It also supports MQTT, so I use that to track in HS3. I'm using Feasybeacons in vehicles in my instance, so no phone tracking and no Apple products here anyway.

                          That said, the HA/room-assistant community is also interested in using iPhones as BLE beacons, and one of the devs had developed an app that is currently in TestFlight here https://testflight.apple.com/join/OpCkeHf8. Discussion is in this RA thread Track iPhones via BLE · Issue #309 · mKeRix/room-assistant · GitHub You don't mention what receiver process you are using, so no guarantees it will work with your solution, but it seems to be a standard BLE UUID.

                          FWIW, it looks like MAC randomization (the privacy feature) can be disabled "per-network" in both IOS and Android for WIFI, but no mention of Bluetooth. Maybe tracking IP assignment is an option for you, you don't mention if you're trying to achieve room proximity (which is a goal of room-assistant) but you can also use it for just general proximity.

                          Good luck.

                          Comment


                            #14
                            FWIW, it looks like Home Assistant has a companion app for Android and added an iBeacon feature directly to that app, unfortunately you need a running Home Assistant instance to configure that app.

                            Comment


                              #15
                              mterry63

                              Thanks for the wealth of information. I will certainly check all of it and report back. I'm using ESP32 microcontroller to scan the BT. The reports that I attached above are from the same scanner. It works really well and I do not see any problems on the receiving end, hence no need for me to look for any other apps or solutions. I'm willing to share the code if someone is interested. It will work with any BLE Beacons that have steady BLE address and/or UUID. I'm not inclined to carry Beacon all the time and ask my family members to do the same. The problem as stated in the headline of this thread is to make the iPhone act as a Beacon or find another workaround that doesn't include carrying any additional hardware.

                              Comment

                              Working...
                              X