Facebook Like Button

Welcome Visitor! Please Login or Register
USB tethering w/ mu...
 
Share:
Notifications
Clear all

[Solved] USB tethering w/ multiple android clients  


thierry beccaro
Posts: 2
Registered
(@thierry-beccaro)
New Member
Joined: 5 months ago

Hi!

 

First of all thanks a lot for that amazing app, I have tested quite a few and it is by far the best one.

Now, I am using two android tablets as extra monitors for a windows laptop, and it's working well but thanks to a workaround.
I have assigned both tethered connections a fixed ip : 192.168.42.1 (tablet1) & 192.168.42.2 (tablet2)

What happens : 

I turn usb tethering on and server ip appears on tablet 1 (192.168.42.1)
I turn usb tethering on tablet 2 and no server ip shows up (should be 192.168.42.2). If I try to enter this address manually, it will timeout.

Now given that configuration, if I turn off usb tethering on tablet 1, server ip will show up on tablet 2 (192.168.42.2). It will also keep showing on tablet 1 (192.168.42.1). Finally, if I turn back on usb tethering on tablet 1, both server IPs will keep showing and I will be able to connect both tablets.

I have tested with different phones and tablet and it keeps behaving the same. For exemple if I want to connect 3 devices, I will have to launch spacedesk on each device, then switch on USB tethering on each of these devices while the two others are switched off for the server IP to show up. Once I've done that for all devices, I can connect them.

Also, when I check the windows server agent, local interfaces are as expected (192.168.42.1 & 192.168.42.2) but the network connections (remote) tab shows my devices having the same IP address 192.168.42.129 with random ports. I guess this must be the default android usb tethering IP. 

 
I hope I have been clear enough, not that this is a deal breaker, I really love this app and it's working great with that little workaround, but is there anything that can be done to sort this out?

Many thanks!

2 Replies
spacedesk Lea
Posts: 1890
Moderator
(@spacedesklea)
Illustrious Member
Joined: 2 years ago

Hi @thierry-beccaro,

This is probably has something to do with the Network adapter priority of your windows primary machine.

On Windows 10, if you have a device with more than one network adapter (such as Ethernet and Wi-Fi), (in your case you have 2 Remote NDIS network adapter for the 2 USB tethering connection, right?), each interface receives a priority value automatically based on its network metric, which defines the primary connection that your device will use to send and receive networking traffic.
reference: https://www.windowscentral.com/how-change-priority-order-network-adapters-windows-10

Maybe you can try to manually set the metric value of the other Remote NDIS network adapter with lower value than the other one so that you don't have to disable-enable it.
Please check the reference link I posted above for the steps on how to set it.

Reply
thierry beccaro
Posts: 2
Registered
(@thierry-beccaro)
New Member
Joined: 5 months ago

Hi Lea,

Indeed this is working when I change the metrics, but the problem becomes inverse as I now have to enable/disable usb tethering on the other tablet.

Not sure why this is happening but I came out with a powershell script that roll out metrics priority through my devices. Credits go to that guy : <a href=" removed link "> removed link

There is the script in case anyone's facing the same issue :

 

$INTERFACES=wmic nic get NetConnectionID

$INTERFACES|%{
if ($_ -like 'ags2-w09*')
{
$N=$_.trim()
$ExParm='netsh interface ip set interface interface="'+"$N"+'" metric = 20'
Write-Host $ExParm
Invoke-Expression $ExParm
}
elseif ($_ -like 'me572c*')
{
$N=$_.trim()
$ExParm='netsh interface ip set interface interface="'+"$N"+'" metric = 10'
Write-Host $ExParm
Invoke-Expression $ExParm
}
}

$INTERFACES|%{
if ($_ -like 'ags2-w09*')
{
$N=$_.trim()
$ExParm='netsh interface ip set interface interface="'+"$N"+'" metric = 10'
Write-Host $ExParm
Invoke-Expression $ExParm
}
elseif ($_ -like 'me572c*')
{
$N=$_.trim()
$ExParm='netsh interface ip set interface interface="'+"$N"+'" metric = 20'
Write-Host $ExParm
Invoke-Expression $ExParm
}
}
Write-Host ' '
Write-Host ---------------------------- New Connection Metic ----------------------------
Write-Host ' '

Get-WmiObject -Class Win32_NetworkAdapter -Filter "AdapterType like '%802.3'" |
%{
Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "Index=$($_.DeviceId)" | Select-Object Description,IPConnectionMetric
}

Where me572c and ags2-w09 are my interfaces names, to be changed to yours.
It can easily be adapted to more devices, the idea is just that each device must be prioritized once.

Also, this has to be run as admin.

Thanks a lot!

Reply

spacedesk forum footer

Copyright © 2020 spacedesk Support Forum