I like to analyze bluetooth low energy advertising packages on an Arduino Uno. This tasks poses me problem because the BLE modules I have found only work in device mode (Adafruit, RedBearLab, and other nRF51822 and nRF8001 based) and can't collect data. Does anyone know about such projects or have experiences with this?
Electronic – Collect Bluetooth Low Energy Data
bluetooth low energy
Related Solutions
The advertisement packet your beacons send can contain custom data. However the space is very limited, around 31 bytes. About 16bytes of it goes to the 128bit "service UUID" of your beacon. The structure of the packet is defined by the bluetooth spec and it does have some overhead, so I'm not sure how much is actually available for the custom data.
The service UUID is an identifier which your iphone app will search for. The idea that each service has a unique identifier, so if an app wants to find heart rate monitors, it will scan for the heart rate monitor uuid. In iOS you can even do a wildcard scan, and it will return any ble advertisements it can find, regardless of the services it has. It is however recommended by Apple guidelines that you specify the service UUID.
There is no requirement for pairing in order to receive the advertisment packets from the beacon. There is also no theoretical limit that would prevent that the beacons couldn't be found, given an infinite amount of time.
I haven't heard anyone putting 500 advertising BLE beacons in the range of an iPhone to see how many it can detect. With 500 beacons advertising simultaneously there will be a lot of collisions between packets. This could theoretically be calculated with knowing the advertisement interval.
The iPhone scan window (how long the channels are actively listened to) and scan interval (how often the scanning window is entered) cannot be adjusted, isn't documented and cannot be relied to remain the same between versions. This means that there isn't a way to really calculate how the advertisements will be found.
There's some recommendations published by Apple about advertising: https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf
Oh, and by default iOS will filter the results so you get one notification per scan session, per beacon. You can set the "allow duplicates" option in the scan to get multiple notifications per scan session for each beacon if this is needed, but again, apple doesn't recommend it.
If you end up testing this with 500 beacons, or even > 10, I thin a lot of people would be interested in your results. I personally would also appreciate hearing about your experiences.
I take it that the question is whether or not the radio frequency (RF) signals between the two devices will be blocked by the components in a car, when one of the devices is outside and one is inside.
Metal and other conducting materials are efficient at blocking RF. Also placing an antenna close to metal is also likely to "de-tune" the antenna, meaning it will not be as efficient on the intended frequency. Also 2.4GHz signals are not great at penetrating and have shorter range than lower frequencies. Say 900MHz would work almost 3 times as far with the same TX and RX properties. Cars can also come with metallic paints which block RF and the wind screen's coating commonly also blocks RF.
That being said, a typical bluetooth low energy device with a TX power of 0dBm and an RX sensitivity of say -90dBm gives you a theoretical 90dBm "link budget". To carry a 2.4GHz RF signal in free space for 3m, you need a link budget of 50dBm plus at least 10dBm of so called "fade margin". (Simple calculator: http://www.qsl.net/pa2ohh/jsffield.htm) Now this leaves us with a margin of 30dBm for attenuation caused by the car chassis.
RF will radiate in all directions and bounce off of materials. The question becomes, is there a way for the RF to travel between the two devices which would cause less than 30dBm of fading/attenuation. This very well may not be a straight line, but may instead be for example by bouncing off the road or getting wave-guided through the ventilation :).
Causing 30dBm attenuation is actually not very easy as the RF tends to "leak" through any and all routes. You'd be hard pressed to find locations in a car where there isn't some route that the RF finds that causes less than 30dBm of attenuation. There are some numbers for common building materials http://www.moonblink.com/store/attenuation_at_24ghz_.cfm that give you an idea of typical losses for materials.
In summary: Yes it is possible for two devices to communicate when one is placed outside of the car and one is placed inside of the car. Just don't place the antenna straight onto metal which would detune it and block a lot of RF paths.
Best Answer
Adafruit has the Bluefruit Sniffer requires a host PC instead of an arduino UNO (http://www.adafruit.com/product/2269) it basically has a nrf51822 module which talks to the PC over a UART using the FTDI usb to Serial converter chip. I suspect that you could probably get a similar nrf51822 module and flash the sniffer firmware( found here: https://github.com/adafruit/Adafruit_BluefruitLE_Firmware/tree/master/sniffer/1.0.1)use the Jlink to flash the firmware onto the BLE module and use that to communicate with the arduino UNO over a uart connection. Hope that helps, Good luck!
you can try using one of these modules maybe:
http://www.seeedstudio.com/depot/MDBT40P%C2%A0%C2%A0nRF51822%C2%A0based%C2%A0BLE%C2%A0module-p-2503.html
https://www.adafruit.com/products/2479