|
|
Строка 15: |
Строка 15: |
| Несмотря на то, что в описании упоминается RS232, команды могут передаваться по UDP на определенный порт. 8903 | | Несмотря на то, что в описании упоминается RS232, команды могут передаваться по UDP на определенный порт. 8903 |
| Ниже приведена программа на python для передачи управляющих кодов на доску. | | Ниже приведена программа на python для передачи управляющих кодов на доску. |
| | | https://os.mos.ru/git/andreyka648/panel/src/master/panel.py |
| <syntaxhighlight lang="python">
| |
| #!/usr/bin/python3
| |
| | |
| import socket
| |
| import sys
| |
| | |
| if len(sys.argv) == 2:
| |
| msg = sys.argv[1]
| |
| else:
| |
| print("Send command to AP6 Prometean board")
| |
| print("010200F9 Power Get 1/2")
| |
| print("010101F9 Power On")
| |
| print("010100F8 Power Off")
| |
| print("010300FA Power Get Auto-Power Off 0/1")
| |
| print("010400FB Power Set Auto Power Off")
| |
| print("010500FC Power Complete shutdown ")
| |
| print("030100FA Sys Get Firmware Version Scaler")
| |
| print("030200FB Sys Get Firmware Version Touch")
| |
| print("030300FC Sys Get Touch Serial No")
| |
| print("030400FD Sys Get Panel Serial No")
| |
| print("030500FE Sys Get Model Number")
| |
| print("030600FF Sys Set Factory Reset")
| |
| print("0C020004 vol Get val")
| |
| print("0C000103 vol Up")
| |
| print("0C000002 vol Down")
| |
| print("0C010003 vol Set(0-100)")
| |
| print("020200FA mute Get 0/1")
| |
| print("020001F9 mute On")
| |
| print("020000F8 mute Off")
| |
| print("30020028 source Get 0129/062e/0830/0931/0a32/133b/143c/123a/0b33")
| |
| print("30010128 source AV")
| |
| print("3001062D source YPbPr")
| |
| print("3001082F source VGA")
| |
| print("30010930 source HDMI 1")
| |
| print("30010A31 source HDMI 2")
| |
| print("3001133A source HDMI 3")
| |
| print("30011239 source OPS")
| |
| print("30010B32 source Multi-Media")
| |
| print("31020029 ops Get Installed 0/1")
| |
| print("3103002A ops Get 0/1")
| |
| print("31010129 ops On")
| |
| print("3101022A ops Shutdown")
| |
| print("3202002A Freeze Get 0/1")
| |
| print("3201012A Freeze On")
| |
| print("3201022B Freeze Off")
| |
| print("3502002D Blank Get 0/1")
| |
| print("3501002C Blank On")
| |
| print("3501012D Blank BOff")
| |
| print("3602002E Touch Get Lock mode 0/1")
| |
| print("3601002D Touch Lock On")
| |
| print("3601012E Touch Lock Off")
| |
| print("3702002F RC Get RC 0/1")
| |
| print("3701002E RC Lock On")
| |
| print("3701012F RC Lock Off")
| |
| print("38020030 Remote Get 0/1")
| |
| print("38010130 Remote On")
| |
| print("3801002F Remote Off")
| |
| print("39020031 Standby Get 0-2m/1-5m/2-10m/3-20m/4-30m")
| |
| print("39010030 Standby Set 0-4")
| |
| print("3A020032 Shutdown time GET 0-30m/1-45m/2-60m/3-90m/4-120m")
| |
| print("3A010031 Shutdown time SET 0-4")
| |
| print("3401002B Picture Get 002b/012c/022d/032e")
| |
| print("3402002C Picture set Lightness")
| |
| print("3402012D Picture set Standard")
| |
| print("3402022E Picture set Soft")
| |
| print("3402032F Picture set User")
| |
| print("3403002D Contrast Get ")
| |
| print("3404002E Contrast Set ")
| |
| print("3405002F Brightness Get ")
| |
| print("34060030 Brightness Set ")
| |
| print("34070031 Sharpness Get ")
| |
| print("34080032 Sharpness Set ")
| |
| print("34090033 Color Temp Get 0033/0134/0235/0336")
| |
| print("340A0034 Color Temp Cold")
| |
| print("340A0135 Color Temp Natrue")
| |
| print("340A0236 Color Temp Warm")
| |
| print("340A0337 Color Temp User")
| |
| print("340B0035 Backlight Get")
| |
| print("340C0036 Backlight Set 0-100")
| |
| print("340F0039 Backlight Get 0038/0139/023a/033b")
| |
| print("340E0038 Backlight Standard")
| |
| print("340E0139 Backlight Auto")
| |
| print("340E023A Backlight Eye Protection")
| |
| print("340E033B Backlight Energy")
| |
| print("340D0037 Backlight Set Picture Reset")
| |
| print("40000137 RC Power")
| |
| print("40000C42 RC Menu")
| |
| print("40000D43 RC Exit")
| |
| print("40000E44 RC Cursor Up ")
| |
| print("40000F45 RC Cursor Down ")
| |
| print("40001046 RC Cursor Right")
| |
| print("40001147 RC Cursor Left ")
| |
| print("40001248 RC Enter ")
| |
| print("40001349 RC Audio Mute")
| |
| print("4000144A RC Volume Up ")
| |
| print("4000154B RC Volume Down ")
| |
| print("40001A50 RC Picture Mode")
| |
| print("40001B51 RC Sound Mode ")
| |
| print("40001C52 RC Sleep Timer ")
| |
| print("40001E54 RC Program Information ")
| |
| print("40001F55 RC Freeze ")
| |
| print("40002056 RC Input Source")
| |
| print("40002157 RC Discrete input MultiMedia")
| |
| print("40002258 RC Discrete Input VGA")
| |
| print("40002359 RC Discrete Input HDMI1")
| |
| print("4000245A RC Discrete Input HDMI2")
| |
| print("4000255B RC Discrete Input HDMI3")
| |
| print("4000275D RC OPS")
| |
| print("4000285E RC Discrete Volume Mute On")
| |
| print("4000295F RC Discrete Volume Mute Off")
| |
| print("40002A60 RC Discrete Input AV")
| |
| exit(1)
| |
| sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
| |
| sock.sendto(bytes("F6"+msg+"6F", "utf-8"), ("192.168.254.254", 8903))
| |
| | |
| s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
| |
| sa = ("192.168.254.253", 8904)
| |
| s.bind(sa)
| |
| data, address = s.recvfrom(4096)
| |
| s=data.decode('utf-8')
| |
| if s[0:2]=="F6":
| |
| s=s[6:-4]
| |
| if(len(s)>4):
| |
| print(bytearray.fromhex(s).decode())
| |
| else:
| |
| print(s)
| |
| else:
| |
| print("Ans: "+s)
| |
| | |
| | |
| | |
| </syntaxhighlight>
| |
|
| |
|
| В частности для разблокировки пульта используется команда | | В частности для разблокировки пульта используется команда |