I am developing a LAN multiplayer card game. I designed it such that at the start of the game scene, clients have to send a message ("send ip address") to the server via the broadcast address. The server then responds back by sending its IP address to the clients . Clients then connect to this IP address using Enetmiltiplayerpeer. Once connection is established, the game then starts and the server is responsible for sending updates to every client. I designed it like this so that clients wouldn't have to manually enter the server's IP address on their devices. When I run this game between two windows computer connected to a LAN. It works, the two computers(one being the server and the other the client) can establish connection and the game can be played. But when I run the game between an android device and a windows computer connected to the same LAN, whereby the windows is the server and the android is the client, connection/ communication can't be established and the game can't be played. Remember that at the start of the game scene, the client have to send the message "send ip address" to the server for an IP address, but my android phone is not sending out the message(udp packet) to the server. I know my android phone is not sending out the message packet because I analyzed it with a tool and got the feedback in the picture 
I also enabled all the necessary permissions in the exported apk as shown in the picture 
The code for the server that listens for a ping from the client and then send the ip address is this
extends Node2D
var udp_port = 6969
var is_multicast_active = true
var delta_time = 0.0
var udp_server_found = false
var udp_requests = 3
var server_ip = null
var udp_server = UDPServer.new()
func _ready() -> void:
udp_server.listen(udp_port, '0.0.0.0')
func process(delta: float) -> void:
if is_multicast_active == true:
udp_server.poll()
if udp_server.is_connection_available():
var udp_peer: PacketPeer = udp_server.take_connection()
var packet = udp_peer.get_packet()
print('server recieved the message: %s, client ip: %s, client port %s' %[packet.get_string_from_ascii(), udp_peer.get_packet_ip(), udp_peer.get_local_port()])
udp_peer.put_packet(GlobalVariables.ip_address.to_ascii_buffer())
print('server sent %s' %[GlobalVariables.ip_address])
The Client code for sending the message to the server and receiving the ip address is
extends Node2D
@onready var udp_client = PacketPeerUDP.new()
var udp_port = 6969
var has_server_been_found = false
var is_multicast_active = true
var delta_time = 0.0
var udp_server_found = false
var udp_requests = 3
func _ready() -> void:
udp_client.set_broadcast_enabled(true)
udp_client.set_dest_address('255.255.255.255', udp_port)
func _process(delta: float) -> void:
if has_server_been_found == false:
if is_multicast_active == true:
delta_time += delta
if delta_time >= 2.0:
delta_time = 0.0
if not udp_server_found:
udp_client.put_packet('send ip address'.to_ascii_buffer())
udp_requests -= 1
if udp_requests == 0:
pass
if udp_client.get_available_packet_count() > 0:
udp_server_found = true
has_server_been_found = true
var packet = udp_client.get_packet()
var server_ip = packet.get_string_from_ascii()
print('client received: %s' %[packet.get_string_from_ascii()])
I would like to know why the android version isn't sending the message but the windows version works just fine. My android operating system is android 13 and i am using godot 4.5.