Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. TCP/IP [Errno 99] Cannot Assign Requested Address

TCP/IP [Errno 99] Cannot assign requested address

By ERAIYARUL K , 12 March, 2024
Forums
Gurux.Net

Hi All,

Script Language - Python
Meter IP -24xx:yyy:xxxx:A::10 (Using SIM Card)
port -4059

I am using Gurux_dlms_client Example code in py.I run the script and able to communicate with device in local computer system . The same code i host AWS linux server, i unable to communicate device (TCP connection issue) ,and also i got error "[Errno 99] Cannot assign requested address ".

And cross verify the meter ip and port with TCP Client Sample code.I can able to send and receive the data . Ping and telnet the meter IP in AWS Linux server , the result is positive.

TCP Client Sample Code

import socket

def tcp_client():
# Server address and port
server_address = ('2401:xxxx:9yy7:zzz6::2', 4xyz)
# server_address = ('10.3.5.86', 8610)

# Create a TCP/IP socket
client_socket = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)

try:
# Connect to the server
client_socket.connect(server_address)
print(f"Connected to {server_address}")

# Send a message to the server
message = " 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 62 1E 5D FF FF"
client_socket.sendall(message.encode())
print(f"Sent: {message}")

# Receive the response from the server
data = client_socket.recv(1024)
print(f"Received: {data}")
print(f"Received: {data.decode()}")

except Exception as e:
print(f"Error: {e}")

finally:
# Close the socket
client_socket.close()
print("Socket closed")

if __name__ == "__main__":
tcp_client()

Kindly help me. I think GXnet library issue....

Profile picture for user Kurumi

Kurumi

2 years 3 months ago

Hi, If you are not using…

Hi,

If you are not using GXNet, it can't be GXNet issue. Check your TCP/IP address and port number that they are correct.

BR,
Mikko

ERAIYARUL K

2 years 3 months ago

Thank you for reply . …

Thank you for reply .
Multiple time i cross check the TCP/IP address and port .I didn't able to find the issue .But i confirm TCP connection issue . Can u give alternate solution for GXNet (TCP). I need your help .

ERAIYARUL K

2 years 3 months ago

Thank you for reply . …

Thank you for reply .
Multiple time i cross check the TCP/IP address and port .I didn't able to find the issue .But i confirm TCP connection issue . Can u give alternate solution for GXNet (TCP). I need your help .

Profile picture for user Kurumi

Kurumi

2 years 2 months ago

Hi, Check the IP address…

Hi,

Check the IP address. You are giving it as plain text at the moment.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin