Jump to content

"Network Unreachable" when tethering.

Recommended Posts

"Network Unreachable" when tethering.
I am running the BDShoppingList project in "C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\RTL\Tethering\BDShoppingList"
It runs well in Windows but when I run the Android target I get this exception.

The exception is raised in this proc:

procedure TTetheringNetworkServerCommUDP.BroadcastData(const AData: TBytes; const AHost: string; InitialPort, FinalPort: Integer);
I: Integer;
LHost: string;
if TTetheringAdapter.IsLoggingItem(TTetheringAdapter.TTetheringLogItem.Comm) then
TLogAdapter.Log('** UDP ** BroadcastData to "' + AHost + '": "' + TEncoding.UTF8.GetString(AData) + '"');
if AHost = '' then
if FIPVersion = TCommIPVersion.IP_IPv4 then
LHost := ''
LHost := '0:0:0:0:0:0:';

for I := InitialPort to FinalPort do
FUDPServer.Broadcast(AData, I, LHost)
for I := InitialPort to FinalPort do
FUDPServer.SendBuffer(AHost, I, AData);

My understanding is that to look for tethered apps on my subnets I need to use DiscoverManagers(2000, '') {timeout, use all my subnets}

The LHost is being assigned ( Shouldn't that be (


Using CE 10.2

Share this post

Link to post

Click on the </> button in the editor, paste your code in the new window and choose the appropriate language for high lightning.



Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now