Skip to content

Windows Udp Discovery on NearShare send #2

@ShortDevelopment

Description

@ShortDevelopment

Issue

Although supported by the RemoteSystemWatcher, the Windows Nearby-Sharing implementation does not send PresenceRequest messages via Udp to discover devices on the local network.
Only scanning for Ble-Beacons guarantees spacial-proximity but excludes devices that cannot advertise Ble-Beacons with custom ManufacturingData like MacOs from receiving (See #1 (comment)).

Context

The scanning for devices happens in Windows.Internal.ShellCommon.ShareExperience.dll

void lambda_39d726f72da8464f6b354668a4acec0b_() {
   RemoteSystemDiscoveryTypeFilter filter1;
   if (Feature<SEBTTest>::IsEnabled) {
      filter1 = new(RemoteSystemDiscoveryType.SpatiallyProximal); // Ble scanning
   } else {
      filter1 = new(RemoteSystemDiscoveryType.Proximal); // Includes everything (i.e. Udp) except Cloud
   }
   ...
}

Windows hits the first path (RemoteSystemDiscoveryType.SpatiallyProximal) by default.

Solution 1

We could create a seperate app using ...

  • the RemoteSystemWatcher with RemoteSystemDiscoveryType.Proximal and the internal ShareSenderBroker from cdprt.dll to invoke the nearshare transfer.
  • our custom implementation ignoring the built-in implementation.

Solution 2

We could try to disable the feature SEBTTEST (might be 0x29DDC94) via mach2.

Caution

This might break something and I did not had success in doing so!

Solution 3

Hope that Microsoft implements a switch to allow discovery of non-spatially-proximal devices on the whole network.


@sidevesh

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions