uxplay-beacon.py: code cleanups

This commit is contained in:
F. Duncanh
2025-10-28 20:19:58 -04:00
parent 63f62e9f74
commit 50e74f25d1
4 changed files with 93 additions and 52 deletions

View File

@@ -18,7 +18,7 @@ informing nearby iOS/macOS devices of the local IPv4 network address of
the UxPlay server, and which TCP port to contact UxPlay on. A python
script (Python >=3.6) “uxplay-beacon.py”, to broadcast the
Service-Discovery advertisement will be installed on systems with DBus
support (Linux and *BSD, using Bluez for Bluetooth control): this does
support (Linux and *BSD, using BlueZ for Bluetooth control): this does
<strong>not</strong> require enhanced “root permissions” to run. A
windows version of this script is also planned for the future.
Instructions are <a href="#bluetooth-le-beacon-setup">given
@@ -1457,7 +1457,15 @@ this to see even more of the GStreamer inner workings.</p>
<p>The python&gt;=3.6 script for running a Bluetooth-LE Service
Discovery beacon is uxplay-beacon.py. Currently only a DBus version (for
Linux and *BSD) is available, and it is only installed on systems which
support DBus.</p>
support DBus. Bluetooth &gt;= 4.0 hardware on the host computer is
required: a cheap USB bluetooth dongle can be used. Bluetooth support
(BlueZ) must be installed (on Debian-based systems:
<code>sudo apt install bluez bluez-tools</code>; recent Ubuntu releases
provide bluez as a snap package).</p>
<p>In addition to standard Python3 libraries, you may need to install
the gi, dbus, and psutil Python libraries used by uxplay-beacon.py. On
Debian-based systems:</p>
<pre><code>sudo apt install python3-gi python3-dbus python3-psutil</code></pre>
<p>If uxplay will be run with option “<code>uxplay -ble</code>” (so it
writes data for the Bluetooth beacon in the default BLE data file
<code>~/.uxplay.ble</code>), just run <code>uxplay-beacon.py</code> in a