Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm trying to communicate with an ESP32 microcontroller and my linux desktop using Bluetooth Low Energy.
Right now I'm using the notification example from https://pypi.org/project/pygatt/ (carefully replacing the MAC address and UUID of course).
The pygatt library runs gatttool under the hood, and is pretty flaky. Sometimes the example reports a single value before the program terminates. Sometimes it reports a spate of values and then hangs.
I was wondering if there were any alternatives to pygatt that were more robust?
gatttool is one of the eight tools that BlueZ deprecated.
BlueZ publishes an API using D-Bus and there are various D-Bus bindings for Python
For a BLE client you will need the following API parts of BlueZ:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/device-api.txt
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/gatt-api.txt
An example of how to do this with pydbus is at:
https://stackoverflow.com/a/63751113/7721752
There are also a number of other BLE Python libraries available on PyPI but not all of them built using the BlueZ supported D-Bus API.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am currently using the pysher python package as basis for my pusher client with python 3.5.
Based on my experiences pysher is currently not capable to recover from pusher errors or temporary interruptions of the internet connection, resulting in loss of pusher notifications. Also the performance requirement (CPU usage and memory) is too high, resulting in the need to kill and restart the pusher clients every now and then.
I would therefore like to implement a python 3.5 based pusher client in an alternative way (without the pysher package). As I have heard asyncio would be very suitable for this use case, I would like to consider this too.
How can I implement this?
Thanks!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am supposed to write the Energy sensed routing algorithm for Wireless Sensor Network using Python. The node hardware are Raspberry Pi 3 boards. Is there any way to manipulate the wifi hardware using python (OS will be raspbian or noobs)?
Module for scanning and connecting to wifi networks on linux wifi.
Module for accessing to a wireless network card's capabilities
using the Linux Wireless Extensions
python-wifi
Module for packet manipulation scapy.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm hoping to find a Python interface for working with Bluetooth LE on OSX. I've found bluepy, but it uses bluez which seems to be designed specifically for Linux. As far as I know OSX has its own Bluetooth stack so bluez is no good there.
I've also found Adafruit's BluefruitLE which seems to support OSX.
What is the canonical approach for working with BLE devices on OSX in Python? Which library is recommended?
Thanks
For Mac OS 10.12.X I'd recommend pybluez. I've had some issues in the past with installation on different hosts due to the scheme argument in setup.py, but commenting out that line if it fails tends to do the trick.
Bleak supports Windows/MacOS/Linux all in one neat tidy package.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am interested in developing a chat engine using XMPP and I want to use Python for my web development. Although, XMPP will be independent of this Python work but in case I want to write wrapper, then I will have to use that language.
So, I want to know which XMPP server (preferably open source) should I go with?
And which python libraries are good for using XMPP service?
The only (maintained) effort for an XMPP server is wokkel which builds upon Twisted.
That said, wokkel lacks a ton of features that other non-python servers give. Additionally wokkel aims at providing the library to build a server and it would require a non-trivial amount of effort to actually build a fully functional XMPP server providing support for common XEPs.
On the good side: You don't really need a python server. You can use a ejabberd, tigase, openfire (name here your preference). You can write all your custom logic/protocols and components in python and connect them seamlessly to that server. For that particular use wokkel and Twisted are an excellent choice. Another great library is SleekXMPP.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking for an open source monitoring solution (preferably in Python) that works with ssh or snmp and does not require the installation of an agent (like Nagios, ZenOSS, munin).
Are you aware of such a solution?
All tools that allow you to run scripts to gather metrics can basically run commands over a ssh connection on the target box.
The question is though if this makes a lot of sense as you rely on the network connection always being available and for each (set of) property(s) you need to run a new remote connection with all its overhead.
Snmp does by definition of the protocol require you to run an snmp agent on the target box.