0

I work in the AV industry and there is a whole set of hardware/software for controlling Ip and serial devices.

I'm interested in writing some python code for bench testing projectors and video teleconference unuts, as I think it would be easier and more efficient and a good way to do something practical with python.

So if I know that a device of IP addres 192.168.1.50 communicates on port 5149 and takes ascii commands followed by a carriage return what does that look like? In the AV world of pseudo programming one doesn't do much beyond
using a command to send a string i.e. send_string device:port:system, (this info usually points at an ip address specified elsewhere) 'power=1',0x0d or something like that. What does the ASCI command power=1 followed by a carriage return look like in python. Do we have to send each invididual
ascii character or can we store the string in a tuple?

And what about devices that are all hex driven i.e. 0x0d,data1,data2, cksum

I'm fairly new to python and don't come from a traditional programming background so I'm just curious how you
send information from an ip address and then also parse and see what is coming back.

Edited by tunisia

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by tunisia
0

I suppose you connect a socket to ("192.168.1.50", 5149) and then invoke sock.sendall("power=1\n"). See the socket module documentation and try to run some code.

0

I cannot believe it might be that simple. Very cool. Thank you!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.