Control Network Media Tank with telnet
RolfW
Posts: 6
Hi all
Has anyone tried to control a NMT (Popcorn Hour) with AMX?
It can be controlled with telnet from a pc
http://www.networkedmediatank.com/showthread.php?tid=30168&page=1
I open the socket with netcat <ip> <port> and control the device with commands like "echo x". this works perfectly
With wireshark, I see TCP packets with the following Data: echo x$0A
But if i open a Port with AMX like this IP_CLIENT_OPEN(10,'192.168.200.138',30000,IP_TCP)
and send the string (over Control Device on 0:10:1) "'echo x',$0A" theres no action at all.
Am I doing something wrong?
what is the general way to send telnet commands with AMX?
Hope you guys have helpful tipps!
Cheers
Has anyone tried to control a NMT (Popcorn Hour) with AMX?
It can be controlled with telnet from a pc
http://www.networkedmediatank.com/showthread.php?tid=30168&page=1
I open the socket with netcat <ip> <port> and control the device with commands like "echo x". this works perfectly
With wireshark, I see TCP packets with the following Data: echo x$0A
But if i open a Port with AMX like this IP_CLIENT_OPEN(10,'192.168.200.138',30000,IP_TCP)
and send the string (over Control Device on 0:10:1) "'echo x',$0A" theres no action at all.
Am I doing something wrong?
what is the general way to send telnet commands with AMX?
Hope you guys have helpful tipps!
Cheers
0
Comments
So your command should be IP_CLIENT_OPEN(10,'192.168.200.138',23,IP_TCP)
What errors is NetLinx spitting back at you?
In the other thread i posted, there's port 23 not open.
i get no errors from netlinx in diagnostics... or where should the error happen?
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-10-24 18:23 UCT
Interesting ports on 192.168.1.167:
Not shown: 65524 closed ports
PORT STATE SERVICE VERSION
21/tcp open ftp PureFTPd
139/tcp open netbios-ssn Samba smbd 3.X (workgroup: NNWG)
445/tcp open netbios-ssn Samba smbd 3.X (workgroup: NNWG)
2020/tcp open xinupageserver?
2222/tcp open unknown
6357/tcp open tcpwrapped
8088/tcp open http Apache httpd 1.3.33 ((Unix) PHP/4.3.8)
8883/tcp open unknown
30000/tcp open unknown
56650/tcp open tcpwrapped
58818/tcp open tcpwrapped
other suggestions?
Try this to open the socket
Example:
dvPopcorn = 0:5:0
hostIpAddress = '192.168.1.1'
hostPort = 30000
Also, don't terminate your command with $0A, use $0D in stead
Good luck, what commands can you execute on the Popcorn by the way?
if I "hardcode" it, it works perfect!
beautyful!!!
there are lot's of commands. they tried almost every command on the link i posted.
thank you!
nice weekend guys
cheers
Ahh..
I missed the crucial part! That will teach me to skim!
PS Can you please keep us informed of your progress? I have a Popcorn Hour NMT as well.
one update: don't send the "echo".
you only need to send the command (e.g. "x" for on/off)
but it's sad that you get no feedback over ip... would be great if someone has an idea to get feedback!
Best Regards
That would be a first try with usual snapi-codes...