Modifying bluetooth scan parameters via btmgmtBluetooth LE scan as non root?Using UART bluetooth module via...
Derivative is just speed of change?
Can machine learning learn a function like finding maximum from a list?
Should students have access to past exams or an exam bank?
How does Asimov's second law deal with contradictory orders from different people?
How to trick a fairly simplistic kill-counter?
What is my clock telling me to do?
Why are sugars in whole fruits not digested the same way sugars in juice are?
Base Current vs Emitter Base voltage
Word for giving preference to the oldest child
"DDoouubbllee ssppeeaakk!!"
Guidelines for writing a chord progression
Buying resources from your neighbor
Is this mechanically safe?
Please explain the difference in the order of naming Tzelafchad's daughters
Disease transmitted by postage stamps
How do I safety check that there is no light in Darkroom / Darkbag?
How to gracefully excuse yourself from a meeting due to emergencies such as a restroom break?
How do discovery writers hibernate?
How to prevent a single-element caster from being useless against immune foes?
Error with uppercase in titlesec's label field
mv Command Deleted Files In Source Directory and Target Directory
Constant Scan spooling
Accurately recalling the key - can everyone do it?
What is the most 'environmentally friendly' way to learn to fly?
Modifying bluetooth scan parameters via btmgmt
Bluetooth LE scan as non root?Using UART bluetooth module via hciattachUsing bluez to access Bluetooth Low Energy devices?Do I need a modified kernel/module for bluetooth RSSI scan?Bluetooth scan does not find any bluetooth deviceBluetooth controller profilesInitiate bluetooth pairing from iPhone with PIN or other securityHow to connect to my phone via bluetooth serialBluetooth connection errorhcitool lescan (Bluetooth LE or any bluetooth scan) in docker under Non-Privileged & Non-host Network mode is possible?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am scanning for ble beacon advertisements which dynamically modify their payload. Therefore, I want to be sure to miss as few advertisements as possible.
I currently monitor the scan output via bluetoothctl and wireshark. My beacon is broadcasting every 10 seconds, 2 messages on each of the 3 channels.
The goal is to catch both messages at least once on one of the channels.
Currently I face gaps of up to 20 or 30 seconds without successfully receiving anything.
What I do:
bluetoouthctl , turning "scan on"
wireshark, listening on bluetooth respective bluetooth device
I noticed the following behaviour after looking into "btmgmt":
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
[mgmt]#
I changed nothing on the scan intervall or window. It seems like discovery is turned on and off in the following manner: 10 seconds on 5 seconds off.
This means, there is always a timeframe of 5 seconds where I'm basically blind.
Any idea how I could change this behaviour?
Best,
bluetooth bluez
bumped to the homepage by Community♦ 46 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am scanning for ble beacon advertisements which dynamically modify their payload. Therefore, I want to be sure to miss as few advertisements as possible.
I currently monitor the scan output via bluetoothctl and wireshark. My beacon is broadcasting every 10 seconds, 2 messages on each of the 3 channels.
The goal is to catch both messages at least once on one of the channels.
Currently I face gaps of up to 20 or 30 seconds without successfully receiving anything.
What I do:
bluetoouthctl , turning "scan on"
wireshark, listening on bluetooth respective bluetooth device
I noticed the following behaviour after looking into "btmgmt":
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
[mgmt]#
I changed nothing on the scan intervall or window. It seems like discovery is turned on and off in the following manner: 10 seconds on 5 seconds off.
This means, there is always a timeframe of 5 seconds where I'm basically blind.
Any idea how I could change this behaviour?
Best,
bluetooth bluez
bumped to the homepage by Community♦ 46 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am scanning for ble beacon advertisements which dynamically modify their payload. Therefore, I want to be sure to miss as few advertisements as possible.
I currently monitor the scan output via bluetoothctl and wireshark. My beacon is broadcasting every 10 seconds, 2 messages on each of the 3 channels.
The goal is to catch both messages at least once on one of the channels.
Currently I face gaps of up to 20 or 30 seconds without successfully receiving anything.
What I do:
bluetoouthctl , turning "scan on"
wireshark, listening on bluetooth respective bluetooth device
I noticed the following behaviour after looking into "btmgmt":
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
[mgmt]#
I changed nothing on the scan intervall or window. It seems like discovery is turned on and off in the following manner: 10 seconds on 5 seconds off.
This means, there is always a timeframe of 5 seconds where I'm basically blind.
Any idea how I could change this behaviour?
Best,
bluetooth bluez
I am scanning for ble beacon advertisements which dynamically modify their payload. Therefore, I want to be sure to miss as few advertisements as possible.
I currently monitor the scan output via bluetoothctl and wireshark. My beacon is broadcasting every 10 seconds, 2 messages on each of the 3 channels.
The goal is to catch both messages at least once on one of the channels.
Currently I face gaps of up to 20 or 30 seconds without successfully receiving anything.
What I do:
bluetoouthctl , turning "scan on"
wireshark, listening on bluetooth respective bluetooth device
I noticed the following behaviour after looking into "btmgmt":
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
hci1 type 7 discovering off
hci1 type 7 discovering on
[mgmt]#
I changed nothing on the scan intervall or window. It seems like discovery is turned on and off in the following manner: 10 seconds on 5 seconds off.
This means, there is always a timeframe of 5 seconds where I'm basically blind.
Any idea how I could change this behaviour?
Best,
bluetooth bluez
bluetooth bluez
asked Jan 31 '18 at 14:41
HiasHias
64 bronze badges
64 bronze badges
bumped to the homepage by Community♦ 46 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 46 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 46 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Bluez utils are using MGMT kernel interface (not HCI) and this interface is simple, implements some logic under the hood and cannot provide the same functionality as HCI (i.e.: cannot run continuous passive scan).
Scan (discovery) initiated using kernel MGMT interface works only for 10s (defined in bluetooth Kernel module). Then Bluez is informed about end of scan and Bluez restarts scan (immediately if discovery filters are set, or after 5 seconds otherwise)
Solutions:
- use HCI interface (command
hcitool lescan
works ok - use it source code as reference or find ready libraries) - modify bluetooth kernel module, set any discoveryFilter using Bluez (i.e.: RSSI -127).
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f420978%2fmodifying-bluetooth-scan-parameters-via-btmgmt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Bluez utils are using MGMT kernel interface (not HCI) and this interface is simple, implements some logic under the hood and cannot provide the same functionality as HCI (i.e.: cannot run continuous passive scan).
Scan (discovery) initiated using kernel MGMT interface works only for 10s (defined in bluetooth Kernel module). Then Bluez is informed about end of scan and Bluez restarts scan (immediately if discovery filters are set, or after 5 seconds otherwise)
Solutions:
- use HCI interface (command
hcitool lescan
works ok - use it source code as reference or find ready libraries) - modify bluetooth kernel module, set any discoveryFilter using Bluez (i.e.: RSSI -127).
add a comment |
Bluez utils are using MGMT kernel interface (not HCI) and this interface is simple, implements some logic under the hood and cannot provide the same functionality as HCI (i.e.: cannot run continuous passive scan).
Scan (discovery) initiated using kernel MGMT interface works only for 10s (defined in bluetooth Kernel module). Then Bluez is informed about end of scan and Bluez restarts scan (immediately if discovery filters are set, or after 5 seconds otherwise)
Solutions:
- use HCI interface (command
hcitool lescan
works ok - use it source code as reference or find ready libraries) - modify bluetooth kernel module, set any discoveryFilter using Bluez (i.e.: RSSI -127).
add a comment |
Bluez utils are using MGMT kernel interface (not HCI) and this interface is simple, implements some logic under the hood and cannot provide the same functionality as HCI (i.e.: cannot run continuous passive scan).
Scan (discovery) initiated using kernel MGMT interface works only for 10s (defined in bluetooth Kernel module). Then Bluez is informed about end of scan and Bluez restarts scan (immediately if discovery filters are set, or after 5 seconds otherwise)
Solutions:
- use HCI interface (command
hcitool lescan
works ok - use it source code as reference or find ready libraries) - modify bluetooth kernel module, set any discoveryFilter using Bluez (i.e.: RSSI -127).
Bluez utils are using MGMT kernel interface (not HCI) and this interface is simple, implements some logic under the hood and cannot provide the same functionality as HCI (i.e.: cannot run continuous passive scan).
Scan (discovery) initiated using kernel MGMT interface works only for 10s (defined in bluetooth Kernel module). Then Bluez is informed about end of scan and Bluez restarts scan (immediately if discovery filters are set, or after 5 seconds otherwise)
Solutions:
- use HCI interface (command
hcitool lescan
works ok - use it source code as reference or find ready libraries) - modify bluetooth kernel module, set any discoveryFilter using Bluez (i.e.: RSSI -127).
answered Sep 20 '18 at 9:36
niziakniziak
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f420978%2fmodifying-bluetooth-scan-parameters-via-btmgmt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown