I want to code a Web or App for simple control of stbs, such as power switch, volume control and channel switching. I got the documentation of netRC, but there is no example of the content of the document, and the description is relatively simple, so I got stuck in the second step of authorization. I use Python to write the program. AES-256-CBC encryption of {"msgType": "pingRequest"}, but I have been tossing for two days, no matter what message I send, there is no response.
I firstly sent a message via UDP broadcast and got a reply from the set-top box.
Server received from ('192.168.1.124', 7666):{"msgType":"Info","name":"chao want control you","deviceFamily":"stbapp","type":"MAG254","serialNumber":"102016N037430","screenHeight":720,"screenWidth":1280,"port":7666,"protocolVersion":"1.0","modes":["MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD","MOUSE","KEYBOARD"]}
Next, I can send an authorization request to a set-top box with the address 192.168.1.124 and port 7666.
But I was confused at this step. Is it necessary to encrypt all messages {"msgType": "pingRequest"} or to encrypt msgType and pingRequest separately and put them back into the original json format? Are there other requirements? Because even if it is a space, the encryption result is different. Could you send me some examples? And whatever language is all right but python or html/css/js are best.



