Ellysis Bluetooth Sniffing Apple Airpods - ios

I'm trying to determine how Apple Airpods pair and connect as seamlessly as they do, but I couldn't find any in-depth technical explanation so I embarked on a journey to figure it out for myself. I have used an Ellysis Explorer Bluetooth sniffer to sniff both BLE and Bluetooth Classic packets from the Airpods and the iPhone I have used to connect with it.
The issue is that I lack the background knowledge in Bluetooth to fully understand what I am looking at so I'm hoping somebody can explain what is appearing on the BT sniffer in the snapshots below:
The below picture is a list of the BLE packets captured after the Airpods case has been opened but BEFORE connecting to the phone.
The below picture is a list of the Bluetooth Classic packets captured after the Airpods case has been opened but BEFORE connecting to the phone.
The below picture is a list of the Bluetooth Classic packets AFTER connecting to the phone captured on top of the previous ones.
Note that there are no new BLE packets picked up after connecting.

The 1st pic shows that both ears are sending advertising packets.
Then one of the ear is paging the other ear and exchanging information.
Then the iPhone is connected to one of the ear just like normal A2DP connection.
More captures while audio is just started playing would be helpful.

Before analysing packets you need to learn about CoreBluetooth framework. CoreBluetooth deals with scanning, connecting and writing and reading data from "Bluetooth Low Energy" (BLE) devices. BLEs (Peripherals) continuously broadcast a small packet of data when they are not connected with any device Central.
First images shows data which is being broadcasted by BLE, in your case an airpod.

Related

Pair and Connecting to Bluetooth Classic Speaker iOS

I realise most of the searches are quite old on this topic and not after Core Bluetooth now supports more than just BLE connections (https://developer.apple.com/videos/play/wwdc2019/901?time=556).
Simply by running the RxBluetoothKit example app I am able to discover my speaker and inspect its services. However I am unsure how to actually get the speaker to pair with the phone, after a while the speaker disconnects. I am struggling to get information on the protocol and/or how to proceed.
Or is this still not possible: "And so if you're calling connect on a BR/EDR device, if your app is in foreground, then we'll try to make a connection out to that device for you." - it seems like querying and communication with an already paired device is what they were getting at in the talk.
Thanks in advance.

AltBeacon Transmitter/Scanner

developers!
I would like to know whether is it possible for AltBeacon Transmitter Android App to detect if a Scanner Android App is listening to the Transmitter? If it is possible, how do I start?
I have attached an image for a clearer picture of my question. Overview
A beacon transmitter is a transmit-only device that emits packets with no knowledge of whether any receiver is listening. It is not possible to know directly if a receiver is present.
This is equivalent to an over-the-air television broadcast. The transmitter sends the signal with no knowledge of there is anybody with a television turned on and tuned to the proper frequency.
in both cases in order to find out if anybody is listening you must build another feedback mechanism. With Bluetooth beacons, it is typical to build a mobile app to call a server to tell it the advertisement has been received.

Get Video Signal of Security Cam and show it

I have an security cam which sends the video stream over 2,4 GHz to a receiver. I now want to know, if it's possible to receive this signal on iPhone and show the video stream. As WiFi is also sending on 2,4 GHz, the iPhone should be able to receive that signal. Or not?
Security Cam: http://www.jay-tech.de/jaytech/servlet/frontend/content.html?articleOID=d583e45:-495a2735:120c7c04348:446c&keywordOID=d583e45:946c233:1182e6a651d:e4e.
My iPhone is a iPhone 5s on iOS 8.1
If it's not possible over iPhone, is it may possible to catch the signal with any other device? I have this devices which I could use:
Raspberry PI, old WiFi USB Stick, Arduino Uno and a buch of cables for TV/Audio/Video etc
Thanks iComputerfreak
Sorry for my bad English, I'm German ;)
In short, no. To receive the signal, you'd need some dedicated hardware to receive the signal and encode it into a format that the iPhone could understand. It's not possible to arbitrarily capture wireless signals on a particular frequency and decode them in software - not on an iPhone, anyway.
Your best solution would be to look for some external hardware which operates on the same frequency, and can encode the video signal over a wifi network - I'd be surprised if such a device doesn't exist, though it may not be cheap. The iPhone can then simply receive the encoded video via wifi and use it like any other video stream.

Ios Peripheral Device in BACKGROUND

We need in our project to detect the proximity of an iPhone that is running a custom APP that is using Bluetooth LE.
The detector (Scanner, Central...) will be implemented using a BLE Integrated Circuit (from Texas or Nordic). I mean that the scanner is not another IOS device... running Core Bluetooth as a Central..
For the detector to guess the proximity, the idea is very simple, just advertise a service with an UUID proprietary.
While in foreground all works OK, and the UUID and a Local name are advertised (The UUID in the main advertise packet, and the Local Name in the SCAN Response packet....), and our scanner is able to decide if this iOS device is running our App.
The problem arises when going to background .....
The iOS stops broadcasting UUID and Local Name. (As the documentation of Core Bluetooth Explains... I Know...)
At this moment (Background), IOS begin to broadcast a SPECIAL MANUFACTURER DATA in the main advertise packet, and nothing in the SCAN Response packet)
The data packet we see using a Bluetooth Sniffer is :
0x14 (length of packet not including this byte).
0xFF (Manufacturer specific data AD Type).
And then :
0x4C, 0x00 (this data is the manufacturer identifier, if the packet is compliant with BLE 4.0 specification).
0x01, 0x00,0x00, 0x00, 0x00,0x00,0x80, and ten 0x00 more....
I know Apple says that while in background ONLY ANOTHER IOS DEVICE SEARCHING FOR A SPECIFIC SERVICE CAN DISCOVER IT. (Really I do not know how they can achieve that, unless they connect to the peripheral and retrieve the services, or if the peripheral knows about other IOS device is scanning because of it´s Address in the SCAN REQUEST and then changes the advertisement data in background).
The main questions are :
Is there any documentation or knowledge of what this manufacturer data means....Perhaps it would be possible to the scanner to know based on this info that this is an iOS device advertising in background and then connect to look if the custom service is there. (Not a quick and clean solution...but I do not see any other workaround....)
Does anybody worked with this scenario...and found a clean solution .....
I have heard from people that forces the application not to go to background.
This limitation, will stop a lot of possible projects.

