Can a peripheral can be connected to multiple centrals? - bluetooth-lowenergy

From this book it says
A peripheral can be connected to multiple centrals.
can any BLE module do this? More specifically can bluegiga 112 do it? If not what are the BLE modules that can work as a peripheral connected to multiple devices?
The same book also states
Once the connection is established, the peripheral stops advertising and the two devices can begin exchanging data in both directions
so if the peripheral stops advertising how will it accept more connections as mentioned above? How will other scanners detect this peripheral?

Tim Tisdall is correct. That solution works for specification 4.1, but not for 4.0. As you mentioned above, you cannot establish a connection with a device that is not discoverable, and since it stops advertising upon connection establishment, it is impossible to have a peripheral connected to multiple centrals.

Any peripheral BLE device can "broadcast" it's attributes/characteristic values in GATT profile. So, any central device interested in the value can potentially "connect" to the BLE peripheral to get that broadcast message. So, that's what i believe is a use case for "A peripheral can be connected to multiple centrals."
I don't think the peripheral stops advertising it's presence just because it's connected to a certain central device. Any device can still see it's presence when it does a scan.

Related

Multiple connections on one BLE beacon

I have a single BLE beacon and I try to connect to it with multiple Android phones in order to get the RSSI, and see who is the closest to it.
But, just after the first phone connect to the beacon (via a BluetoothGatt), the beacon never appears from the scan again in the scan results of the other phones, so they cannot connect to it too.
The only solution I see is to scan without connection and get the RSSI from the scan result, but I don't think that is an elegant solution.
Is there a way to have multiple connection to a single BLE beacon and get the RSSI ?
Thank you
It's up to the BLE device to decide if it supports more than one connection. If it only wants to support one connection, it can be programmed to stop advertising when a connection is established. From a client perspective, there's not much you can do about that. If you can modify the firmware in the beacon, you can add support for multiple connections.
Otherwise there is nothing wrong with using the rssi in the advertising packet (although you can't make use of BLE security (pairing / bonding)).

Is running HM10 on a soft-serial enable the Low Energy charecteristics ? If so, how can the UUIDs and GATT profiles be tweaked in this case ?

I've been tinkering with the HM-10 board for a few weeks now, trying to push data from phone to module and vice-versa. The ultimate goal was to enable the BLE mode and tweak with the characteristics and GATT profiles. I'm pretty new to this domain so can anyone help me out ?
And is there any way we can interface the HM-10 with the hardware rx-tx channel instead of soft-serial ?
Your question is still not very clear, but i think you mean sending AT-commands over BLE-radio.
To make this possible you have to change the MODE using serial connection.
In standard mode the device can only be configured over the serial connection (pins RXD and TXD) using AT commands.
AT+MODE0: It only accepts AT-commands over the serial connection (RXD/TXD)
until a central device connects to the module.
AT+MODE1: Same as MODE0, once a connection is established,
AT-commands can be sent over BLE and manipulate some PIO pins on
the device.
AT+MODE2: Same as MODE0, once a connection is established,
AT-commands can be sent over BLE.
To test it just send a string to hm-10 as "AT\r\n" and it will respond with OK.
Update:
You cannot change the services and characteristics with AT-commands.
There are a lot of other things you can change,like advertising, setup a beacon and change a lot of settings.
For a full list of AT commands and more see the official data sheet:
http://www.jnhuamao.cn/bluetooth41_en.zip

How to spoof individual BLE packets

I'm doing a security analysis project on an IoT device that uses an unencrypted BLE connection (with ATT protocol) and I want to spoof an individual BLE packet with the source address of an already connected device. Is there some tool or API that would allow me to do this easily? I've already tried gatttool and spooftooph but they seem to be connection based and don't allow you to send out single packets with modified fields (as far as I could tell).
You will need some hardware where you can access the radio peripheral directly. What you basically need to do is to find or write a ble sniffer firmware, with the modification that it at a given moment sends a packet on the connection it is currently listening to. But note that the signal strength must be stronger than the original device's signal so it doesn't interfere.
The only open source project I'm aware of is Ubertooth. You will also be able to do this with an nRF52 but then you need to write your own sniffer firmware since Nordic Semiconductor's is closed source.
I can't comment on Emils reply yet, < 50 rep:
Nordic Semis nRF Sniffer v2 needs only the nRF52DK and wireshark to work as a general BLE sniffer. At 40$ it's not that expensive. I know for a fact they will release a new dongle soon that will sell for ~10-15 bucks if you can wait a a month or two.

Do WiFi devices transmit packets when they are just turned on?

I read a lot about WiFi sensors being used to track smart phones in Retail environment. The location triangulation is done on basis that a smart phone has its WiFi turned ON, be it in connected or unconnected state.
Case 1 : WiFi turned ON but unconnected
Why should a smart phone which has its WiFi turned ON need to transmit the packets, unless the user 'scans' for nearby WiFi networks?
Case 2 : WiFi turned ON and connected
Why should a smart phone transmit any packets, unless the user is browsing the net?
In both the above cases, there is a high chance that most of the time the WiFi device does not send any packet, which means none of the WiFi sensors detect it. If that is true, then the whole idea behind WiFi sensor based triangulation in Retail goes for toss, clearly with so many companies working on this, I must be wrong. Please answer with more than a yes or no, as to which packets are generally sent in both the above scenarios.
If wifi is turned on it will periodically search for new networks. This happens even if you are already connected to one, as it allows the device to connect to a 'better' network, if available.
Scanning/network discovery can be done in two ways. First is passive when a device listens to surrounding access point's (AP) beacon frames. These are basically advertisements for their network. The second method is called active. This is the most likely explanation of how the technology you mentioned works. Active scanning is when the device sends out a probe frame asking for available APs. These are generally ones that you have associated with previously, e.g. Your home network. These probes can be listened to from nearby 802.11 (wifi) devices, therefore tracking you.
Active and passive scanning
801.11 frames
As mentioned in #AndrewLeeming answer, one of the causes for data transmission data is scanning.
It's not necessary but normally it will be performed to find a network to connect to (or a better network in case of already connected). Active scanning can be turned off for power saving reasons. Passive scanning doesn't involve transmissions, so it's irrelevant to this question.
However, the most important reason for WiFi devices to transmit packets while connected is to let the AP know that the client is still available. Otherwise the AP will drop the link after a certain period of time without activity. Additionally, the clients might be in power save mode and instruct the AP not to transmit data to them. From time to time the client will inquire the AP to see if there are any pending packets for it.

Restricting the BLE peripheral device to connect to only one Master

I want to restrict my BLE Peripheral device to connect with only one master always .IF i receive a connection request from some other master/central device, it should reject the connection request !
Thanks for your help !
Regards,
Senthil
Your question is a bit vague so I break it into two cases:
(1) If it is connected to a master, it can't connect to another. This restriction is imposed by BLE standard.
(2) Probably you meant this one. If it was connected to a master, but due to some reason, the connection was lost and the peripheral is advertising again. You do not want this peripheral to connect to any other central devices in the earshot and still wait its original master, right? Well, your peripheral can only do connectable advertising and respond to whatever central device that initiates a connection request. But once both are connected, your peripheral could ask for whatever information from the master for identification. If the master can't respond with a correct answer, your peripheral could disconnect and do advertising again until the original central device connects to it.
Hope this helps.
You have to edit the application on the slave then.
Do you have a BLE chip application layer source code?
Do you have a BLE chip programmer? Development kit?
What chip ar you using?

Resources