Home/Support/Support Forum/How could send data from connect Port X4 to a web server using IP.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How could send data from connect Port X4 to a web server using IP.

0 votes
Hi,

How could send data from x4 port connect to a web server using IP.

I have application to send data via TCP / IP for the Ethernet port.

I want to send data to a server on the Internet via 3G (APN is configured)

I need information as to route TCP / IP packets from connect port X4 to web server using the 3G connection.

Thanks,
asked Jan 8, 2016 in Digi Connect Cellular by adil New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
All you need to do is to create a socket from the Gateway to your desired IP address. The gateway will determine what connection to use. That is, it will determine if it can get there via the Ethernet port or if it need to rout via the Cell connection.
answered Jan 8, 2016 by mvut Veteran of the Digi Community (13,488 points)
I used the socket with the IP address and port specific web server.but the router was unable to establish a connection to the server because we have two different networks.

the data of the two internet networks are:
- connect por x4 (home network):
     gateway ip address: 192.168.1.1
     mobile ip address: 166.122.15.16 (connection 3G)

- Web server:
   address ip: 54.218.218.13

I need to configure the router for interconnecting the mobile IP address to the IP Address of the web server.

Thanks,
Are you creating a socket to the web server in your Python application on your gateway? If not, you need to.
Yes, I have created the socket with the web server ip and port specific and does not work (error in the socket):
s = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
.218.218.13 ser_web = '54 '# IP address of the web server (Destination)
TCP_PORT = 10003 # communication port
  s.connect ((ser_web, TCP_PORT))

the same code works perfectly when working on local area network (connecting the connect port X4 to a server via Ethernet with an IP address in the same local area network "ser_web=192.168.1.3").
Everything I am finding is that you have a connection that is being reset by the peer. Can you create a socket from your PC to that same device and port number that is outside of your local network?
...