How to programmatically select the BT device to push a file to? - bluetooth

I am designing an information kiosk and need a BT application which can automatically push a file to the nearest BT enabled device assuming that this would be the phone of the person currently standing in front of the kiosk.
Is there any other ways of doing this except by checking the RSSI (Received Singal Strength Indicator)?
Do all Bluetooth stacks support accessing this property?
How accurate is RSSI as the basis for the decision to which device to push to? Can it be that other phones which are further away from the kiosk can emit a stronger signal than the signal coming from the phone of the guy standing right in front of the kiosk?

Not all stacks support RSSI.
There's an alternate way: the device who first answers to Inquiries should have a stronger signal.
Your guess is true, it only depends on signal strength, not distance.
Also, the device with the stronger signal is not necessarily the one which answers first, since implementations of the protocol are different among devices. Thus you would have to test all target devices separately.

Related

What peer-to-peer protocol has the shortest specification?

I want to implement a P2P protocol in C for personal education purposes.
What would be the protocol with the shortest specification that is still used today?
I have already implemented a web and IRC client and server.
I agree with Mark, that point to point over a serial link would be a good exercise.
In particular, I would recommend the following programme of stuff...
Implement basic transmission over a "Serial Port" (using RS-232 if you have some Arduinos/embedded processors lying around, or using a null modem emulator if you don't (see com0com on Windows, or this on linux/mac).
I.e. send lower case letters from A->B, and echo them back as upper case from B->A
Implement SLIP as a way to reliably frame messages
i.e. you can send any string (e.g. "hello") and it is returned in upper case with "WORLD" appended ("HELLOWORLD").
Implement the "Read Multiple Holding Registers" and "Write Multiple Holding Registers" part of the Modbus protocol, using SLIP to frame the messages.
I.e. you have one follower (slave) device, and one leader (master) device. The follower has 10 bytes of memory that are exposed over modbus with the initial value "helloworld".
Just hard-code the follower / leader device Ids for now.
The leader reads the value, and then sets it to be "worldhello".
At the end of this you would start to have an understanding of the roles of network layers, ie:
The physical layer - Serial/RS-232
A "link layer" of sorts - SLIP
An "application" layer - Modbus
Serial. The answer is serial. You're not going to get any leaner than simple RX/TX communication but you'll lack a lot of convenience methods. If you want to explore more than simple bidirectional comms, I2C or modbus open up a lot of options.

Can the the device receive commands without previous negotiation (sending any data)?

I'm dealing with the following challenge. In my system, there are two devices. Tags and anchors. Tags have BLE module with the transmit power 0dBm and not Long Range feature (BLE 4.0). Anchors have BLE module with transmit power over 8dBm and Long range feature (BLE 5.0).
I want tags to only receive some commands. Bi-directional communication is not necessary. This way, I can utilize the transmit power of anchor (8dBm) and thus quite bigger range, if tag with 0dBm is only receiving.
I read something about Observer/Broadcaster principle, where connecting is not necessary. But somehow devices have to agree on what frequencies should they hop on, the step and so on.
I'm asking, is it possible for device to only receive commands without previous negotiation with the sender?
Thank you very much for help. I'm beginning with BLE standard and there is a lot to learn.
Yes, it is possible to send data via adverts/scanning only. This way, there's no connection that needs to be established, and therefore no connection parameter negotiation takes place. As for the frequency hopping agreement - this happens via the baseband (in other words you will not deal with this in the software yourself) and is generally not applicable for advertising/scanning (these happen on 3 frequency channels only and therefore it is likely that the observer will catch what the broadcaster is broadcasting).
However, keep in mind that because you are broadcasting/advertising the data as opposed to directly sending it, that data can be received by any observing/scanning BLE devices which is not desired for safety/security/privacy purposes.
For more information on BLE communication, I recommend the links below:-
Getting Started with Bluetooth Low Energy
Is it Possible to Send Data with BLE Broadcast Mode

Decoding Bluetooth signal and packets using GnuRadio

I am currently working on a project which aim to detect Bluetooth and decode Bluetooth packets (I use a Hack RF One to make the detection). I have made a Gnuradio Flowgraph in order to demodulate Bluetooth signal and I am trying to decode visualy the packets by searching a Bluetooth frame on a binary file.
Unfortunately, I didn't succeed to recover a clear view of the Bluetooth signal. To be precise, I am pretty sure that I detect Bluetooth on my sinks but when sending this to a Clock Recovery + Binary Slicer blocks, I am unable to recover interresting data in the binary file (especially the MAC adress of the sending device, which is part of the a Bluetooth packet). Moreover, I would like to know what type of network layer (physical, transport, baseband...) is intercepted in this type of process. In my case, I aim to intercept baseband layer packets.
Additionaly, I am interrested in knowing how to use the gr-bluetooth because I can't find a lot of documentation concerning this block. I think this can be interresting for the development of my project.
Could you please, give me your view, opinion about this problem ? I am stucked at this stage without knowing the exact origin of my issue. (Here is my flowgraph GnuRadio_Flowgraph and a screenshot of one of my Bluetooth detection Detected signal at 2.402GHz).
Thank you very much,
You probably need an ubertooth instead https://www.sparkfun.com/products/10573
I read that the bluetooth frequency skipping is spread wider than the HackRF can read, so at-best, you're going to miss 75% of frames if you only have one hackrf connected.

Bluetooth LE / iBeacons - one radio, multiple broadcasts?

I want to broadcast several BTLE beacons, preferably from a single bluetooth LE radio dongle.
Instead of buying multiple dongles, would it be possible to "pulse" say 5 UUID, major and minor broadcasts very quickly - every second or even half second on loop so that it would appear there were 5 beacons to a device?
I imagine it would depend on the scanning rate of the handset and other factors... but could it theoretically work?
Yes, you can do this. On iOS devices, I have only been able to switch identifiers once per second, making it only practical to simulate transmitting two iBeacons simultaneously without getting CoreLocation exitedRegion callbacks.
See: Can I broadcast multiple ibeacon signals from only one bluetooth? and how
Other BLE capable devices may allow faster switching.

Read Data from unknown Bluetooth Device while communicating

I am trying to figure out how the FORA d15b blood pressure monitoring system communicates via Bluetooth. I want to be able to eventually write an Android app that can receive blood pressure data from the device.
More specifically, I want to know the exact data to send to the device in order to request blood pressure information. I also want to know the data that the device sends out. However, I don't even know the format of the data being sent/received.
I know that FORA has a PC app that can communicate with the d15b device via Bluetooth but I don't know what information its sending/receiving over Bluetooth, and that's what I want to know.
Here is Bluetooth information I know about the d15b device:
Bluetooth Carrier Frequency: 2400MHz to 2483.5MHz
Bluetooth Modulation Method: GFSK, 1Mbps, 0.5BT Gaussian
Transmission Power: +3dBm to –20dBm; Power control 4 stage
Receiving Signal Range: -88dBm to -20 dBm
Receiver IF Frequency: 1.5MHz center frequency
Maximum Data Rate: Asynchronous:723.2kbps/57.6kbps;
Synchronous: 433.9kbps/433.9kbps
I'm struggling to even find a starting point. Any help is appreciated! Thanks in advance.
I am familiar with C, Java, and Arduino if that helps at all...
NOTE:
Unfortunately, I am new to Bluetooth. After doing some research, I am still pretty clueless on how to solve this problem. In the title, I say unknown Bluetooth device because I just want to be able to read what I/O of an unknown Bluetooth device, which in my case happens to be the d15b that I know nothing about. Sorry if the question has been addressed already or if this is an inappropriate place to post this question. I wasn't sure.
Bluetooth data is encrypted. So it's not possible to hack it easily.
Forget it.

Resources