iOS - Receive an external input to my app from a switch with BT or IR?

I am building an assistive iOS app for a kid that uses a switch to control his computer (a simple button that can send only one massege to the computer).
I am looking for a way to connect my app to a switch that can send click events to my app.
It can through by BT, IR or even through the earphone connection (headset port).
(BTW he can not use the iOS screen as the switch).
Any ideas ?
A BT connection requires you to be a certified MFi developer, and that requires money and a real company.
The headphone port would be a great place to interface with. You could wire a simple switch over the microphone line and ground line which, I think, would create a square wave duty cycle for on and off. I've done something similar where we used the headphone port to communicate to a microcontroller through a sound wave that was then converted to 16 bit packets and used to control additional hardware and also give feedback from that hardware.
Another option is a wifi connection, an arduino with a wifi shield and the button on that.
Edit:
The more I think about it, the more I would say use the headphone port. It will be super cheap, the programming to detect the presses will be really easy, and this will probably be the fastest way to achieve your solution. Provided you can solder.
I'm going to suggest going down a different path. Instead of trying to connect the switch directly to the iPhone, use something like an Arduino board with both physical switch and ethernet I/O ports plugged into the local network, and create what amounts to a physical I/O server.
The Arduino handles the physical interfacing and your iPhone app only has to handle the communications protocol to the Arduino over Wi-Fi.
One inexpensive solution would be to use the mic or mic input on the headset port. Connect the switch up to some sort of tone generator (555 timer or Arduino, plus piezo speaker or headset cable). Have the app run an input Audio Queue, and pass the Audio Queue input buffers to a DSP narrow band filter or an FFT. Monitor the frequency band of the tone generator for any significant energy burst above the background noise level. Potentially use multiple separate tone frequencies for more than one switch.
Added: Another simple alternative might be to use the switch to activate a solenoid or small motor (scavenged from an old motorized toy or similar) to tap a capacitive pen or ball of conductive foam on the iPod Touch display. No MFi, WIFI or audio DSP coding required.

Resources