Im trying to read the output form Bluetoothctl automaticly. So a bash script would scan the output for certain words like and echo if there is a new device. ([NEW]Device x:x:x:x:x ). Now i found that you could use DBus-monitoring for that. but im not sure on how to use it. and there are not alot of exampels out there. Nor guides. Thnx in advance
DBus-monitor to watch bluetooth activity
1.6k Views Asked by AudioBubble At
1
There are 1 best solutions below
Related Questions in LINUX
- How do I recursively find and replace only in files named index.php on Linux webserver?
- passing text with \n as one argument in shell
- kernel module does not print packet info
- How to send ESC/POS commands to thermal printer in Linux
- (x64 Nasm) Writeline function on Linux
- How do I set the Hive user to something different than the Spark user from within a Spark program?
- Default priority of thread with SCHED_FIFO
- Calling a python function with options from shell script
- How to split a directory into parts without compressing or archiving?
- Cross compile simple standard C program on Linux for Mac
- How to offload NAPI poll function to workqueue
- python netifaces - How to get currently used network interface
- Unexpected output from function
- mingw-64 conflicting declarations when cross-compiling
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
Related Questions in BASH
- How do I recursively find and replace only in files named index.php on Linux webserver?
- Delete the extra space after special character in all the lines of text file
- Calling a python function with options from shell script
- bc: prevent "divide by zero" runtime error on multiple operations
- Multiple commands with find and xargs, also accounting for special characters
- How to split a directory into parts without compressing or archiving?
- concat a lot of files to stdout
- Honoring quotes while reading shell arguments from a file
- No laravel sync folders in homestead vagrant on windows
- Grouping commands in curly braces and piping does not preserve variable
- SWI Prolog pass a goal with non-zero arity through the command line arguments
- Evaluating condition of if statement in awk using a second file
- How to customise bash completion to pick only a custom set of commands?
- Bash regular expression execution hangs on long expressions
- Bitwise OR in bash arguments with square brackets
Related Questions in BLUETOOTH
- Bluetooth connection to Sphero is lost when smartphone "goes to sleep"
- MFi Program by Apple
- Android Wear Device as iBeacon
- android - How to get a iBecon detection state when I kill app from Background?
- IOException: broken pipe when sending file from android device to PC via Bluetooth
- How deploy an large number iBeacons
- Send a Android BLE GATT Notification
- burst notifications with Bluetooth Low Energy on Android
- Is there a way to change bluetooth module's baud rate via Bluetooth connection with Android device?
- NFC Bluetooth handover - WITHOUT user confirmation
- Is it possible to create an app that when installed the user can easily turn Bluetooth/NFC ON and OFF by double clicking the Home button?
- Difference between attributes and services in BLE
- Global name 'bluetooth' is not defined
- iOS Bluetooth list of devices already connected?
- Bluetooth discovery not starting on first click
Related Questions in DBUS
- Cannot disable systemd service
- BlueZ 5.30: D-Bus GATT API - Simply Discover and Connect to a BLE device in C
- how I can get return code of org.gnome.SessionManager.CanShutsown in JS?
- Connecting to Bluetooth Device using bluetooth_client_connect_service() - gnome-bluetooth 3.8.2.1
- dbus c program - send(with reply) and receive using method_call
- "No D-BUS daemon running" when running phpunit test
- How to export DBUS_SESSION_BUS_ADDRESS
- DBus how to start service
- how to decode dbus.Array fromat to hex or string in python
- LEAdvertisingManager1 missing from DBus.ObjectManager.GetManagedObjects
- What is the correct way to read advertisement packets from a BLE sensor using bluez 5.43 and DBus
- D-Bus related runtime crash when trying to open SDL2 window
- The trait bound `dbus::arg::Get` is not satisfied when using the Rust DBUS library
- DBus configuration wild card
- How do you create a dictionary that maps onto an array in GLib?
Related Questions in BLUEZ
- BlueZ 5.30: D-Bus GATT API - Simply Discover and Connect to a BLE device in C
- BlueZ error: Sap driver initialization failed
- BlueZ map-client and iOS 8.x device
- Bluez-Can we connect to HSP/HFP service using 2 Bluetooth headset's with signficantly less time to switch audio
- org.bluez.LEAdvertisingManager1 interface disappeared in bluez 5.31
- develop BLE peripheral using C on intel edison
- Bluetooth Low Energy: listening for notifications/indications on Raspberry Pi B+
- Connecting to Bluetooth LE devices from raspberry pi using Bluez libraries in C language
- How to set bluez mode?
- Bluetooth socket constantly timing out
- Bluetooth Low Energy - Connecting to same device
- LEAdvertisingManager1 missing from DBus.ObjectManager.GetManagedObjects
- Not discovering services after connection in some android mobile
- How can I use Bluez5 DBUS API in C++ to pair and connect new devices?
- What is the correct way to read advertisement packets from a BLE sensor using bluez 5.43 and DBus
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Bluetoothctl uses Bluez5. Bluez5 exposes interfaces in the DBus for each functionality it offers.
If you want get started this way, try to undertand what is DBus and how you can use it. Then look at what DBus interfaces are exposed by Bluez and what you can do with it. Finally start calling DBus methods, either directly or using proxies !
Here's a link to the bluetoothctl source code (look near the bottom to find the command list you are familiar with ) https://git.kernel.org/cgit/bluetooth/bluez.git/tree/client/main.c
Bluetoothctl was created using GBDus (GLib bindings for dbus in C) however you use python glib bindings. In the git above, you will also be able to find the documentation of all the bluez dbus interface in /tree/doc