Dell PowerEdge LCD MOTD
- Changing an LCD string on a Dell server remotely with Python
- [[Ipmitool-devel] Fwd: LCD access on PowerEdge 1950](https://www.mail-archive.com/[email protected]&q=subject:"[Ipmitool-devel]+Fwd%3A+LCD+access+on+PowerEdge+1950"&o=newest)
- [How can I set a custom text on the LCD display on Dell PowerEdge servers](https://serverfault.com/questions/81015/how-can-i-set-a-custom-text-on-the-lcd-display-on-dell-poweredge-servers)
0x6 This is the network function (NetFn) number for Applications. See the IPMI spec for more information. 0x58 The operation number for setting system information. IPMI spec (page 572) 193 or 194 The selector for setting the Dell LCD text. 193 means set the string to this, 194 controls what string to show in the LCD. 0 Which chunk of 16 bytes of text you're editing (62 bytes are allowed). 0 Text encoding. This should always be 0 for ASCII. 6 This is the length of the string you're encoding. 'foobar' is 6 characters. You can send 14 characters with each chunk. This is because you can only send 16 bytes total (1 byte for text encoding, 1 byte for length, 14 bytes for text). 0x66 0x6F 0x6F 0x62 0x61 0x72 The ASCII codes for 'foobar'.
There are 2 registers:
0 Which chunk of 16 bytes of text you're editing (62 bytes are allowed).
0 Text encoding. This should always be 0 for ASCII.
They are a control bit of buffer inside IPMI. The LCD string is a buffer which has a width of 16 (each chunk), and has a height.
You can use the chunk register to control which row you are editing. And the text coding and length register only exist in the first row.
# -*- coding: UTF-8 -*- # !/usr/bin/python host = '*.*.*.*' user = 'root' passwd = '******' lcd = 'Dell PowerEdge R710 - VMware vSphere - Misaka Network, Inc.' strHex = '' cmd_prefix = 'ipmitool -I lanplus -H ' + host + ' -U ' + user + ' -P ' + passwd LCD_len = len(lcd) cmd = cmd_prefix + ' raw 0x6 0x58 193' for x in lcd: strHex += hex(ord(x)) strHex += " " if LCD_len <= 14: print(cmd_prefix + ' raw 0x6 0x58 193 0 0 ' + str(LCD_len) + ' ' + strHex) else: first = lcd[:14] strFirst = '' for x in first: strFirst += hex(ord(x)) strFirst += " " print(cmd_prefix + ' raw 0x6 0x58 193 0 0 ' + str(LCD_len) + ' ' + strFirst) lcd = lcd[14:] num = LCD_len - 14 for i in range(num // 16 + 1): strHex = '' for x in lcd[i * 16:min(num + 1, (i + 1) * 16)]: strHex += hex(ord(x)) strHex += ' ' print(cmd_prefix + ' raw 0x6 0x58 193 ' + str(i + 1) + ' ' + strHex)