README update for modularized uxplay-beacon

This commit is contained in:
F. Duncanh
2026-03-09 02:16:17 -04:00
parent 07fa972de1
commit 84662c360c
3 changed files with 185 additions and 101 deletions

View File

@@ -24,16 +24,17 @@ Bonjour/Rendezvous DNS-SD service discovery). <strong>This can be used
on networks that do not allow the user to run a DNS_SD service.</strong> on networks that do not allow the user to run a DNS_SD service.</strong>
The user must run a Bluetooth LE “beacon”, (a USB 4.0 or later “dongle” The user must run a Bluetooth LE “beacon”, (a USB 4.0 or later “dongle”
can be used). The beacon is managed by a Python3 script can be used). The beacon is managed by a Python3 script
<code>uxplay-beacon.py</code> (available in three versions, a BlueZ/DBus <code>uxplay-beacon.py</code>: three implementations of Bleutooth LE
version for Linux/*BSD, a winrt version for Windows, and a version for advertising are available as loadable modules: BlueZ for Linux only,
the BlueIO usb-serial dongle (which has its own BlueTooth-LE stack winrt for Windows only, and BleuIO for the BlueIO usb-serial dongle
independent of that of the host system) that runs on all systems (which has its own BlueTooth-LE stack, independent of that of the host
including macOS). The beacon runs independently of UxPlay: while UxPlay system) that runs on all systems including macOS and *BSD). The beacon
is running, it regularly broadcasts a Bluetooth LE (“Low Energy”) 46 runs independently of UxPlay: while UxPlay is running, it regularly
byte legacy-type advertisement informing nearby iOS/macOS devices of the broadcasts a Bluetooth LE (“Low Energy”) 46 byte legacy-type
local IPv4 network address of the UxPlay server, and which TCP port to advertisement informing nearby iOS/macOS devices of the local IPv4
contact UxPlay on. Instructions are <a network address of the UxPlay server, and which TCP port to contact
href="#bluetooth-le-beacon-setup">given below</a>.</p></li> UxPlay on. Instructions are <a href="#bluetooth-le-beacon-setup">given
below</a>.</p></li>
<li><p>option <code>-vrtp &lt;rest-of-pipeline&gt;</code> bypasses <li><p>option <code>-vrtp &lt;rest-of-pipeline&gt;</code> bypasses
rendering by UxPlay, and instead transmits rtp packets of decrypted h264 rendering by UxPlay, and instead transmits rtp packets of decrypted h264
or h265 video to an external renderer (e.g. OBS Studio) at an address or h265 video to an external renderer (e.g. OBS Studio) at an address
@@ -478,7 +479,7 @@ package</h4>
rpmdevtools packages, then create the rpmbuild tree with rpmdevtools packages, then create the rpmbuild tree with
<code>rpmdev-setuptree</code>”. Then download and copy uxplay.spec into <code>rpmdev-setuptree</code>”. Then download and copy uxplay.spec into
<code>~/rpmbuild/SPECS</code>. In that directory, run <code>~/rpmbuild/SPECS</code>. In that directory, run
<code>rpmdev-spectool -g -R uxplay.spec</code>” to download the <code>pmdev-spectool -g -R uxplay.spec</code>” to download the
corresponding source file <code>uxplay-*.tar.gz</code> into corresponding source file <code>uxplay-*.tar.gz</code> into
<code>~/rpmbuild/SOURCES</code> (“rpmdev-spectool” may also be just <code>~/rpmbuild/SOURCES</code> (“rpmdev-spectool” may also be just
called “spectool”); then run “<code>rpmbuild -ba uxplay.spec</code> called “spectool”); then run “<code>rpmbuild -ba uxplay.spec</code>
@@ -917,6 +918,14 @@ needed.</p></li>
not affect the (small) initial OpenGL mirror window size, but the window not affect the (small) initial OpenGL mirror window size, but the window
can be expanded using the mouse or trackpad.</p></li> can be expanded using the mouse or trackpad.</p></li>
</ul> </ul>
<p>Unfortunately, it seems that the macOS Bluetooth stack does not allow
users to broadcast Bluetooth LE advertisements of the type needed for
Bluetooth LE service discovery (“manufacture-specific” advertisements),
but this can be achieved if you acquire a BleuIO USB dongle which
provides its own Bluetooth LE stack, as a USB serial modem. Bluetooth
Service Discovery is an alternative to Rendezvous/Bonjour DNS_SD, and
can be used on networks that dont allow DNS_SD. See <a
href="#bluetooth-le-beacon-setup">instructions below</a>.</p>
<h2 <h2
id="building-uxplay-on-microsoft-windows-using-msys2-with-the-mingw-64-compiler.">Building id="building-uxplay-on-microsoft-windows-using-msys2-with-the-mingw-64-compiler.">Building
UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64 UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64
@@ -937,10 +946,8 @@ This should install the Bonjour SDK as
<ul> <ul>
<li>**NEW: while you still need to install the Bonjour SDK to build <li>**NEW: while you still need to install the Bonjour SDK to build
UxPlay, there is now an alternative method for Service Discovery using a UxPlay, there is now an alternative method for Service Discovery using a
Bluetooth Low Energy (BLE) beacon. (Dfferent) Python3 scripts for Bluetooth Low Energy (BLE) beacon on Windows. See <a
running the beacon is on Linux/BSD*, Windows and macOS available for href="#bluetooth-le-beacon-setup">instructions below</a>.</li>
this.** See <a href="#bluetooth-le-beacon-setup">instructions
below</a>.</li>
</ul> </ul>
<ol start="2" type="1"> <ol start="2" type="1">
<li><p>(This is for 64-bit Windows; a build for 32-bit Windows should be <li><p>(This is for 64-bit Windows; a build for 32-bit Windows should be
@@ -1537,25 +1544,44 @@ GST_DEBUG=2” before running uxplay. To see GStreamer information
messages, set GST_DEBUG=4; for DEBUG messages, GST_DEBUG=5; increase messages, set GST_DEBUG=4; for DEBUG messages, GST_DEBUG=5; increase
this to see even more of the GStreamer inner workings.</p> this to see even more of the GStreamer inner workings.</p>
<h1 id="bluetooth-le-beacon-setup">Bluetooth LE beacon setup</h1> <h1 id="bluetooth-le-beacon-setup">Bluetooth LE beacon setup</h1>
<p>The python&gt;=3.6 script for running a Bluetooth-LE Service <p>The python&gt;=3.6 script for running a Bluetooth LE Service
Discovery beacon is uxplay-beacon.py. It comes in two versions, one (for Discovery beacon is uxplay-beacon.py. It provides three possible
Linux and *BSD) is only installed on systems which support DBUS, and Bluetooth LE implementations: one for Linux systems with D-Bus, one for
another only for Windows 10/11. Bluetooth &gt;= 4.0 hardware on the host Windows, and one for the <a href="https://www.bleuio.com">BleuIO (or
computer is required: a cheap USB bluetooth dongle can be used.</p> BleuIO Pro) USB dongle</a> with its own on-board Bluetooth-LE Stack that
<p>On Linux/*BSD, Bluetooth support (BlueZ) must be installed (on does not use the host operating system Bluetooth (the Host sees the
Debian-based systems: <code>sudo apt install bluez bluez-tools</code>; device as a USB serial modem). This is needed for macOS where the
recent Ubuntu releases provide bluez as a snap package). In addition to operating system does not allow users to send Bluetooth-LE
standard Python3 libraries, you may need to install the gi, dbus, and advertisements of the type we require. If a BleuIO dongle is available,
psutil Python libraries used by uxplay-beacon.py. On Debian-based the bleuio version of the python script can be used on many operating
systems:</p> systems including macOS, Windows and Linux, and perhaps *BSD (not
tested): it requires python library <code>python3-pyserial</code> to be
installed.</p>
<p>On Linux, Bluetooth support (using the offical Linux Bluetooth stack
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). 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> <pre><code>sudo apt install python3-gi python3-dbus python3-psutil</code></pre>
<p>For Windows support on MSYS2 UCRT systems, use pacman -S to install <p>If a python3-gi package is not found, install the python3-gobject
<code>mingw-w64-ucrt-x86_64-python</code>, package which provides it.</p>
<p>For Windows support in the MSYS2 UCRT64 environment, use pacman -S to
install <code>mingw-w64-ucrt-x86_64-python</code>,
<code>*-python-gobject</code>, <code>*-python-psutil</code>, and <code>*-python-gobject</code>, <code>*-python-psutil</code>, and
<code>*-python-pip</code>. Then install <strong>winrt</strong> bindings: <code>*-python-pip</code>. Then install <strong>winrt</strong> bindings
<code>pip install winrt-Windows.Foundation.Collections</code>”, also using pip (or pip3):</p>
<code>winrt-Windows.Devices.Bluetooth.Advertisement</code> and <pre><code>pip install winrt-Windows.Foundation
<code>winrt-Windows.Storage.Streams</code>.</p> pip install winrt-Windows.Foundation.Collections
pip install winrt-Windows.Devices.Bluetooth.Advertisement
pip install winrt-Windows.Storage.Streams</code></pre>
<p>For python &gt;= 3.11, the pip commands on “externally-managed”
python installations (such as the one provided in MSYS2) should be</p>
<pre><code>pip install .... --break-system-packages</code></pre>
<p>The option <code>--break-system-packages</code> was required to make
users hesitate before adding packages not provided by the “external
management”: <em>this is unnecessarily scary, as in the case of the
winrt packages, no breakage will occur</em>.</p>
<p>If uxplay will be run with option “<code>uxplay -ble</code>” (so it <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 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 <code>~/.uxplay.ble</code>), just run <code>uxplay-beacon.py</code> in a
@@ -1607,12 +1633,13 @@ instance of UxPlay must also have its own MAC address and ports).
not been tested, and this option might not be useful or not been tested, and this option might not be useful or
needed.</em></p></li> needed.</em></p></li>
</ul> </ul>
<p><strong>NEW</strong> While the native macOS BlueTooth-LE does not <p>While the native macOS BlueTooth-LE does not allow users to send
allow users to send “manufacturer-specific” advertisements like the “manufacturer-specific” advertisements like the uxplay service discovery
uxplay service discovery announcement, this can be achieved using the announcement, this can be achieved using the BleuIO dongle, which is a
BleuIO dongle, which is a usb-serial device with its own full usb-serial device with its own full Bluetooth LE implementation (the
BlueTooth-LE implementation (the bleuio version of uxplay-beacon.py is BleuIO module for uxplay-beacon.py is installed with UxPlay in all
installed in macOS systems, but works on all operating systems).</p> operating systems, including macos and *BSD, while the BlueZ and winrt
modules are only installed on Linux and Windows, respectively).</p>
<p>If you wish to test Bluetooth LE Service Discovery on Linux/*BSD, you <p>If you wish to test Bluetooth LE Service Discovery on Linux/*BSD, you
can disable DNS_SD Service discovery by the avahi-daemon with</p> can disable DNS_SD Service discovery by the avahi-daemon with</p>
<pre><code>$ sudo systemctl mask avahi-daemon.socket <pre><code>$ sudo systemctl mask avahi-daemon.socket

View File

@@ -13,13 +13,14 @@
- Support for **service discovery using a Bluetooth LE "beacon"** for both Linux/\*BSD and Windows (as an alternative to Bonjour/Rendezvous DNS-SD - Support for **service discovery using a Bluetooth LE "beacon"** for both Linux/\*BSD and Windows (as an alternative to Bonjour/Rendezvous DNS-SD
service discovery). **This can be used on networks that do not allow the user to run a DNS_SD service.** The user must run a Bluetooth LE "beacon", (a USB 4.0 or service discovery). **This can be used on networks that do not allow the user to run a DNS_SD service.** The user must run a Bluetooth LE "beacon", (a USB 4.0 or
later "dongle" can be used). The beacon is managed by a Python3 script `uxplay-beacon.py` (available in three versions, a BlueZ/DBus version later "dongle" can be used). The beacon is managed by a Python3 script `uxplay-beacon.py`: three implementations of Bleutooth LE advertising are available
for Linux/\*BSD, a winrt version for Windows, and a version for the BlueIO usb-serial dongle (which has its own BlueTooth-LE stack independent of that of the as loadable modules: BlueZ for Linux only, winrt for Windows only, and BleuIO
host system) that runs for the BlueIO usb-serial dongle (which has its own BlueTooth-LE stack, independent of that of the
on all systems including macOS). The beacon host system) that runs on all systems including macOS and *BSD). The beacon
runs independently of UxPlay: while UxPlay is running, it regularly broadcasts a Bluetooth LE ("Low Energy") 46 byte runs independently of UxPlay: while UxPlay is running, it regularly broadcasts a Bluetooth LE ("Low Energy") 46 byte
legacy-type advertisement informing nearby iOS/macOS devices of legacy-type advertisement informing nearby iOS/macOS devices of
the local IPv4 network address of the UxPlay server, and which TCP port to contact UxPlay on. Instructions are [given below](#bluetooth-le-beacon-setup). the local IPv4 network address of the UxPlay server, and which TCP port to contact UxPlay on. Instructions
are [given below](#bluetooth-le-beacon-setup).
- option `-vrtp <rest-of-pipeline>` bypasses rendering by UxPlay, and instead - option `-vrtp <rest-of-pipeline>` bypasses rendering by UxPlay, and instead
transmits rtp packets of decrypted h264 or h265 video to transmits rtp packets of decrypted h264 or h265 video to
@@ -464,9 +465,8 @@ package](#building-an-installable-rpm-package).
First-time RPM builders should first install the rpm-build and First-time RPM builders should first install the rpm-build and
rpmdevtools packages, then create the rpmbuild tree with rpmdevtools packages, then create the rpmbuild tree with
"`rpmdev-setuptree`". Then download and copy uxplay.spec into "`rpmdev-setuptree`". Then download and copy uxplay.spec into `~/rpmbuild/SPECS`. In
`~/rpmbuild/SPECS`. In that directory, run that directory, run "`pmdev-spectool -g -R uxplay.spec`" to download the corresponding
"`rpmdev-spectool -g -R uxplay.spec`" to download the corresponding
source file `uxplay-*.tar.gz` into `~/rpmbuild/SOURCES` source file `uxplay-*.tar.gz` into `~/rpmbuild/SOURCES`
("rpmdev-spectool" may also be just called "spectool"); then run ("rpmdev-spectool" may also be just called "spectool"); then run
"`rpmbuild -ba uxplay.spec`" (you will need to install any required "`rpmbuild -ba uxplay.spec`" (you will need to install any required
@@ -912,6 +912,12 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with
affect the (small) initial OpenGL mirror window size, but the window affect the (small) initial OpenGL mirror window size, but the window
can be expanded using the mouse or trackpad. can be expanded using the mouse or trackpad.
Unfortunately, it seems that the macOS Bluetooth stack does not allow users to broadcast Bluetooth LE advertisements
of the type needed for Bluetooth LE service discovery ("manufacture-specific" advertisements),
but this can be achieved if you acquire a BleuIO USB dongle which provides its own Bluetooth LE
stack, as a USB serial modem. Bluetooth Service Discovery is an alternative to Rendezvous/Bonjour DNS_SD,
and can be used on networks that don't allow DNS_SD. See [instructions below](#bluetooth-le-beacon-setup).
## Building UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64 compiler. ## Building UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64 compiler.
- tested on Windows 10 and 11, 64-bit. - tested on Windows 10 and 11, 64-bit.
@@ -926,8 +932,7 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with
`C:\Program Files\Bonjour SDK`. `C:\Program Files\Bonjour SDK`.
* **NEW: while you still need to install the Bonjour SDK to build UxPlay, there is now an alternative method for * **NEW: while you still need to install the Bonjour SDK to build UxPlay, there is now an alternative method for
Service Discovery using a Bluetooth Low Energy (BLE) beacon. (Dfferent) Python3 scripts for running the beacon Service Discovery using a Bluetooth Low Energy (BLE) beacon on Windows. See [instructions below](#bluetooth-le-beacon-setup).
is on Linux/BSD*, Windows and macOS available for this.** See [instructions below](#bluetooth-le-beacon-setup).
2. (This is for 64-bit Windows; a build for 32-bit Windows should be 2. (This is for 64-bit Windows; a build for 32-bit Windows should be
possible, but is not tested.) The unix-like MSYS2 build environment possible, but is not tested.) The unix-like MSYS2 build environment
@@ -1534,8 +1539,8 @@ debugging, as it is not containerized to make it playable with standard
audio players.* audio players.*
**-ble [*filename*]**. Enable Bluetooth beacon Service Discovery. **-ble [*filename*]**. Enable Bluetooth beacon Service Discovery.
The port, PID and process name of the UxPlay process is recorded by default in The port, PID and process name of the UxPlay process is recorded by default
`~/.uxplay.ble` : (this file is created in `~/.uxplay.ble` : (this file is created
when UxPlay starts and deleted when it stops.) when UxPlay starts and deleted when it stops.)
Optionally the file Optionally the file
*filename*, which must be the full path to a writeable file can instead be used. *filename*, which must be the full path to a writeable file can instead be used.
@@ -1553,13 +1558,18 @@ GStreamer inner workings.
# Bluetooth LE beacon setup # Bluetooth LE beacon setup
The python>=3.6 script for running a Bluetooth-LE Service Discovery beacon is uxplay-beacon.py. The python>=3.6 script for running a Bluetooth LE Service Discovery beacon is uxplay-beacon.py.
It comes in two versions, one (for Linux and *BSD) is only installed on systems which It provides three possible Bluetooth LE implementations: one for Linux systems with D-Bus,
support DBUS, and another only for Windows 10/11. Bluetooth >= 4.0 hardware on the host computer is required: a cheap USB bluetooth dongle one for Windows, and one for
can be used. the [BleuIO (or BleuIO Pro) USB
dongle](https://www.bleuio.com) with its own on-board Bluetooth-LE Stack that
does not use the host operating system Bluetooth (the Host sees the device as a USB serial modem). This is needed for macOS where the
operating system does not allow users to send Bluetooth-LE advertisements of the type we require. If a BleuIO dongle is
available, the bleuio version of the python script
can be used on many operating systems including macOS, Windows and Linux, and perhaps *BSD (not tested):
it requires python library `python3-pyserial` to be installed.
On Linux/*BSD, On Linux, Bluetooth support (using the offical Linux Bluetooth stack BlueZ) must be installed (on Debian-based systems: `sudo apt install bluez bluez-tools`;
Bluetooth support (BlueZ) must be installed (on Debian-based systems: `sudo apt install bluez bluez-tools`;
recent Ubuntu releases provide bluez as a snap package). recent Ubuntu releases provide bluez as a snap package).
In addition to standard Python3 libraries, you may need to install the gi, dbus, and psutil Python libraries used by 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: uxplay-beacon.py. On Debian-based systems:
@@ -1567,16 +1577,31 @@ uxplay-beacon.py. On Debian-based systems:
``` ```
sudo apt install python3-gi python3-dbus python3-psutil sudo apt install python3-gi python3-dbus python3-psutil
``` ```
If a python3-gi package is not found, install the python3-gobject package which provides it.
For Windows support on MSYS2 UCRT systems, use pacman -S to For Windows support in the MSYS2 UCRT64 environment, use pacman -S to
install `mingw-w64-ucrt-x86_64-python`, ``*-python-gobject``, install `mingw-w64-ucrt-x86_64-python`, ``*-python-gobject``,
`*-python-psutil`, and ``*-python-pip``. Then install **winrt** `*-python-psutil`, and ``*-python-pip``. Then install **winrt**
bindings: "`pip install winrt-Windows.Foundation.Collections`", also bindings using pip (or pip3):
``winrt-Windows.Devices.Bluetooth.Advertisement`` and
``winrt-Windows.Storage.Streams``.
If uxplay will be run with option "`uxplay -ble`" (so it writes data for the Bluetooth beacon in the default BLE data file ```
`~/.uxplay.ble`), just run ``uxplay-beacon.py`` in a separate terminal. The python script will start pip install winrt-Windows.Foundation
pip install winrt-Windows.Foundation.Collections
pip install winrt-Windows.Devices.Bluetooth.Advertisement
pip install winrt-Windows.Storage.Streams
```
For python >= 3.11, the pip commands on "externally-managed" python installations (such as the one provided in MSYS2) should be
```
pip install .... --break-system-packages
```
The option `--break-system-packages` was required to make users hesitate before
adding packages not provided by the "external management":
_this is unnecessarily scary, as in the case of the winrt packages, no breakage will occur_.
If uxplay will be run with option "`uxplay -ble`" (so it writes data for the Bluetooth beacon in the default BLE
data file `~/.uxplay.ble`), just run ``uxplay-beacon.py`` in a separate terminal. The python script will start
Bluetooth LE Service-Discovery advertising when it detects that UxPlay is running by checking if the BLE data file exists, and stop when it no longer detects Bluetooth LE Service-Discovery advertising when it detects that UxPlay is running by checking if the BLE data file exists, and stop when it no longer detects
a running UxPlay plus this file (it will restart advertising if UxPlay later reappears). The script will remain active until stopped with Ctrl+C in its a running UxPlay plus this file (it will restart advertising if UxPlay later reappears). The script will remain active until stopped with Ctrl+C in its
terminal window (or its terminal window is closed). terminal window (or its terminal window is closed).
@@ -1607,10 +1632,10 @@ are running to support multiple instances of UxPlay. Each instance must have it
file (just as each instance of UxPlay must also have its own MAC address and ports). _Note: running multiple beacons simultaneously file (just as each instance of UxPlay must also have its own MAC address and ports). _Note: running multiple beacons simultaneously
on the same host has not been tested, and this option might not be useful or needed._ on the same host has not been tested, and this option might not be useful or needed._
**NEW** While the native macOS BlueTooth-LE does not allow users to send "manufacturer-specific" advertisements like the uxplay service discovery While the native macOS BlueTooth-LE does not allow users to send "manufacturer-specific" advertisements like the uxplay service discovery
announcement, this can be achieved using the BleuIO dongle, which announcement, this can be achieved using the BleuIO dongle, which
is a usb-serial device with its own full BlueTooth-LE implementation (the bleuio version of uxplay-beacon.py is installed in macOS systems, but is a usb-serial device with its own full Bluetooth LE implementation (the BleuIO module for uxplay-beacon.py is installed with UxPlay
works on all operating systems). in all operating systems, including macos and *BSD, while the BlueZ and winrt modules are only installed on Linux and Windows, respectively).
If you wish to test Bluetooth LE Service Discovery on Linux/*BSD, you can disable DNS_SD Service discovery by the avahi-daemon with If you wish to test Bluetooth LE Service Discovery on Linux/*BSD, you can disable DNS_SD Service discovery by the avahi-daemon with

View File

@@ -21,16 +21,17 @@
networks that do not allow the user to run a DNS_SD service.** The networks that do not allow the user to run a DNS_SD service.** The
user must run a Bluetooth LE "beacon", (a USB 4.0 or later "dongle" user must run a Bluetooth LE "beacon", (a USB 4.0 or later "dongle"
can be used). The beacon is managed by a Python3 script can be used). The beacon is managed by a Python3 script
`uxplay-beacon.py` (available in three versions, a BlueZ/DBus `uxplay-beacon.py`: three implementations of Bleutooth LE
version for Linux/\*BSD, a winrt version for Windows, and a version advertising are available as loadable modules: BlueZ for Linux only,
for the BlueIO usb-serial dongle (which has its own BlueTooth-LE winrt for Windows only, and BleuIO for the BlueIO usb-serial dongle
stack independent of that of the host system) that runs on all (which has its own BlueTooth-LE stack, independent of that of the
systems including macOS). The beacon runs independently of UxPlay: host system) that runs on all systems including macOS and \*BSD).
while UxPlay is running, it regularly broadcasts a Bluetooth LE The beacon runs independently of UxPlay: while UxPlay is running, it
("Low Energy") 46 byte legacy-type advertisement informing nearby regularly broadcasts a Bluetooth LE ("Low Energy") 46 byte
iOS/macOS devices of the local IPv4 network address of the UxPlay legacy-type advertisement informing nearby iOS/macOS devices of the
server, and which TCP port to contact UxPlay on. Instructions are local IPv4 network address of the UxPlay server, and which TCP port
[given below](#bluetooth-le-beacon-setup). to contact UxPlay on. Instructions are [given
below](#bluetooth-le-beacon-setup).
- option `-vrtp <rest-of-pipeline>` bypasses rendering by UxPlay, and - option `-vrtp <rest-of-pipeline>` bypasses rendering by UxPlay, and
instead transmits rtp packets of decrypted h264 or h265 video to an instead transmits rtp packets of decrypted h264 or h265 video to an
@@ -490,7 +491,7 @@ First-time RPM builders should first install the rpm-build and
rpmdevtools packages, then create the rpmbuild tree with rpmdevtools packages, then create the rpmbuild tree with
"`rpmdev-setuptree`". Then download and copy uxplay.spec into "`rpmdev-setuptree`". Then download and copy uxplay.spec into
`~/rpmbuild/SPECS`. In that directory, run `~/rpmbuild/SPECS`. In that directory, run
"`rpmdev-spectool -g -R uxplay.spec`" to download the corresponding "`pmdev-spectool -g -R uxplay.spec`" to download the corresponding
source file `uxplay-*.tar.gz` into `~/rpmbuild/SOURCES` source file `uxplay-*.tar.gz` into `~/rpmbuild/SOURCES`
("rpmdev-spectool" may also be just called "spectool"); then run ("rpmdev-spectool" may also be just called "spectool"); then run
"`rpmbuild -ba uxplay.spec`" (you will need to install any required "`rpmbuild -ba uxplay.spec`" (you will need to install any required
@@ -937,6 +938,15 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with
affect the (small) initial OpenGL mirror window size, but the window affect the (small) initial OpenGL mirror window size, but the window
can be expanded using the mouse or trackpad. can be expanded using the mouse or trackpad.
Unfortunately, it seems that the macOS Bluetooth stack does not allow
users to broadcast Bluetooth LE advertisements of the type needed for
Bluetooth LE service discovery ("manufacture-specific" advertisements),
but this can be achieved if you acquire a BleuIO USB dongle which
provides its own Bluetooth LE stack, as a USB serial modem. Bluetooth
Service Discovery is an alternative to Rendezvous/Bonjour DNS_SD, and
can be used on networks that don't allow DNS_SD. See [instructions
below](#bluetooth-le-beacon-setup).
## Building UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64 compiler. ## Building UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64 compiler.
- tested on Windows 10 and 11, 64-bit. - tested on Windows 10 and 11, 64-bit.
@@ -952,10 +962,8 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with
- \*\*NEW: while you still need to install the Bonjour SDK to build - \*\*NEW: while you still need to install the Bonjour SDK to build
UxPlay, there is now an alternative method for Service Discovery UxPlay, there is now an alternative method for Service Discovery
using a Bluetooth Low Energy (BLE) beacon. (Dfferent) Python3 using a Bluetooth Low Energy (BLE) beacon on Windows. See
scripts for running the beacon is on Linux/BSD\*, Windows and macOS [instructions below](#bluetooth-le-beacon-setup).
available for this.\*\* See [instructions
below](#bluetooth-le-beacon-setup).
2. (This is for 64-bit Windows; a build for 32-bit Windows should be 2. (This is for 64-bit Windows; a build for 32-bit Windows should be
possible, but is not tested.) The unix-like MSYS2 build environment possible, but is not tested.) The unix-like MSYS2 build environment
@@ -1583,27 +1591,50 @@ this to see even more of the GStreamer inner workings.
# Bluetooth LE beacon setup # Bluetooth LE beacon setup
The python\>=3.6 script for running a Bluetooth-LE Service Discovery The python\>=3.6 script for running a Bluetooth LE Service Discovery
beacon is uxplay-beacon.py. It comes in two versions, one (for Linux and beacon is uxplay-beacon.py. It provides three possible Bluetooth LE
\*BSD) is only installed on systems which support DBUS, and another only implementations: one for Linux systems with D-Bus, one for Windows, and
for Windows 10/11. Bluetooth \>= 4.0 hardware on the host computer is one for the [BleuIO (or BleuIO Pro) USB dongle](https://www.bleuio.com)
required: a cheap USB bluetooth dongle can be used. with its own on-board Bluetooth-LE Stack that does not use the host
operating system Bluetooth (the Host sees the device as a USB serial
modem). This is needed for macOS where the operating system does not
allow users to send Bluetooth-LE advertisements of the type we require.
If a BleuIO dongle is available, the bleuio version of the python script
can be used on many operating systems including macOS, Windows and
Linux, and perhaps \*BSD (not tested): it requires python library
`python3-pyserial` to be installed.
On Linux/\*BSD, Bluetooth support (BlueZ) must be installed (on On Linux, Bluetooth support (using the offical Linux Bluetooth stack
Debian-based systems: `sudo apt install bluez bluez-tools`; recent BlueZ) must be installed (on Debian-based systems:
Ubuntu releases provide bluez as a snap package). In addition to `sudo apt install bluez bluez-tools`; recent Ubuntu releases provide
standard Python3 libraries, you may need to install the gi, dbus, and bluez as a snap package). In addition to standard Python3 libraries, you
psutil Python libraries used by uxplay-beacon.py. On Debian-based may need to install the gi, dbus, and psutil Python libraries used by
systems: uxplay-beacon.py. On Debian-based systems:
sudo apt install python3-gi python3-dbus python3-psutil sudo apt install python3-gi python3-dbus python3-psutil
For Windows support on MSYS2 UCRT systems, use pacman -S to install If a python3-gi package is not found, install the python3-gobject
`mingw-w64-ucrt-x86_64-python`, `*-python-gobject`, `*-python-psutil`, package which provides it.
and `*-python-pip`. Then install **winrt** bindings:
"`pip install winrt-Windows.Foundation.Collections`", also For Windows support in the MSYS2 UCRT64 environment, use pacman -S to
`winrt-Windows.Devices.Bluetooth.Advertisement` and install `mingw-w64-ucrt-x86_64-python`, `*-python-gobject`,
`winrt-Windows.Storage.Streams`. `*-python-psutil`, and `*-python-pip`. Then install **winrt** bindings
using pip (or pip3):
pip install winrt-Windows.Foundation
pip install winrt-Windows.Foundation.Collections
pip install winrt-Windows.Devices.Bluetooth.Advertisement
pip install winrt-Windows.Storage.Streams
For python \>= 3.11, the pip commands on "externally-managed" python
installations (such as the one provided in MSYS2) should be
pip install .... --break-system-packages
The option `--break-system-packages` was required to make users hesitate
before adding packages not provided by the "external management": *this
is unnecessarily scary, as in the case of the winrt packages, no
breakage will occur*.
If uxplay will be run with option "`uxplay -ble`" (so it writes data for If uxplay will be run with option "`uxplay -ble`" (so it writes data for
the Bluetooth beacon in the default BLE data file `~/.uxplay.ble`), just the Bluetooth beacon in the default BLE data file `~/.uxplay.ble`), just
@@ -1658,12 +1689,13 @@ version (the Windows operating system chooses their values):
*Note: running multiple beacons simultaneously on the same host has *Note: running multiple beacons simultaneously on the same host has
not been tested, and this option might not be useful or needed.* not been tested, and this option might not be useful or needed.*
**NEW** While the native macOS BlueTooth-LE does not allow users to send While the native macOS BlueTooth-LE does not allow users to send
"manufacturer-specific" advertisements like the uxplay service discovery "manufacturer-specific" advertisements like the uxplay service discovery
announcement, this can be achieved using the BleuIO dongle, which is a announcement, this can be achieved using the BleuIO dongle, which is a
usb-serial device with its own full BlueTooth-LE implementation (the usb-serial device with its own full Bluetooth LE implementation (the
bleuio version of uxplay-beacon.py is installed in macOS systems, but BleuIO module for uxplay-beacon.py is installed with UxPlay in all
works on all operating systems). operating systems, including macos and \*BSD, while the BlueZ and winrt
modules are only installed on Linux and Windows, respectively).
If you wish to test Bluetooth LE Service Discovery on Linux/\*BSD, you If you wish to test Bluetooth LE Service Discovery on Linux/\*BSD, you
can disable DNS_SD Service discovery by the avahi-daemon with can disable DNS_SD Service discovery by the avahi-daemon with