Access computer on internal Network
JOHNBONZ
Junior Member
I am trying to access a computer on the same network as the AMX controller. I am not sure what port to use - so here is what I have:
computer in network I want to access - 192.168.1.3
AMX controller - 192.168.1.101
dvIPServer=0:2:0;
dvIPServer=0:3:0;
GET_IP_ADDRESS(0:0:0,MyIPAddress);
(* Open The Server *)
P_SERVER_OPEN(dvIPServer.Port,nIPPort,8000,1);
(* Open The Client *)
IP_CLIENT_OPEN(dvIPClient.Port,'192.168.1.3',21,1); //using port 21 not sure what port to use
I expect to get communication to be established but it is not - anyone ever do this?
computer in network I want to access - 192.168.1.3
AMX controller - 192.168.1.101
dvIPServer=0:2:0;
dvIPServer=0:3:0;
GET_IP_ADDRESS(0:0:0,MyIPAddress);
(* Open The Server *)
P_SERVER_OPEN(dvIPServer.Port,nIPPort,8000,1);
(* Open The Client *)
IP_CLIENT_OPEN(dvIPClient.Port,'192.168.1.3',21,1); //using port 21 not sure what port to use
I expect to get communication to be established but it is not - anyone ever do this?
Comments
-
Well,
I would ensure I knew which port was the one before trying with the AMX master. You can use Angry IP and PuTTY and figure it out. If for some reason you can't get onsite then I'd write a quick routine to do a port scan and log the results. While the telnet ports are pretty established there are enough odd balls out there to make things difficult.
Once I knew the port(s) open, things would go a lot faster.
If, however, you do have the port correct and it's just not responding, then either the computer is not set up to listen on the port (telnet server service is not running) or the router and/or switch is blocing the port. -
IP_CLIENT_OPEN(dvIPClient.Port,'192.168.1.3',21,1); //using port 21 not sure what port to use
I expect to get communication to be established but it is not - anyone ever do this?
You need to use the port number that is associated with the service you want to access. If you are using port 21, that is the default for an FTP server program to accept connections.
If there is no program running to serve the port on the computer, then you will get no reply.
If the computer is a basic windows 7/8 machine out of the box, then you won't be getting any reply on port 21 due to default windows firewall rules, even if you are running an ftp program.
If it is a default install of a modern linux version, you may have the same problem depending how you installed ftp. -
Access computer on internal Network
The computer I am trying to connect to from AMX controller is set up with FTP - so other computers on this network can access folders on this 192.168.2.3 computer. So what I am trying to do is have AMX also access it.
I have used IP_CLIENT_OPEN to access other external devices, like a denon receiver.
So for this I just want to access a folder structure on my FTP computer and display the contents in AMX. So I use port 21 to try to connect to this computer to no avail:
Do I need to setup a IP_CLIENT_OPEN and an IP_SERVER_OPEN ?
Once I establish connection I want to issue a directory command to return the current director
CHAR Buffer[256]Result = FILE_GETDIR (Buffer)
I never done this before in AMX but have so in PERL, so I hope I have the correct syntax to retrieve the directory and the contents -
The FTP transfer protocol uses 2 ip_client_open connections, one stream for control, and the other for data. The easiest way to deal with it is have a look at the included code from this tech note:
http://www.amx.com/techsupport/techNote.asp?id=287
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums